DOS format or unformatted sectors?
DOS format or unformatted sectors?
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?
is there a real difference by using the FAT12 formatting and then conforming your code to read that?
Website: https://joscor.com
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
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
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.
Website: https://joscor.com
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.
Website: https://joscor.com
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
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.
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.
Website: https://joscor.com
- Combuster
- 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:
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.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.
not exactly.
is there a real difference by using the FAT12 formatting and then conforming your code to read that?
Website: https://joscor.com
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: DOS format or unformatted sectors?
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.).01000101 wrote:is there a real difference by using the FAT12 formatting and then conforming your code to read that?
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.. )
(You'll also avoid embarrassments like: This. )
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.
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
...the sky is the limit
AsteriOS project: http://www.mindfields.gr/main/index.php ... &Itemid=27