Hi Bob, It was 7 years ago, but today I saw a similar message with a USB Thumb drive:nsh> ehci_waiter: connected
nsh> ls /dev /dev: console null sda ttyS0 nsh> mount -t vfat /dev/sda /mnt fat_checkbootrecord: WARNING: Signature: aa55 FS sectorsize: 20487 HW sectorsize: 512 nsh> Maybe it sector size is wrong, this is a USB Stick that came with my 3D Printer and it was support to work, at least it mounts correctly and I can see the content: nsh> ls /mnt /mnt: System Volume Information/ Delta filament barrel base_Hyper K1C air filter-K1C_0.4_PLA-CF_37 K1C_supplementary files_EN_V1.4. Logo filament barrel base_Hyper Side fan cowl_Generic-ABS_47m.gc 3DBenchy.gcode 600S-TEST_Hyper PLA_7m.gcode CR4CU220812S11_ota_img_V1.3.3.30 usb-sniffer-v6-Case_PLA_37m52s.g nsh> If you can share more info about your debug process for that similar issue, it could help. BR, Alan On Sun, Jul 22, 2018 at 2:15 PM <bob.feret...@rafresearch.com> wrote: > OK. Works for me. Let's consider this issue "Solved". > > On Friday, July 20, 2018 at 6:21:38 PM UTC-7, bob.fe...@rafresearch.com > wrote: >> >> I have been observing the below error messages every time I automount an >> SD-card. >> >> fat_checkbootrecord: ERROR: Signature: aa55 FS: 0 HW sectorsize: 512 >> (That is with a new, manufacturer formatted SD-card. After Linux >> re-formats the card it's FS: 36352.) >> >> It did not seem to cause any failures, so I made it a lower priority for >> investigation. Now that I had a bit of time to look further, these are my >> initial findings. >> >> First let's refresh our memories with the FAT32 file system structure. >> >> Master Boot Record (MBR) located in the first sector of a SD-card (sector >> 0x0). >> It contains executable boot code, four partition entries, and a 0x55AA >> signature in bytes 510 & 511. >> >> FAT32 Boot Record located at sector 0x800. >> This sector contains a jump instruction, BytesPerSector, >> SectorsPerCluster, and all of the other things that fs/fat/fs_fat32.h >> claims are in the MBR. Also there is a 0x55AA signature in bytes 510 & 511. >> >> The printf() function that generates this error message is... >> if (MBR_GETSIGNATURE(fs->fs_buffer) != BOOT_SIGNATURE16 || >> MBR_GETBYTESPERSEC(fs->fs_buffer) != fs->fs_hwsectorsize) >> { >> ferr("ERROR: Signature: %04x FS sectorsize: %d HW sectorsize: %d\n", >> MBR_GETSIGNATURE(fs->fs_buffer), >> MBR_GETBYTESPERSEC(fs->fs_buffer), >> fs->fs_hwsectorsize); >> >> return -EINVAL; >> } >> >> The problem is that is that fat is really reading these fields from the >> MBR (sector 0) when they are in the FAT32 Boot Record located at sector >> 0x800. >> >> I am posting this to the Group, because I don't know how far this >> confusion has spread in the fatfs code. This aspect of it seems to have >> only cosmetic consequences, but I am still seeing occasional automount bind >> failures. (Not debounce related). And I am wondering if this MBR vs FAT32 >> Boot Record confusion has been more widespread than this cosmetic issue. >> >> Has anyone else been noticing anomalies during mount or automount? >> >> Does anyone know the history of this code and can shed some light on >> other sections that can have been infected by the MBR vs FAT32 Boot Record >> confusion? >> >> Regards, >> Bob Feretich >> >> -- > You received this message because you are subscribed to the Google Groups > "NuttX" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to nuttx+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. >