RonR wrote: ↑Sat Nov 07, 2020 10:56 pm
scottuf wrote: ↑Sat Nov 07, 2020 10:41 pm
Like I said, just curious. I was playing around trying to learn some stuff and ran sudo file -sL /dev/sda1 and at the end of the output it says FAT (16 bit). I would've thought it'd be 32 bit if FAT32?
pi@raspberrypi:~ $ sudo file -sL /dev/sda1
/dev/sda1: DOS/MBR boot sector, code offset 0x3c+2, OEM-ID "mkfs.fat", sectors/cluster 8, reserved sectors 8, root entries 512, Media descriptor 0xf8, sectors/FAT 256, sectors/track 63, heads 255, hidden sectors 2048, sectors 524288 (volumes > 32 MB), reserved 0x1, serial number 0x6e0d4e61, unlabeled, FAT (16 bit)
I'm not sure what the story is with the 'file' utility, but fdisk reports correctly:
Code: Select all
root@raspberrypi:~# fdisk -l /dev/sdb
Disk /dev/sdb: 29.9 GiB, 32080200192 bytes, 62656641 sectors
Disk model: Flash Drive
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf70b83dd
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 526335 524288 256M c W95 FAT32 (LBA)
/dev/sdb2 526336 62656640 62130305 29.6G 83 Linux
Just because the partition table entry says the partition is FAT32, doesn't mean it is. It could be formatted as anything. In this case it is formatted as FAT16.
I have a similar situation with the SD card on one of my older Pis:
Code: Select all
root@raspi2:~# file -sL /dev/mmcblk0p1
/dev/mmcblk0p1: DOS/MBR boot sector, code offset 0x3c+2, OEM-ID "mkfs.fat", sectors/cluster 4, reserved sectors 4, root entries 512, Media descriptor 0xf8, sectors/FAT 120, sectors/track 16, heads 4, hidden sectors 2048, sectors 120832 (volumes > 32 MB) , reserved 0x1, serial number 0xc0dad596, unlabeled, FAT (16 bit)
root@raspi2:~# fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 7.2 GiB, 7744782336 bytes, 15126528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x7ee80803
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 122879 120832 59M c W95 FAT32 (LBA)
/dev/mmcblk0p2 122880 15126527 15003648 7.2G 83 Linux
So in this case fdisk is not reporting correctly. It is just showing what it knows, which is what the partition table was set to.