I have attached an external USB disk to my debian gnu/linux system. The disk showed up as device /dev/sdc, and I prepared it like this:
- created a single partition with
fdisk /dev/sdc(and some more commands in the interactive session that follows) - formatted the partition with
mkfs.msdos /dev/sdc1
If I then attach the USB disk to a Windows XP or Vista system, then no new drive becomes available. The disk and its partition show up fine in the disk managment tool under "computer management", but apparently the file system in the partition is not recognized.
How do I create a FAT32 file system which can actually be used in windows?
edit: I've given up on this and went with a NTFS file system created by windows. In debian lenny this can be mounted read-write but apparently it requires you to install the "ntfs-3g" package and explicitly pass the -t ntfs-3g option to the mount command.
4 Answers
You should probably delete MBR before repartitioning. In other words:
dd if=/dev/zero of=/dev/sdc bs=512 count=1 If you want a GUI, I would recommend using Gparted (link to Live cd - however, it is in most repositories) - it works very well.
With Gparted, you can create, delete, move and change partitions and file systems - very easily.
You can create/format to NTFS or Fat32 using this which should both be Windows and Linux compatible.
I believe mkfs.msdos creates a FAT filesystem (the one with 8.3 file naming conventions).
Its mkfs.vfat that creates a FAT32 filesystem which is accessible from Windows too (since I've tried this). And it supports long filenames.
The point of being linux and windows compatible is doing this:
dd if=/dev/zero of=/dev/sdc bs=512 count=1
(echo o; echo n; echo p; echo 1; echo; echo; echo t; echo b; echo w) | fdisk /dev/sdcNote "echo b" is choosing: "W95 FAT32" Device Type
you can check it doing:
fdisk -l /dev/sdcyou should read:
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 976766975 976764928 465.8G b W95 FAT32Choosing "echo b" worked for me. The disk was checked and worked well under windows XP, windows 7, unix (i dont tried under mac but FAT32 normally works)
Somebody tried "echo c" to get "W95 FAT32 (LBA)" device type but it dont worked for me