lucky13
Group: Members
Posts: 1478
Joined: Feb. 2007 |
|
Posted: May 20 2008,21:47 |
|
Okay, first step. Read through this first.
Open a terminal and enter this (assuming it's the only USB device and would be detected at /dev/sda):
Code Sample | sudo cfdisk /dev/sda |
If you get any errors and/or it fails to load, try this:
Code Sample | sudo cfdisk -z /dev/sda |
This second one (with -z) will start with a zero partition table (edit: to clarify, that flag causes cfdisk to ignore any existing partition table and to overwrite it with a new one).
You should be able to set up the partition(s) on it now. You can allocate it all as one partition or however you want. Just remember that Windows is picky about the first partition on devices being FAT -- which should be moot if you're only using one partition and it's FAT. Set up at least one *primary* partition. If you're making only one, choose the whole disk (whatever number in MB it offer). When you have the partition(s) set up, you need to set the filesystem type (toggle the commands on bottom and use the "type" command). When it's set up the way you want, select "write." It will prompt you if you're sure you want to do write it. If it looks right, then go ahead and type "yes" (it requires full assent, not y or n). Once it confirms it's written the table you can safely exit. It will tell you that it's lacking a bootable partition; don't bother toggling it as bootable if you're not going to boot from it (even though it won't hurt if it's toggled bootable).
Next, you'll need to create the filesystem. Make sure the device isn't mounted (cat /etc/mtab); umount it if it's mounted. You'll use mkdosfs for this. I'm going to presume you're making one partition (sda1). If you set up the partition for FAT16, you should just need to use the command by itself (see below):
Code Sample | sudo mkdosfs /dev/sda1 |
If you want FAT32, you'll need to flag that:
Code Sample | sudo mkdosfs -F 32 /dev/sda1 |
(You can use the -F 16 flag to *make sure* you write FAT16.)
Then it should quickly give you another prompt. Double check your fstab entry to insure it's not set up for a different filesystem (and to see if hotplug has assigned a point without any further intervention). If you want to be safe, you can edit fstab so the filesystem is set to "auto."
You're looking for two lines in /etc/fstab like these (this is mine -- yours will be sda1 if it's the first USB device inserted):
Code Sample | # Added by KNOPPIX /dev/sdb1 /mnt/sdb1 auto noauto,users,exec 0 0 |
in which "auto" could be listed as vfat, etc., instead. Go ahead and set it on auto if it isn't and cross your fingers.
Then try to mount (using the appropriate point for your device):
Code Sample | mount /mnt/sdb1 |
Hopefully you'll get a prompt quickly and be good to go. Don't forget to umount before removing the device.
---------------------
I just walked through this with a zip disk (mine are all ext2; used my USB zip drive) using the "cfdisk -z" and type=06 (FAT16) and then used "mkdosfs -F 16" to make sure DSL doesn't have any issues. This is the line from /etc/mtab showing how it's mounted: /dev/sdb1 /mnt/sdb1 msdos rw,nosuid,nodev 0 0
Let me know if you need any clarification or if you run into any more problems.
edit: Just to make sure it correctly applies/handles FAT32 (I already know it does), I ran through the same process setting type=0B (Win95 FAT 32) in cfdisk and then used "mkdosfs -F 32". Remounted: /dev/sdb1 /mnt/sdb1 vfat rw,nosuid,nodev 0 0
So I know it should work either way barring any strange quirks with your particular device.
-------------- "It felt kind of like having a pitbull terrier on my rear end." -- meo (copyright(c)2008, all rights reserved)
|