DOS format or unformatted sectors?

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!

Your floppy format?

FAT12
7
39%
Custom Format
8
44%
Raw Binary Dump
3
17%
 
Total votes: 18

User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

DOS format or unformatted sectors?

Post by 01000101 »

After completing my bootloader, I found that it was WAY easier to just dump the compiled binaries (boot + kernel) to the sectors of a floppy without formatting it. I used rawwrite to literally dump my bootsector in the first sector, and then continue dumping my kernel at sector 2->n.

is there a real difference by using the FAT12 formatting and then conforming your code to read that?
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

Yes - there is a difference.

If you plan to just have your kernel and boot loader on the floppy and not use it for anything else, fine. As soon as you start adding other things like driver files, you need to have some kind of file format so that your kernel can keep track of what is where.

There is also the issue of accessing the disk with another OS. At the moment, adding a new driver to my OS is as simple as just dropping that file to the disk from within Windows. If I just had a flat binary system, I would have to re-write the whole disk and keep track of where each individual file started.

Cheers,
Adam
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

In my case, it is a one-time deal with the floppy. Pop it in, boot, it writes itself to memory then to a hdd to continue operating. Also, the floppy will (in the near future) be partly encrypted, so I'm not so worried about writing back to the file or having it readable on other OS's.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Where's my ext2 option, dammit?!
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

sorry, I didn't even come accross a single ext2 tutorial/documentation so it slipped my mind lol. I'm primarily concerned with the DOS FAT12 fs.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

My floppy is ext2 formatted (although it's only read by GRUB), and so is my HDD image.
jgraef
Member
Member
Posts: 47
Joined: Wed Jan 16, 2008 7:37 am
Location: Wonsheim, Germany

Post by jgraef »

Hi,

I also use ext2 and I also use Grub for booting my OS.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

You should really extend your poll... At least put an "Other - Specify" option, not everyone uses FAT.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
Ready4Dis
Member
Member
Posts: 571
Joined: Sat Nov 18, 2006 9:11 am

Post by Ready4Dis »

I stick with FAT. I can easily drag/drop files onto a floppy disk under windows, linux, *insert OS here*, makes development and copying files back and forth between easy. I do not use the floppy much, most of my development is done on the hard drive, which I use Fat16/Fat32 for (depending on it's size) for the same reason. I can drag and drop my kernel + drivers from windows straight to the hard-drive, reboot and test the updated kernel. My OS is not restricted to a specific file format howerver, I just chose to implement Fat first since it's widely supported. I could easily implement a custom file format (which I did as well, but don't typically use it, more for learning than anything), or ext2, or *insert format here*. Like I said though, I started with Fat due to its wide support.
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

ok seriously, I just want to know the difference between raw dump of data on a floppy and FAT12. Unless there is something significantly better about ext on the floppy disk, i see no need for it in the poll as it is not what i am asking about.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

01000101 wrote:ok seriously, I just want to know the difference between raw dump of data on a floppy and FAT12. Unless there is something significantly better about ext on the floppy disk, i see no need for it in the poll as it is not what i am asking about.
Your poll simply asks how people write their OS to floppy. Therefore Ext2, and many other existing filesystems are valid replies that are not accomodated.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

not exactly.
is there a real difference by using the FAT12 formatting and then conforming your code to read that?
jgraef
Member
Member
Posts: 47
Joined: Wed Jan 16, 2008 7:37 am
Location: Wonsheim, Germany

Post by jgraef »

The question for the poll is
Your floppy format?
If yo do not care about the filesystem you could also ask: "Do you just put your OS on the floppy by writing raw sectors on it or do you use a file system?"
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: DOS format or unformatted sectors?

Post by Brynet-Inc »

01000101 wrote:is there a real difference by using the FAT12 formatting and then conforming your code to read that?
There certainly is.. hard drives and floppy drives aren't tape drives, they deserve a file system that allows people to access files consistently. (Without needing to manually memorize where one file begins, and another ends.).

If you ever expect anyone to use your OS, You'll need to implement support for a file system.. nobody will just dump raw bytes on their drive in an unorganized fashion just because you personally think it's "easier".

(BTW, Re-phrase your question next time if "non-FAT" file systems aren't important to you.. :roll:)

(You'll also avoid embarrassments like: This. :lol:)
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Jef
Member
Member
Posts: 112
Joined: Tue Jan 08, 2008 7:25 am
Location: Greece
Contact:

Post by Jef »

It depends on what you want to do with your OS, and how small it will be.

for example,
if you want to make a personal firewall and you will keep it ONLY for you, raw format is fine.
if you want to make an OS with GUI and be like "every-day" OS, you need a really good/fast format.

When i start writing my OS, i start with 16-bit real-mode.
Then i realize that i am loosing my time on this.
Then i rewrite all in 32-bit protected mode, and of course i wrote a FDC driver for it.
Now i am thinking that it was waste of time to write a FDC driver because is obsolete. But,... you must start from somewhere.
Keep coding...
...the sky is the limit

AsteriOS project: http://www.mindfields.gr/main/index.php ... &Itemid=27
Post Reply