What's new

amtm amtm - the Asuswrt-Merlin Terminal Menu

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I have a ac86u, latest amtm installed...

Why don't I see a "fd" option in menu? I know it exists, it even works if I run it, but it just isn't shown in main menu...
 
I have a ac86u, latest amtm installed...

Why don't I see a "fd" option in menu? I know it exists, it even works if I run it, but it just isn't shown in main menu...
Are you running AMTM 2.7?

it should be in a batch of 3 near the bottom: dc, fd and sw.
 
I have a ac86u, latest amtm installed...

Why don't I see a "fd" option in menu? I know it exists, it even works if I run it, but it just isn't shown in main menu...
If you've never run it, then it is hidden as any other non-installed script under the i option.
 
Why am I getting UPD ERR all of a sudden :(

FIXED: turns out my NTP Server was outdated. Once I changed it, everything worked again.
 

Attachments

  • Screen Shot 2019-10-02 at 5.02.02 PM.png
    Screen Shot 2019-10-02 at 5.02.02 PM.png
    64.6 KB · Views: 461
Last edited:
Can I completely disable the disk-check script for a disk, but keep it for others? I ask, since I recently got a MacBook to have iTunes and manage my iPhone, and I am having issues running an addition disk for Time Machine support.

(backstory) I'm really a Linux/Android guy at heart, but age and medical issues have made iOS use mandatory since the apps I need to monitor have poor or no Android support.

I have a 1 Tb drive in the USB 3 slot and a 16Gb flash disk with all SNB utilities in the USB 2 slot. Formatted the 1Tb with the MacBook, and ASUS AC86U had trouble seeing it. Formatted HFS with the Network Map page USB and all ran fine. Then I updated to the new macOS, and all hell broke loose, lost all network connections, router rebooted multiple times. I've disabled Time Machine and removed the drive for now.

Code:
Thu Oct 17 10:33:10 PDT 2019 Probing 'hfs' on device /dev/sda
 Running disk check v2.4, with command 'fsck_hfs -d -ay' on /dev/sda
 /dev/sda: starting
    Using cacheBlockSize=32K cacheTotalBlock=1024 cacheSize=32768K.
 ** Checking HFS Plus volume.
 ** Checking Extents Overflow file.
 ** Checking Catalog file.
 ** Checking Catalog hierarchy.
 ** Checking Extended Attributes file.
    Invalid index key
 (8, 333)
 ** Repairing volume.
 ** Rechecking volume.
 ** Checking HFS Plus volume.
 ** Checking Extents Overflow file.
 ** Checking Catalog file.
 ** Checking Catalog hierarchy.
 ** Checking Extended Attributes file.
    Invalid index key
 (8, 333)
 ** Repairing volume.
 ** Rechecking volume.
 ** Checking HFS Plus volume.
 ** Checking Extents Overflow file.
 ** Checking Catalog file.
 ** Checking Catalog hierarchy.
 ** Checking Extended Attributes file.
    Invalid index key
 (8, 333)
 ** Repairing volume.
 ** Rechecking volume.
 ** Checking HFS Plus volume.
 ** Checking Extents Overflow file.
 ** Checking Catalog file.
 ** Checking Catalog hierarchy.
 ** Checking Extended Attributes file.
    Invalid index key
 (8, 333)
 ** The volume MacBU could not be repaired after 3 attempts.
    volume type is pure HFS+
    primary MDB is at block 0 0x00
    alternate MDB is at block 0 0x00
    primary VHB is at block 2 0x02
    alternate VHB is at block 1953458174 0x746f67fe
    sector size = 512 0x200
    VolumeObject flags = 0x07
    total sectors for volume = 1953458176 0x746f6800
    total sectors for embedded volume = 0 0x00
 Thu Oct 17 10:33:12 PDT 2019 Disk check done on /dev/sda
disk-check script (I am a code idiot, though I can kind of follow, I have minimal understanding of the full effects). This appear to me that it will skip the HFS disks(?)
Code:
hfs|hfs+j|hfs+jx)   if [ -x /usr/sbin/chkhfs ]; then
                                CHKCMD="chkhfs -a -f"
                            elif [ -x /usr/sbin/fsck_hfs ]; then
                                CHKCMD="fsck_hfs -d -ay"
                            else
                                text="Unsupported filesystem '$2' on device $1 - skipping check"
                                printf "$(date) $text\\n" >> $CHKLOG
                                logger -t "$TAG" "$text"
                            fi ;;
