OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 9:09 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 42 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: The 1.44MB FAT32 floppy disk
PostPosted: Wed Jun 08, 2016 3:13 pm 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1146
SpyderTL wrote:
Not sure about Linux. Never tried to format a floppy with FAT32, or EXT4. Anyone know if this is possible?
I once tried to format a floppy as ext3, because firstly I wanted a modern filesystem on my floppy, secondly I wanted to make a bootable Linux disk and ext3 seemed like an obvious choice (I didn't know better at the time) and thirdly I wanted a journaling filesystem on the floppy in case I accidentally ejected the disk halfway through a filesystem operation (lol, I do that a lot even today - I used to forget to look at the drive LED before ejecting the disk, and now I forget to check if the drive noise has stopped before ejecting - I remember that the LED and the noise didn't always even tie up, and I think I used to have to wait a few seconds after the LED went off before ejecting the disk, otherwise the drive motor was still turning and I would damage the disk when I ejected it - the pressure placed on the disk when ejecting it while it's turning tends to scratch the disk inside).

_________________
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing


Top
 Profile  
 
 Post subject: Re: The 1.44MB FAT32 floppy disk
PostPosted: Wed Jun 08, 2016 3:16 pm 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1146
Kazinsal wrote:
This is still a bad hack. A clever hack would be adding support for DMF or XDF.
Are those open, documented, and/or reverse-engineerable formats?
Kazinsal wrote:
Or something actually useful, like giving MikeOS the ability to use subdirectories.
lol

The point of putting FAT32 on a floppy, MikeOS, OSdev, and messing around with computers in general, is because it's fun. We like to do things so that we can say "it can be done" or "I managed to do something new" or "I managed to make something work in a way that it wasn't intended - bonus points if I can get it to work reliably". There may be those who do these things with the hope of some other benefit, financial or otherwise, but for most of us it's about having fun. As I like to quote, "just for fun".

_________________
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing


Top
 Profile  
 
 Post subject: Re: The 1.44MB FAT32 floppy disk
PostPosted: Thu Jun 09, 2016 1:12 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
onlyonemac wrote:
Are those open, documented, and/or reverse-engineerable formats?

DMF and XDF are supported by fdutils, so you can use that as your documentation.


Top
 Profile  
 
 Post subject: Re: The 1.44MB FAT32 floppy disk
PostPosted: Thu Jun 09, 2016 2:45 am 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1074
After playing around with Arch Linux a little today, I found that it would happily format floppy disks with ext2, ext3, ext4 (with a warning), fat and vfat. It may also format xdf, but I could not figure out the parameters that it wanted.

None of the Linux distros seem to run the floppy module by default any more, so I had to run it manually... :roll:

_________________
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott


Top
 Profile  
 
 Post subject: Re: The 1.44MB FAT32 floppy disk
PostPosted: Thu Jun 09, 2016 7:44 am 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1146
SpyderTL wrote:
After playing around with Arch Linux a little today, I found that it would happily format floppy disks with ext2, ext3, ext4 (with a warning), fat and vfat.
I remember that ext3 apparently wouldn't fit on a floppy, but perhaps there was a configuration option that I missed. Are these properly formatting floppies (i.e. reported capacity of ~1.44MB and able to function correctly) or are they floppies with large reported capacities and loads of bad sectors?

_________________
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing


Top
 Profile  
 
 Post subject: Re: The 1.44MB FAT32 floppy disk
PostPosted: Thu Jun 09, 2016 2:00 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
SpyderTL wrote:
After playing around with Arch Linux a little today, I found that it would happily format floppy disks with ext2, ext3, ext4 (with a warning), fat and vfat. It may also format xdf, but I could not figure out the parameters that it wanted.

DMF and XDF are just FAT12 with specific parameters. What makes them special is that they physically use more of the floppy disk's surface for storing data. On a 3½-inch high density floppy disk, DMF increases the physical capacity from 1440 KiB to 1680 KiB, and XDF increases it to 1836 KiB.

The physical format for DMF is very simple, so you can easily put whatever filesystem you want on a DMF-formatted disk. The same is not true for XDF; you typically need special utilities to access an XDF-formatted disk, and those utilities will expect a very specific filesystem.


Top
 Profile  
 
 Post subject: Re: The 1.44MB FAT32 floppy disk
PostPosted: Thu Jun 09, 2016 3:16 pm 
Offline
Member
Member
User avatar

Joined: Wed Jul 13, 2011 7:38 pm
Posts: 558
XDF is not FAT. XDF is a different low level format on the floppy disk entirely and is totally separate from FAT.

It's more like a layer 2 change, where the filesystem is a layer 3 change.


Top
 Profile  
 
 Post subject: Re: The 1.44MB FAT32 floppy disk
PostPosted: Fri Jun 10, 2016 12:10 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
DMF and XDF describe both the physical sector layout and the filesystem written to those sectors. If you change the filesystem, it's no longer DMF/XDF. :wink:


Top
 Profile  
 
 Post subject: Re: The 1.44MB FAT32 floppy disk
PostPosted: Fri Jun 10, 2016 12:38 am 
Offline
Member
Member
User avatar

Joined: Wed Jul 13, 2011 7:38 pm
Posts: 558
DMF does not use a different filesystem. A regular FAT12 driver can read a DMF-formatted floppy with a FAT12 filesystem on it provided the FAT12 driver isn't so daft as to presume there are 18 sectors per track on the floppy and instead reads the BPB, and so long as the floppy driver recognizes that there are 21 sectors per track on the floppy and adjusts its LBA-to-CHS calculations accordingly.

XDF is a specification for modifying the sector layout of floppy disk tracks, not for the filesystem on top of it. In fact, IBM floppies that were XDF-formatted can be read by a plain FAT12 driver so long as the underlying floppy driver also recognizes the layout of the tracks and the sector interleaving and adjusts its LBA-to-CHS accordingly.

Nothing about the filesystem on DMF and XDF formatted floppies changes outside of the information block that informs the driver of the parameters of the media itself, which is entirely within the base FAT12 specifications. Hell, you can even read a FAT12 filesystem on an image of an XDF-formatted floppy with a plain FAT12 image reader because FAT12 uses logical cluster numbering and it's all just a linear stream of ones and zeroes if the "floppy disk" is just a block of RAM.


Top
 Profile  
 
 Post subject: Re: The 1.44MB FAT32 floppy disk
PostPosted: Fri Jun 10, 2016 6:17 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
Kazinsal wrote:
DMF does not use a different filesystem. A regular FAT12 driver can read a DMF-formatted floppy with a FAT12 filesystem on it provided the FAT12 driver isn't so daft as to presume there are 18 sectors per track on the floppy and instead reads the BPB, and so long as the floppy driver recognizes that there are 21 sectors per track on the floppy and adjusts its LBA-to-CHS calculations accordingly.

I never said the filesystem was different, just that it's specified along with the physical format. DMF uses FAT12 with 16 root directory entries and larger clusters (I think 1 KiB but I don't have any disks I can check at the moment). You can use different parameters, but then it's not DMF anymore.

