[Cialug] Cloning FAT32 secret?

Zachary Kotlarek zach at kotlarek.com
Fri Jul 16 19:03:03 CDT 2010


On Jul 16, 2010, at 10:32 AM, L. V. Lammert wrote:

> Tried a number of ways to clone a FAT32 (W98) drive for an embedded
> system:
> 
>> partimage backup/restore
>> dd copy of partition
> 
> Both created a copy of the partition with files, but neither leaves a
> usable/bootable partition entry! (Tried both FAT32 & FAT32LBA.)


> In addition, dd'ing the [466b] MBR DNW



dd works fine. There's nothing magic about FAT file systems that breaks bit-wise copies.

I'm not sure what you mean by "466 b", but based on that and your "fdisk sees junk" comments I'm guessing you didn't correctly copy the partition map.

The MBR is 512 B long and the actual partition map is 64 B starting at 0x1BE. If you plan to boot directly you need the first 440 B for the bootloader, and you definitely need the final 66 bytes to get the partition map and magic number, so unless there's some good reason to avoid it I'd just copy the whole thing.

Or if you're lazy you can just dd the entire disk instead of the specific partition.

http://en.wikipedia.org/wiki/Master_boot_record

	Zach

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2746 bytes
Desc: not available
Url : http://cialug.org/pipermail/cialug/attachments/20100716/339d89b8/attachment.bin 


More information about the Cialug mailing list