I see this from the original script, found by checking the Diversion website, AMTM page links back here.
https://github.com/RMerl/asuswrt-merlin/wiki/USB-Disk-Check-at-Boot
It currently doesn't handle Apple's hfs although fsck_hfs is provided in the firmware (under /usr/sbin). [HFS is currently left out solely because I'm not an Apple user and I don't know what string fdisk returns for an HFS filesystem.
My conclusion is the the HFS checking was added with the AMTM disk-check script at some point(?). Maybe this is the macOS Catalina update that broke so many things?

Bottom line is I lost all the data on that 1Tb drive attached to the AC86U, macOS Time Machine automatic backups, iPhone archives before software updates. Because I am fanatical about backing up every phone, computer, etc. that I can, I really want to resolve this. At least be able to check the USB flash drive that is EXT4 on reboots.
 
Can I completely disable the disk-check script for a disk, but keep it for others? I ask, since I recently got a MacBook to have iTunes and manage my iPhone, and I am having issues running an addition disk for Time Machine support.

(backstory) I'm really a Linux/Android guy at heart, but age and medical issues have made iOS use mandatory since the apps I need to monitor have poor or no Android support.

I have a 1 Tb drive in the USB 3 slot and a 16Gb flash disk with all SNB utilities in the USB 2 slot. Formatted the 1Tb with the MacBook, and ASUS AC86U had trouble seeing it. Formatted HFS with the Network Map page USB and all ran fine. Then I updated to the new macOS, and all hell broke loose, lost all network connections, router rebooted multiple times. I've disabled Time Machine and removed the drive for now.

Code:
Thu Oct 17 10:33:10 PDT 2019 Probing 'hfs' on device /dev/sda
 Running disk check v2.4, with command 'fsck_hfs -d -ay' on /dev/sda
 /dev/sda: starting
    Using cacheBlockSize=32K cacheTotalBlock=1024 cacheSize=32768K.
 ** Checking HFS Plus volume.
 ** Checking Extents Overflow file.
 ** Checking Catalog file.
 ** Checking Catalog hierarchy.
 ** Checking Extended Attributes file.
    Invalid index key
 (8, 333)
 ** Repairing volume.
 ** Rechecking volume.
 ** Checking HFS Plus volume.
 ** Checking Extents Overflow file.
 ** Checking Catalog file.
 ** Checking Catalog hierarchy.
 ** Checking Extended Attributes file.
    Invalid index key
 (8, 333)
 ** Repairing volume.
 ** Rechecking volume.
 ** Checking HFS Plus volume.
 ** Checking Extents Overflow file.
 ** Checking Catalog file.
 ** Checking Catalog hierarchy.
 ** Checking Extended Attributes file.
    Invalid index key
 (8, 333)
 ** Repairing volume.
 ** Rechecking volume.
 ** Checking HFS Plus volume.
 ** Checking Extents Overflow file.
 ** Checking Catalog file.
 ** Checking Catalog hierarchy.
 ** Checking Extended Attributes file.
    Invalid index key
 (8, 333)
 ** The volume MacBU could not be repaired after 3 attempts.
    volume type is pure HFS
    primary MDB is at block 0 0x00
    alternate MDB is at block 0 0x00
    primary VHB is at block 2 0x02
    alternate VHB is at block 1953458174 0x746f67fe
    sector size = 512 0x200
    VolumeObject flags = 0x07
    total sectors for volume = 1953458176 0x746f6800
    total sectors for embedded volume = 0 0x00
 Thu Oct 17 10:33:12 PDT 2019 Disk check done on /dev/sda
disk-check script (I am a code idiot, though I can kind of follow, I have minimal understanding of the full effects). This appear to me that it will skip the HFS disks(?)
Code:
hfs|hfs j|hfs jx)   if [ -x /usr/sbin/chkhfs ]; then
                                CHKCMD="chkhfs -a -f"
                            elif [ -x /usr/sbin/fsck_hfs ]; then
                                CHKCMD="fsck_hfs -d -ay"
                            else
                                text="Unsupported filesystem '$2' on device $1 - skipping check"
                                printf "$(date) $text\\n" >> $CHKLOG
                                logger -t "$TAG" "$text"
                            fi ;;
I see this from the original script, found by checking the Diversion website, AMTM page links back here.
https://github.com/RMerl/asuswrt-merlin/wiki/USB-Disk-Check-at-Boot

My conclusion is the the HFS checking was added with the AMTM disk-check script at some point(?). Maybe this is the macOS Catalina update that broke so many things?

Bottom line is I lost all the data on that 1Tb drive attached to the AC86U, macOS Time Machine automatic backups, iPhone archives before software updates. Because I am fanatical about backing up every phone, computer, etc. that I can, I really want to resolve this. At least be able to check the USB flash drive that is EXT4 on reboots.
Let me check an idea I have to exclude a device or partition.
 
Bottom line is I lost all the data on that 1Tb drive attached to the AC86U, macOS Time Machine automatic backups, iPhone archives before software updates. Because I am fanatical about backing up every phone, computer, etc. that I can, I really want to resolve this. At least be able to check the USB flash drive that is EXT4 on reboots.
I'm sorry to hear that. But consider this unfortunate incident as helping the advancement of amtm ;)

