thelonelycoder
Part of the Furniture
Let me check that with an SSD and HDD.This was on my AC86U with a 2TB ext4 HDD.
The original script I copied the code from will act the same, I'm sure.
Let me check that with an SSD and HDD.This was on my AC86U with a 2TB ext4 HDD.
This happened to me when I first got the old script. It stayed that way until a hint from you guys. dos2unix fixed it and it started working. Not sure if this is relevant information.
pre-mount is 0755, while the actual check file disk-check does not need 0755 since it is sourced from pre-mount and therefore inherits the rights.Line endings on the script are fine, the file permissions were alittle off but that again was irrelevant (-rw-rw-rw-).
80GB SSD is fine:I'll take a look in the morning if @thelonelycoder hasn't found the cause by then, I'm sure its a simple scripting error somewhere.
Mar 5 23:55:21 amtm: Running disk check 'e2fsck -p' on /dev/sdb1
Mar 5 23:55:21 amtm: Disk check done on /dev/sdb1
Mar 5 23:55:21 syslog: USB ext4 fs at /dev/sdb1 mounted on /tmp/mnt/ext4ssd
Mar 5 23:55:21 usb: USB ext4 fs at /dev/sdb1 mounted on /tmp/mnt/ext4ssd.
Mar 5 23:55:21 kernel: EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: user_xattr
The check script disk-check is directly created and written from within amtm, the code is 100% unix EOL.This happened to me when I first got the old script. It stayed that way until a hint from you guys. dos2unix fixed it and it started working. Not sure if this is relevant information.
In the terminal, enter:I'm using EXT2 for flash drive and EXT4 for MyBook 4TB.
fdisk -l
Disk /dev/sda: 8020 MB, 8020819968 bytes
247 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 15314 * 512 = 7840768 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 511 3912696 83 Linux
/dev/sda2 512 1022 3912727 83 Linux
Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 9729 78148161 83 Linux
pre-mount is 0755, while the actual check file disk-check does not need 0755 since it is sourced from pre-mount and therefore inherits the rights.
80GB SSD is fine:
Code:Mar 5 23:55:21 amtm: Running disk check 'e2fsck -p' on /dev/sdb1 Mar 5 23:55:21 amtm: Disk check done on /dev/sdb1 Mar 5 23:55:21 syslog: USB ext4 fs at /dev/sdb1 mounted on /tmp/mnt/ext4ssd Mar 5 23:55:21 usb: USB ext4 fs at /dev/sdb1 mounted on /tmp/mnt/ext4ssd. Mar 5 23:55:21 kernel: EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: user_xattr
FSTYPE=$(fdisk -l ${1:0:8} | grep $1 | cut -c55-65)
admin@RT-AC86U-2EE8:/jffs/scripts# fdisk -l ${1:0:8}
Disk /dev/mtdblock0: 95 MB, 95027200 bytes
255 heads, 63 sectors/track, 11 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock0 doesn't contain a valid partition table
Disk /dev/mtdblock1: 95 MB, 95027200 bytes
255 heads, 63 sectors/track, 11 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock1 doesn't contain a valid partition table
Disk /dev/mtdblock2: 8 MB, 8388608 bytes
255 heads, 63 sectors/track, 1 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock2 doesn't contain a valid partition table
Disk /dev/mtdblock3: 1 MB, 1048576 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock3 doesn't contain a valid partition table
Disk /dev/mtdblock4: 99 MB, 99614720 bytes
255 heads, 63 sectors/track, 12 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock4 doesn't contain a valid partition table
Disk /dev/mtdblock5: 99 MB, 99614720 bytes
255 heads, 63 sectors/track, 12 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock5 doesn't contain a valid partition table
Disk /dev/mtdblock6: 4 MB, 4587520 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock6 doesn't contain a valid partition table
Disk /dev/mtdblock7: 4 MB, 4587520 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock7 doesn't contain a valid partition table
Disk /dev/mtdblock8: 50 MB, 50331648 bytes
255 heads, 63 sectors/track, 6 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock8 doesn't contain a valid partition table
Disk /dev/mtdblock9: 8 MB, 8388608 bytes
255 heads, 63 sectors/track, 1 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock9 doesn't contain a valid partition table
Found valid GPT with protective MBR; using GPT
Disk /dev/sda: 3906963456 sectors, 3057M
Logical sector size: 512
Disk identifier (GUID): 8f22e256-1fcf-4034-8764-a8c67d3bcf65
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3906963422
Number Start (sector) End (sector) Size Code Name
1 2048 3906961407 1862G 0700 Basic data partition
admin@RT-AC86U-2EE8:/jffs/scripts#
Disk /dev/sda: 30965760 sectors, 14.7G
Logical sector size: 512
Disk identifier (GUID): 4e0a6ba0-3da4-03a7-e89a-821369cfe900
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 30965726
Number Start (sector) End (sector) Size Code Name
1 2048 30963711 14.7G 0700 Basic data partition
fdisk: device has more than 2^32 sectors, can't use all of them
Found valid GPT with protective MBR; using GPT
Disk /dev/sdb: 4294967295 sectors, 2047G
Logical sector size: 512
Disk identifier (GUID): 4306a34d-4557-45fd-a196-e2d6bd6cabd5
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 7814035422
Number Start (sector) End (sector) Size Code Name
1 4096 7814035415 3726G 0700 Linux data partition
While booting pre-mount is called with the device as argument, hence $1 would be /dev/whateverdeviceI assume $1 in my case would be /dev/sda1 ... Unfortunately that string isn't showing in fdisk to grep, to essentially we are grepping nothing hence the case statement failing.
Number Start (sector) End (sector) Size Code Name
1 2048 3906961407 1862G 0700 Basic data partition
fdisk -l ${1:0:8} | grep /dev/sdb | cut -c55-65
Linux data partition
But the problem is the identifier, same for @Klaus :
I'd have to do some digging, but Basic data partition is nowhere near Linux.Code:Number Start (sector) End (sector) Size Code Name 1 2048 3906961407 1862G 0700 Basic data partition
And likely neither is Linux data partition @Klaus , what is the return of:
It will be:Code:fdisk -l ${1:0:8} | grep /dev/sdb | cut -c55-65
Which is not recognised since the script only looks for Linux.Code:Linux data partition
fdisk: device has more than 2^32 sectors, can't use all of them
It's 1 o'clock in the morning, for both of us. Good night!The output of that command is actually:
Code:fdisk: device has more than 2^32 sectors, can't use all of them
Many of us appreciate your work to solve simple issues like this. I ran the script you linked on GitHub and removed it before AMTM update.Aargh...
No one ever complained or made a remark about the original filesystem check script not working. At least I have never come across a complaint.
It has the same limitation that it only supports a small set of partitions. For lack of testing out the identifiers for other types, as the author writes in his verbose tutorial.
So here I am, trying to help users fix their file errors by simplifying installation of said script and what do I end up in?
Some sort of Armageddon! With both sides only intending to do good.
But we'll sort it out and will end up with another great addition to the collection of Asuswrt-Merlin scripts.
Disk /dev/sda: 8020 MB, 8020819968 bytes
247 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 15314 * 512 = 7840768 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 511 3912696 83 Linux
/dev/sda2 512 1022 3912727 83 Linux
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 5637 45279171 83 Linux
/dev/sdb2 5638 121601 931480830 83 Linux
Tue Mar 6 09:45:41 MEZ 2018 Starting 'e2fsck -p install'
hddsecond: clean, 550/58220544 files, 3735214/232870207 blocks
Tue Mar 6 09:45:43 MEZ 2018 Starting 'e2fsck -p install'
hddfirst: clean, 7084/2834432 files, 675643/11319792 blocks
Tue Mar 6 10:29:34 CET 2018 Starting 'fatfsck -a install'
fatfsck 3014.9.11
Checking boot region...
Error: Not a FAT volume - Invalid end of sector signature: 0x0
Floating point exception
Looks like pre-mount it is seen as FAT, but partitions are ext* and recognized once mounted.This is what I get on an ext2 USB flash drive (though formatted using a 3rd party tool on Windows, maybe that causes problems?):
Code:Tue Mar 6 10:29:34 CET 2018 Starting 'fatfsck -a install' fatfsck 3014.9.11 Checking boot region... Error: Not a FAT volume - Invalid end of sector signature: 0x0 Floating point exception
fdisk -l
To format disks I use a physical CentOS box, so that might be the reason why it reports a proper Linux identifier.
No, please no. It will not do that.@thelonelycoder - Will amtm menu option 3 update Entware to the 64-bit version for the RT-AC86U? Or should that be done manually? Thanks...
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!