formatting usb flash drive as ext2

formatting usb flash drive as ext2

Post by anonymou » Mon, 19 Jan 2004 05:25:27


The CompUsa flash drive I purchased appears to be vfat formatted and
works fine when mounted as such. However, I would like to format it as
ext2. Do I simply treat it as another disk? Is it as simple as using
fdisk to delete the vfat partition(s) and create my ext2 partition,
followed by using mke2fs? My google searches haven't turned up anything
definitive on this subject. Using the fdisk p command yields the
following output which makes me wonder whether formatting as ext2 is
safe or possible:

~ 1000# mount -t vfat /dev/sda1 /mnt/usb
~ 1001# fdisk /dev/sda1

Command (m for help): p

Disk /dev/sda1: 16 heads, 32 sectors, 1006 cylinders
Units = cylinders of 512 * 512 bytes

Device Boot Start End Blocks Id System
/dev/sda1p1 ? 3749905 4813258 272218546+ 20 Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(356, 97, 46) logical=(3749904, 3, 15)
Partition 1 has different physical/logical endings:
phys=(357, 116, 40) logical=(4813257, 14, 19)
Partition 1 does not end on cylinder boundary:
phys=(357, 116, 40) should be (357, 15, 32)
/dev/sda1p2 ? 2598017 3650705 269488144 6b Unknown
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(288, 110, 57) logical=(2598016, 0, 11)
Partition 2 has different physical/logical endings:
phys=(269, 101, 57) logical=(3650704, 1, 10)
Partition 2 does not end on cylinder boundary:
phys=(269, 101, 57) should be (269, 15, 32)
/dev/sda1p3 ? 1052714 3783892 699181456 53 OnTrack DM6 Aux3
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(345, 32, 19) logical=(1052713, 10, 16)
Partition 3 has different physical/logical endings:
phys=(324, 77, 19) logical=(3783891, 3, 15)
Partition 3 does not end on cylinder boundary:
phys=(324, 77, 19) should be (324, 15, 32)
/dev/sda1p4 * 2723883 2723924 10668+ 49 Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(87, 1, 0) logical=(2723882, 2, 16)
Partition 4 has different physical/logical endings:
phys=(335, 78, 2) logical=(2723923, 13, 8)
Partition 4 does not end on cylinder boundary:
phys=(335, 78, 2) should be (335, 15, 32)

Partition table entries are not in disk order



Thank you for your help,

Peter
 
 
 

formatting usb flash drive as ext2

Post by Dances Wit » Mon, 19 Jan 2004 05:55:25

On Sat, 17 Jan 2004 20:25:27 GMT, anonymous staggered into the Black Sun
and said:

Yep. Heck, don't delete and recreate the partition; just use fdisk to
change the type from 0x0b (or whatever) to 0x83, then mke2fs the
partition. If you can live with only being able to access the drive
from Linux machines, it should work fine. The real reason most USB
flash drives are VFAT is because that's the lowest common denominator
for filesystems. (Actually, if I were you, I'd leave the thing as VFAT
unless I had some really pressing need for filesystem permissions,
symlinks, device files, etc. on your drive. For a data dump with no
security, VFAT works OK.)

[snip]

You Mean "fdisk /dev/sda". It's meaningless to run fdisk on a
partition, and running it on a partition will generate really bizarre
output like the 2 lines above. Try it. HTH,

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
http://www.yqcomputer.com/ / Hire me!
-----------------------------/ http://www.yqcomputer.com/ ~mhgraham/resume

 
 
 

formatting usb flash drive as ext2

Post by anonymou » Tue, 20 Jan 2004 09:46:44


Thanks. I knew that.


Thanks for catching my typo. I know better, but missed my mistake.

Thank you again,

Peter