I just tested it with a device with three partitions (ntfs, vfat and ext4), vfat and ext4 are excluded.
I'm using the UUID for partitions to exclude which is unique.
Code:
/dev/sdb3 with vfat file system exluded from check (UUID="5CFD-3EB7")

Sat Oct 19 18:38:09 CEST 2019 Probing 'ntfs' on device /dev/sdb1
Running disk check v2.5, with command 'ntfsck -a' on /dev/sdb1
ntfsck 3017.7.18.13
Checking NTFS Superblock ...
Device name        : /dev/sdb1
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 5660193280 bytes (5661 MB)
  0.00 percent completed
100.00 percent completed
  0.00 percent completed
100.00 percent completed
  0.00 percent completed
100.00 percent completed
Done NTFS checking and repair on device '/dev/sdb1'.
Syncing device ...
Sat Oct 19 18:38:10 CEST 2019 Disk check done on /dev/sdb1

/dev/sdb2 with ext4 file system exluded from check (UUID="e13e3fe8-7dea-497a-832b-a86f5b959e19")
 
Bottom line is I lost all the data on that 1Tb drive attached to the AC86U, macOS Time Machine automatic backups, iPhone archives before software updates. Because I am fanatical about backing up every phone, computer, etc. that I can, I really want to resolve this. At least be able to check the USB flash drive that is EXT4 on reboots.
I'm not sure that this will solve your problem even if the disk check excludes the drive. From the log file you posted the fundamental problem appears to be that the disk was corrupted. The disk check tried to fix it but couldn't, the same error persisted. There is no evidence (so far) that the corruption was caused by the disk check. Also, whether the disk check runs or not has no bearing on whether or not the router mounts the disk, that's a completely separate process.
 
I'm not sure that this will solve your problem even if the disk check excludes the drive. From the log file you posted the fundamental problem appears to be that the disk was corrupted. The disk check tried to fix it but couldn't, the same error persisted. There is no evidence (so far) that the corruption was caused by the disk check. Also, whether the disk check runs or not has no bearing on whether or not the router mounts the disk, that's a completely separate process.
I didn't even read the error log, glad we have that verbose output of the check.
The exclusion code might still be of use for some so I'll build it in.
 
I didn't even read the error log, glad we have that verbose output of the check.
The exclusion code might still be of use for some so I'll build it in.
Yes, it's definitely an option worth having. I think some people have commented in the past that they'd prefer not to have to wait for their very large disks to be checked. They'd prefer to have the router boot up faster and accept any potential consequences.
 
I'm sorry to hear that. But consider this unfortunate incident as helping the advancement of amtm ;)

I just tested it with a device with three partitions (ntfs, vfat and ext4), vfat and ext4 are excluded.
I'm using the UUID for partitions to exclude which is unique.
Code:
/dev/sdb3 with vfat file system exluded from check (UUID="5CFD-3EB7")

Sat Oct 19 18:38:09 CEST 2019 Probing 'ntfs' on device /dev/sdb1
Running disk check v2.5, with command 'ntfsck -a' on /dev/sdb1
ntfsck 3017.7.18.13
Checking NTFS Superblock ...
Device name        : /dev/sdb1
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 5660193280 bytes (5661 MB)
  0.00 percent completed
100.00 percent completed
  0.00 percent completed
100.00 percent completed
  0.00 percent completed
100.00 percent completed
Done NTFS checking and repair on device '/dev/sdb1'.
Syncing device ...
Sat Oct 19 18:38:10 CEST 2019 Disk check done on /dev/sdb1

/dev/sdb2 with ext4 file system exluded from check (UUID="e13e3fe8-7dea-497a-832b-a86f5b959e19")
I'm not sure that this will solve your problem even if the disk check excludes the drive. From the log file you posted the fundamental problem appears to be that the disk was corrupted. The disk check tried to fix it but couldn't, the same error persisted. There is no evidence (so far) that the corruption was caused by the disk check. Also, whether the disk check runs or not has no bearing on whether or not the router mounts the disk, that's a completely separate process.
I didn't even read the error log, glad we have that verbose output of the check.
The exclusion code might still be of use for some so I'll build it in.
Well, after more investigation, crashing my AC86U a few more times :rolleyes: I finally have it working. I was formatting using the MacBook, but 86U did not like that, so I formatted with the router format utility as HFS+ and that worked, but after doing the first backup, Time Machine on the Macbook complained about the encrypted backup on an unencrypted disk.

