[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: 16GB USB Drive Not Accessible



Christopher A. Williams wrote:
...

Now, one last question: what's the flag to format a FAT32 partition with
mkfs? I saw options for pretty much everything but that. I'm probably
just suffering from not having had my first cup of coffee... :)


I deal with this often, as its part of my job to produce bootable pen drives and CF cards. I like using pungi and revisor to roll a product specific distro, and using livecd tools for copying them to the pen drives.

Most of this is scripted for convenience, but all new drives go through a process like this:

Stomp on the MBR:

cat /usr/lib/syslinux/mbr.bin >/dev/${disc}

That particular file is a generic GPL MBR.  Its part of the syslinux rpm.

Run fdisk to delete all partitions and recreate just what is necessary -- the script for that is kinda hard to read unless you are intimate with fdisk, so I won't post it here to prevent confusion.

Be sure to tag the primary (assuming 1 here) partition as bootable.

Then to format:

mkfs -t vfat -F 32 -n "$name" /dev/${disc}1

Some vendors like to really mess with their thumb drives, requiring a bad sector check during format. Add a -c to the above for that. It takes a bit longer, but might help on a stubborn drive.

Good luck!



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]