Or blockdev, works on john's and merlins fw:I suggest you grep the contents of /proc/partitions instead which returns the size in KiB (not blocks as the header suggests ). Alternatively you could use /sys/block/<device>/size which returns the size in blocks (you'd also have to detect the block size).
blockdev --getsize64 /dev/sda
Excellent! I never knew that command existed.Or blockdev, works on john's and merlins fw:
Code:blockdev --getsize64 /dev/sda
@Jack Yaz After installing NTPMerlin and enable it, My NAS is unable to synchronize with NTP server (NAS is setup to check pool.ntp.org).
1-Should I make NAS check on 192.168.1.1 now that all traffic is redirected to ntpmerlin?
Strange that my qnap nas shows my sync issues with ntpmerlin enabled. Don't know how to troubleshoot itYes you could do that but it’s not necessary if you have enabled redirection in ntpmerlin settings. Thanks to redirection my offline nas syncs with the router despite still being configured to sync with default internet servers pool.ntp.org.
Strange that my qnap nas shows my sync issues with ntpmerlin enabled. Don't know how to troubleshoot it
Sent from my SM-G965F Duos
Unplug it, then plug it back in. Look at the syslog for clues.Issue: USB drive showing up as unmounted after formatting it to ext using amtm
I just installed amtm on my Asus RT-AC87U router running Asuswrt-Merlin's 384.10 firmware and ran "Format disk" to reformat a SanDisk Ultra Fit 128GB USB 3.0 Flash Drive from NTFS to ext, so I could install Diversion, Skynet and Stubby DNS.
At first, I had to reformat my flash drive from exFAT to NTFS on Windows 10. Then, using amtm (via PuTTY), I reformatted it to ext2. However, even though that action was done without any issues, amtm couldn't find the USB drive anymore after the required reboot.
I checked my router's GUI and the flash drive showed up as connected to USB 3.0 with the correct name, but it was listed as "unmounted". After searching these forums, I decided to reformat the drive to ext4, as per Merlin's recommendation. I had to format it back to NTFS on my PC before going through the entire amtm process once more, but the issue persisted.
I tried manually rebooting the router through the GUI and even powering the device off and then on multiple times, as well as unplugging and plugging back in the flash drive, either to the USB 3.0 port in the front or the USB 2.0 port in the back. I can't get the drive to show up as "mounted" and be recognizable in amtm no matter what. I can't install anything to my router or even format the drive again without going through the process of first reformatting it back to NTFS on Windows.
Any help is appreciated. Thanks in advance.
Unplug it, then plug it back in. Look at the syslog for clues.
Issue: USB drive showing up as unmounted after formatting it to ext using amtm
I just installed amtm on my Asus RT-AC87U router running Asuswrt-Merlin's 384.10 firmware and ran "Format disk" to reformat a SanDisk Ultra Fit 128GB USB 3.0 Flash Drive from NTFS to ext, so I could install Diversion, Skynet and Stubby DNS.
At first, I had to reformat my flash drive from exFAT to NTFS on Windows 10. Then, using amtm (via PuTTY), I reformatted it to ext2. However, even though that action was done without any issues, amtm couldn't find the USB drive anymore after the required reboot.
I checked my router's GUI and the flash drive showed up as connected to USB 3.0 with the correct name, but it was listed as "unmounted". After searching these forums, I decided to reformat the drive to ext4, as per Merlin's recommendation. I had to format it back to NTFS on my PC before going through the entire amtm process once more, but the issue persisted.
I tried manually rebooting the router through the GUI and even powering the device off and then on multiple times, as well as unplugging and plugging back in the flash drive, either to the USB 3.0 port in the front or the USB 2.0 port in the back. I can't get the drive to show up as "mounted" and be recognizable in amtm no matter what. I can't install anything to my router or even format the drive again without going through the process of first reformatting it back to NTFS on Windows.
Any help is appreciated. Thanks in advance.
I have seen this many times with many different USB drives. Just use another one (try a different brand, different capacity, etc.). There is no point in trying to 'fix' this, it needs to be reliable each time, every time. This is not an amtm issue. It is a compatibility issue with the USB drive and the router itself.
A 4GB, 8GB or 16GB drive is all you need for amtm + swap file + scripts. The older USB drives I find to be more compatible. I recommend Ext4 with journaling enabled for amtm + supported scripts with an additional 2GB swap file (again; amtm created) before any further scripts are installed.
I would also recommend you use the USB 2.0 mode, even if using the USB 3.0 port. The speed of the router and the scripts are not impacted measurably at all in normal use.
The biggest speed difference is when creating the swap file and when initially installing scripts. When scripts are updated, there are a few seconds extra spent there too, but this doesn't happen often enough to warrant using the USB 3.0 mode and the possible interference caused to the 2.4GHz band.
Hi,L&LD. Thanks for chiming in.
The issue only started after the reformat to ext (either 2 or 4). As long as the drive is formatted in Windows to NTFS, it's recognizable by the router. Any idea what could be the incompatibility?
The only reason I'm using this drive is because it's small ("plug-and-stay", as SanDisk calls it), even though it has a much larger storage capacity than necessary (128GB). All my other flash drives are SanDisk (Cruzer), so if it's an issue with the manufacturer, changing drives wouldn't fix it.
I forgot to add this bit of information to my original post, but I tried changing the USB mode from 2.0 to 3.0 and that didn't help. And in my last format attempt using amtm, I selected ext4 with journaling enabled. No idea how to create a swap file, though. Is it done automatically?
I honestly feel like crying.
I tried plugging in a few different flash drives, but none of them were showing up in the router’s GUI (not even as unmounted).
I made sure to format them to NTFS again on my PC (running Windows 10, as mentioned in my initial post), but the router still wouldn’t recognize them (they were working fine under Windows).
Rebooted the router and now I can’t even access it anymore. 192.168.1.1 results in nothing. Wi-Fi is gone (no discoverable SSIDs). I have no internet, as the modem, although working properly, is set up in bridge by my ISP, per my request (I’m writing this message on my phone).
I tried resetting the router to its factory settings (as an absolute last resort, as I’ve made several changes since the last configuration backup) and the power light blinked after holding the reset button for 5 seconds, as it should, but nothing changed afterwards. I still have no access to the router (via Ethernet or Wi-Fi), and resetting it again doesn’t make the power light blink anymore - is stays on no matter how long I hold the reset button.
I’m tired and desperate. I even tried removing the router from the network entirely and connecting it exclusively to my PC, via Ethernet. Tried all 4 LAN ports and even the WAN port (before and after the reset) - nothing.
Please, I need help. My phone’s internet is unreliable and I depend on a proper connection for work.
I honestly feel like crying.
I tried plugging in a few different flash drives, but none of them were showing up in the router’s GUI (not even as unmounted).
I made sure to format them to NTFS again on my PC (running Windows 10, as mentioned in my initial post), but the router still wouldn’t recognize them (they were working fine under Windows).
Rebooted the router and now I can’t even access it anymore. 192.168.1.1 results in nothing. Wi-Fi is gone (no discoverable SSIDs). I have no internet, as the modem, although working properly, is set up in bridge by my ISP, per my request (I’m writing this message on my phone).
I tried resetting the router to its factory settings (as an absolute last resort, as I’ve made several changes since the last configuration backup) and the power light blinked after holding the reset button for 5 seconds, as it should, but nothing changed afterwards. I still have no access to the router (via Ethernet or Wi-Fi), and resetting it again doesn’t make the power light blink anymore - is stays on no matter how long I hold the reset button.
I’m tired and desperate. I even tried removing the router from the network entirely and connecting it exclusively to my PC, via Ethernet. Tried all 4 LAN ports and even the WAN port (before and after the reset) - nothing.
Please, I need help. My phone’s internet is unreliable and I depend on a proper connection for work.
@EeK before going out and buying a new drive consider following the disk formatting wiki guide to manually ensure it’s properly zeroed and partitioned.
Here’s the basic order I’d do things.
- backup jffs then format jffs so no scripts could be attempting to access the USB resource
- Reboot
- Plug USB in to PC and format disk FAT or NTFS
- Plug USB in to router, it should be detected
- At CLI use dd to Zero disk (see wiki)
- Hard reboot router
- Open pc web browser to your router network administration page and use router to format the USB to FAT (don’t use your pc)
- Soft Reboot
- Now your USB should be partitioned properly for the router.
- Try the amtm script fd again. If it doesn’t work, follow the wiki step by step to do the whole entire job manually from start to finish.
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!