OSDev.org

The Place to Start for Operating System Developers
It is currently Sat May 25, 2019 1:20 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: [SOLVED] mkfs.vfat problem
PostPosted: Thu Jul 09, 2015 12:07 pm 
Offline

Joined: Sun Jan 18, 2009 2:12 am
Posts: 16
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.

Top
 Profile  
 
 Post subject: Re: mkfs.vfat problem
PostPosted: Thu Jul 09, 2015 2:16 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 1522
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.


Top
 Profile  
 
 Post subject: Re: mkfs.vfat problem
PostPosted: Fri Jul 10, 2015 4:42 am 
Offline

Joined: Sun Jan 18, 2009 2:12 am
Posts: 16
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.


Top
 Profile  
 
 Post subject: Re: [SOLVED] mkfs.vfat problem
PostPosted: Fri Jul 10, 2015 5:03 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 3363
Location: Chichester, UK
What about mtools?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group