1

I have an old 64MB USB flash-disk which seems to have MBR:

root@3:~# fdisk -lu /dev/sdd

Disk /dev/sdd: 64 MB, 64880640 bytes
2 heads, 54 sectors/track, 1173 cylinders, total 126720 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
Disk identifier: 0x6f20736b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1            2048      126719       62336    6  FAT16
root@3:~# 

/dev/sdd1 is a FAT16 file system:

root@3:~# file -s /dev/sdd1
/dev/sdd1: sticky x86 boot sector, mkdosfs boot message display, code offset 0x3c, OEM-ID " mkdosfs", sectors/cluster 2, root entries 512, Media descriptor 0xf8, sectors/FAT 244, sectors 124672 (volumes > 32 MB) , serial number 0x6b067135, label: "           ", FAT (16 bit)
root@3:~# 

I'm able to mount this /dev/sdd1 partition and read and writes file to it. Now the weird part is, that I'm also able to mount /dev/sdd and I am able to list the files on that file-system. File-sytem on /dev/sdd seems to be created by Windows XP as it used MSDOS5.0 as OEM ID:

root@3:~# file -s /dev/sdd
/dev/sdd: sticky x86 boot sector, code offset 0x3c, OEM-ID "MSDOS5.0", sectors/cluster 2, root entries 512, Media descriptor 0xf8, sectors/FAT 247, heads 255, sectors 126720 (volumes > 32 MB) , serial number 0x50435598, unlabeled, FAT (16 bit)
root@3:~# 

In addition, once I mount the /dev/sdd to /media and execute ls -l /media, one of the files is named "New Text Document.txt". I know that it is possible to create a file-system directly to device without partitions, but in that case there will be no MBR and fdisk should complain that there is no valid partition table.

Am I correct that probably there was a FAT16 file-system created to the whole USB flash-disk under Windows and then later there was a MBR and single partition created to this flash-disk, but area from sector 1 to 2047 was never touched and there was Windows created FAT16 file-system structure in place at least to extent that I was able to mount this with mount utility?

0

It is either the thing you suppose, or maybe the MBR you detect is a protective-MBR and the disk was, possibly, at one point a UEFI boot disk. Do gdisk /dev/sdd for more information about the disk and its partition structure. You'll need the gptfdisk package if you don't have it installed already.

Regardless of the original source of the problem, you can start fresh with a new partition table if you can just clear the top 4mb of the disk to remove all traces of any filesystem or partition table before partitioning/formatting further.

Do:

dd bs=4096 count=1024 if=/dev/zero of=/dev/sdd

...to surely start fresh if you wish to wipe it.

0

This can happen because FAT (both 16 and 32) stores the partition geometry near the start of the first sector (63 and 90 bytes resp.), while the MBR stores it near the end. That makes it possible to have both written at once. GRUB's stage 1 supports both, so it has "unused" areas in both of these places. But in your case, the structures are apparently cross-linked and writing to one will corrupt the other! I suggest that you backup your files, verify them, then WIPE the MBR and then create it again properly. EDIT: It's not a protective MBR because then it wouldn't be visible as a usable FAT system. It would be hidden. Perhaps Windows would prompt you to format it, as is custom with unsupported removable drives.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.