Kazinsal wrote:
XDF is a specification for modifying the sector layout of floppy disk tracks, not for the filesystem on top of it. In fact, IBM floppies that were XDF-formatted can be read by a plain FAT12 driver so long as the underlying floppy driver also recognizes the layout of the tracks and the sector interleaving and adjusts its LBA-to-CHS accordingly.

This is true, but only because a plain FAT12 driver will not try to read the second FAT and will not try to read sectors that are marked bad. The physical-to-logical mapping for XDF has two holes in it, where logical sectors don't correspond to any physical sectors. One hole is located in the second FAT, and the other is located at the start of the data area in clusters that are marked bad. According to fdutils and mtools, the mapping changes depending on the filesystem parameters, which means the disk must be formatted as FAT12 for those utilities to read the disk properly.

XDF also has an 8-sector compatibility area, which can be read on systems without XDF support. This compatibility area contains another FAT12 filesystem in order to alert the user that the disk is formatted as XDF. These sectors are mapped to the first 8 sectors of the second FAT when the disk is read using an XDF driver. If you want to use them for their intended purpose, the main filesystem must avoid them.

Kazinsal wrote:
Nothing about the filesystem on DMF and XDF formatted floppies changes outside of the information block that informs the driver of the parameters of the media itself, which is entirely within the base FAT12 specifications. Hell, you can even read a FAT12 filesystem on an image of an XDF-formatted floppy with a plain FAT12 image reader because FAT12 uses logical cluster numbering and it's all just a linear stream of ones and zeroes if the "floppy disk" is just a block of RAM.

You can write a DMF disk with an ordinary FAT12 driver, but not an XDF disk.


Top
 Profile  
 
 Post subject: Re: The 1.44MB FAT32 floppy disk
PostPosted: Fri Jun 10, 2016 8:31 pm 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 934
Location: USA
onlyonemac wrote:
The point of putting FAT32 on a floppy, MikeOS, OSdev, and messing around with computers in general, is because it's fun. We like to do things so that we can say "it can be done" or "I managed to do something new" or "I managed to make something work in a way that it wasn't intended - bonus points if I can get it to work reliably". There may be those who do these things with the hope of some other benefit, financial or otherwise, but for most of us it's about having fun. As I like to quote, "just for fun".

I one-hundred percent agree.

Ben


Top
 Profile  
 
 Post subject: Re: The 1.44MB FAT32 floppy disk
PostPosted: Sun Dec 18, 2016 9:48 pm 
Offline

Joined: Sun Dec 18, 2016 9:32 pm
Posts: 1
Is it an open source as I can't see any links to the project?
I'm working on modifying the FAT 12 Based boot loader to work with NTFS and FAT32.
Thanks a lot


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 42 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 17 guests


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