Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
There's two steps to formatting: First you create the right type of partition, then you format the partition.
You can't format a Linux partition with FAT. You need to delete both partitions & create new FAT partition(s) with fdisk, cfdisk, or other partitioner. THEN run mkdosfs on them.
Here are the steps. I just did this with a removable USB drive.
NOTE: This will wipe out any existing data on the removable drive!
1. fdisk /dev/sda
2. press 'p' to print the partitions (make sure you're looking at the right drive!)
3. press 'd' to delete a partition
4. if prompted, press '1' to select first partition.
5. press 'd' again and the other partition will be immediately deleted.
6. press 'n' to add a new partition
7. press 'p' to select "primary"
8. enter partition number '1'
9. select the bounds for the partition (it would be easiest to just hit 'enter' on each option.)
10. after creating the partition, press 't' to change the partition's type.
11. enter type number 0c
optionally, type 'p' to view the partition table and ensure that the type is FAT32
12. write the changes to the disk; type 'w'
13. fdisk will quit after saving changes.
14. run mkfs -t vfat /dev/sda1
This creates the file system.
15. create a directory where you want to mount the drive
16. mount the drive: mount -t vfat /dev/sda1 /[your directory name here]
Be sure to umount the drive before removing it to avoid losing data!
Disk /dev/sda: 1007 MB, 1007419392 bytes
31 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 1922 * 512 = 984064 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 814 782223 c W95 FAT32 (LBA)
/dev/sda2 815 1023 200849 c W95 FAT32 (LBA)
After running;
mkfs -t vfat /dev/sda1
mkfs -t vfat /dev/sda2
# fdisk -l /dev/sda
Code:
Disk /dev/sda: 1007 MB, 1007419392 bytes
31 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 1922 * 512 = 984064 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 814 782223 c W95 FAT32 (LBA)
/dev/sda2 815 1023 200849 c W95 FAT32 (LBA)
It looks the same as above, still "W95 FAT32"
I have been running to the same situation before. I can't get FAT32 FS. It frustrated me.
B.R.
satimis
Sorry, but I'm not clear on what you're trying to do.
Yes, it says W95 FAT32, but either Linux or Windows can mount/read/write this partition.
To mount in Linux, all you have to do is mount -t vfat /dev/sda1 /[mountpoint]
Or connect to a Windows (98SE or later) system and it should mount also.
Yes, after running mkfs it SHOULD still look the same. It is simply formatting the partition (creating the filesystem on an "empty" partition). So within fdisk, you should see exactly the same thing before and after you run mkfs.
What exactly are you wanting to do here? There is no such thing as a native Linux FAT32 partition, to my knowledge, because FAT32 is a M$ technology. (You gurus out there correct me if I'm wrong about this!) But Linux reads/writes the FAT32 filesystem just fine.
I have DSL 2.2b installed on a pendrive which was formated on FAT16 ZIP geometry. It can be booted on USB-ZIP option (BIOS) and failed on USB-HDD. I also tried format the pendrive FAT16 without zip geometry. It still failed to boot on USB-HDD.
USB-HDD supports FAT32 therefore I tried to make another test with the pendrive formatted as FAT32.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.