I check the encrypt disk option, was prompted to remove the unencrypted backup and start over, so I did. Immediately the AC86U crashed, loosing all ethernet and wifi connections, and the macbook Time Machine stated the backup disk was not available. I unmounted the disk in the router, plugged into the macbook, and reformatted it again, choosing an Apple partition table and Apple extended journaled encrypted file system.

The router did not see the drive, and the "mount" command in a terminal did not show it. I ran the Time Machine setup again in the router, and it completed. Then the router webgui and term cli showed it.
Code:
/dev/sda3 on /tmp/mnt/sda3 type thfsplus (rw,nodev,relatime,umask=0000,uid=0,gid=0,nls=utf8,readahead=1M)
I then set up the macbook again, and it is running an encrypted backup with no router or disk crashes. I have removed the AMTM disk-check script. When the backup completes and I get brave again, I will install the disk-check, reboot the router to let disk-check run and see what breaks. :D o_O

I do not know if the disk was corrupted with the change to encrypted, or if this is another Apple !@#$%&! with the macOS Catalina upgrade. The local Apple Store has gotten to know me well in the last month or so, with iOS 13.x faux pas with my medical apps. They will be well prepared when they see me come in with the MacBook and external drive. :eek: o_O :confused: :oops:
 
Last edited:
Any particular reason why you’re using Apple partition map?

Nope, closing my eyes and throwing darts at the board. :)

After crashing the router about 20 times, formatting the drive ~12 times, setting up Time Machine on the router many times, and on the Macbook many more times, I was looking for solutions. When the Macbook Time Machine kept complaining about the disk encryption, and I had to format it a-g-a-i-n, I looked at all the options in Disk Utility for deleting the old partition and making a new one.

I just tried another method. I usually use a guid partition map and ext4, being a long time Linux user. The Macbook is new to me. I know it is based on Linux, but Apple has changed so much, I'm still on a steep learning curve. So far it is working with no errors in the Macbook or 86U. (fingers crossed)
 
The Macbook is new to me. I know it is based on Linux

That is not true and its one of the misconceptions of an IT world, macOS is not a Linux distro nor it's based on a Linux kernel, macOS uses 'XNU' kernel which is a hybrid of 'Mach' and 'BSD' and its way older than Linux.

For anyone interested, here's a good comparison between macOS and Linux:

https://itsfoss.com/mac-linux-difference/
 
Nope, closing my eyes and throwing darts at the board. :)

Heh, been there. :)

Suspect as others have said, possibly the drive failing thou who knows. I’m using Macs exclusively (not time machine thou) and found HFS+ formatted on the Mac the most suitable in my use case. One thing to note was the permissions; when done formatting the drive on the Mac, select the drive /folders, command I, and change the permissions to “everyone”, otherwise I faced access restrictions and weird errors.

I also religiously backup up the backup. I use superduper myself and it’s been fast (after the first full backup) and solid. I also use diskwarrior, a HD utility that’s saved my behind more times than I can remember.

Catalina seems to be a bag of hurt currently. I’m staying off until... well, until I’m not.

Just sharing my experience and hope your setup stays as stable as a rock.
 
Love amtm, and hearty thanks to all of it's contributors - takes Merlin to another level. That said, with hat in hand, could I humbly suggest an upgrade to the amtm chron job reboot section that would allow for some more complex constructs. Maybe a text version of something like the:

https://crontabgenerator.org

This would allow a little more flexibility in the reboot schedule while keeping the present simplicity for the user. In my case I was looking for a way to reboot every other day. The closest I can get appears to be,

45 3 1-31/2 * *

which is acceptable. Thanks for considering it.
 
Love amtm, and hearty thanks to all of it's contributors - takes Merlin to another level. That said, with hat in hand, could I humbly suggest an upgrade to the amtm chron job reboot section that would allow for some more complex constructs. Maybe a text version of something like the:

https://crontabgenerator.org

This would allow a little more flexibility in the reboot schedule while keeping the present simplicity for the user. In my case I was looking for a way to reboot every other day. The closest I can get appears to be,

45 3 1-31/2 * *

which is acceptable. Thanks for considering it.
I'd have to cut down the options.
Odd or Even days, once or twice a month. Or else this code gets out of hand.
 
Love amtm, and hearty thanks to all of it's contributors - takes Merlin to another level. That said, with hat in hand, could I humbly suggest an upgrade to the amtm chron job reboot section that would allow for some more complex constructs. Maybe a text version of something like the:

https://crontabgenerator.org

This would allow a little more flexibility in the reboot schedule while keeping the present simplicity for the user. In my case I was looking for a way to reboot every other day. The closest I can get appears to be,

45 3 1-31/2 * *

which is acceptable. Thanks for considering it.
@all and @Elmer
Would this do for the reboot scheduler? The selection is either by days or with the presets, only one choice can be set.
Does the selection and explanation make sense?

Pyj8VW3.png
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top