[SOLVED] mkfs.vfat problem

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
Alex
Posts: 16
Joined: Sun Jan 18, 2009 2:12 am

[SOLVED] mkfs.vfat problem

Post by Alex »

I am searching for a way to format my floppy’s with a new FAT12 file-system.

The problem is that when i use the mkfs.vfat command like this:
  • sudo mkfs.vfat -v -I -c -D 0x00 -f 2 -F 12 -h 0 -r 224 -R 1 -s 1 -S 512 -M 0xF8 /dev/sdg 1440
the following output is:
  • mkfs.fat 3.0.26 (2014-03-07)
    /dev/sdg has 1 head and 3 sectors per track,
    hidden sectors 0x0000;
    logical sector size is 512,
    using 0xf8 media descriptor, with 2880 sectors;
    drive number 0x00;
    filesystem has 2 12-bit FATs and 1 sector per cluster.
    FAT size is 9 sectors, and provides 2847 clusters.
    There is 1 reserved sector.
    Root directory contains 224 slots and uses 14 sectors.
    Volume ID is f9d9d583, no volume label.
    Searching for bad blocks 224... 608... 864... 1264...
the problem is that it formats the floppy with 1 head and 3 sectors per track,
but a normal floppy does have 2 heads and 18 sectors per track!

When i use the comand like this to make a floppy image:
  • mkfs.vfat -v -I -c -D 0x00 -f 2 -F 12 -h 0 -r 224 -R 1 -s 1 -S 512 -M 0xF8 -C ./Floppy.img 1440
i get this output:
  • mkfs.fat 3.0.26 (2014-03-07)
    ./Floppy.img has 2 heads and 18 sectors per track,
    hidden sectors 0x0000;
    logical sector size is 512,
    using 0xf8 media descriptor, with 2880 sectors;
    drive number 0x00;
    filesystem has 2 12-bit FATs and 1 sector per cluster.
    FAT size is 9 sectors, and provides 2847 clusters.
    There is 1 reserved sector.
    Root directory contains 224 slots and uses 14 sectors.
    Volume ID is fde3c95f, no volume label.
and this is right!!!
Why is it right when i make a image and wrong when i want to format a real floppy???


I am working with Ubuntu 14.04LTS
I am using a USB-Floppy drive!
Last edited by Alex on Fri Jul 10, 2015 5:01 am, edited 1 time in total.
Octocontrabass
Member
Member
Posts: 5512
Joined: Mon Mar 25, 2013 7:01 pm

Re: mkfs.vfat problem

Post by Octocontrabass »

Alex wrote:Why is it right when i make a image and wrong when i want to format a real floppy???
Alex wrote:I am using a USB-Floppy drive!
You answered your own question.

The heuristics in dosfstools do not recognize /dev/sdg as a floppy disk, so the floppy disk parameters aren't applied.
Alex
Posts: 16
Joined: Sun Jan 18, 2009 2:12 am

Re: mkfs.vfat problem

Post by Alex »

Thank you Octocontrabass. That sounds plausible.
So I have to find another way to accomplish this task.
The next way, i can think of, is to make the floppy image and "dd" it on the floppy.
I had thought there would be a simple command, that can format a floppy in a usb-floppy-drive.
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: [SOLVED] mkfs.vfat problem

Post by iansjack »

What about mtools?
Post Reply