5

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
  • Since you want a FAT32 file system, why not create it in Windows to begin with, then mount it in Linux? Mar 5, 2010 at 2:19
  • Because windows only gives me the option to create a NTFS file system
    – wcoenen
    Mar 5, 2010 at 9:22
  • Linux will mount an NTFS file system too
    – gorilla
    Mar 5, 2010 at 11:14
  • 1
    @gorilla: as shown by the edit I made an hour before your comment, I was already aware of that. I just would have preferred FAT32 because it has better portability without the need to install additional utilities and drivers.
    – wcoenen
    Mar 5, 2010 at 15:06

4 Answers 4

2

You should probably delete MBR before repartitioning. In other words:

dd if=/dev/zero of=/dev/sdc bs=512 count=1
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.

1

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.

1
  • I tried both. Neither resulted in file system recognized by XP or Vista. Though the problem may have been with the way I created the partition, rather than the file system in it.
    – wcoenen
    Mar 14, 2010 at 22:31
1

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/sdc

Note "echo b" is choosing: "W95 FAT32" Device Type

you can check it doing:

fdisk -l /dev/sdc

you should read:

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdc1  *     2048 976766975 976764928 465.8G  b W95 FAT32

Choosing "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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .