FAT booting
FAT booting
Hi all,
i'm trying to implement fat12 in my little os. So i created a simple BPB structure and added some simple test routines below the bpb (THE BPB and the test routines are in the same file). The BPB and boot code are in absolute sector 1. dd if=kernel.bin of=/dev/fd0
After that my floppy is not recongnisable. So i reformated my floppy (i use fdformat and mkdosfs) . I've also read this thread http://www.osdev.org/phpBB2/viewtopic.php?t=2781
So i went to fdisk to see my booting partition and there was no partition. i created one and added the fat12 and bootable flag. fdisk told me that the newly created partition started at sector 18. So i did
dd if=kernel.bin obs=512 seek=17 of=/dev/fd0 . I rebooted and the computer displayed " This is not a bootable disk "etc .
How can i boot my kernel and have fat12??????
i'm trying to implement fat12 in my little os. So i created a simple BPB structure and added some simple test routines below the bpb (THE BPB and the test routines are in the same file). The BPB and boot code are in absolute sector 1. dd if=kernel.bin of=/dev/fd0
After that my floppy is not recongnisable. So i reformated my floppy (i use fdformat and mkdosfs) . I've also read this thread http://www.osdev.org/phpBB2/viewtopic.php?t=2781
So i went to fdisk to see my booting partition and there was no partition. i created one and added the fat12 and bootable flag. fdisk told me that the newly created partition started at sector 18. So i did
dd if=kernel.bin obs=512 seek=17 of=/dev/fd0 . I rebooted and the computer displayed " This is not a bootable disk "etc .
How can i boot my kernel and have fat12??????
I need someone to show me the things in life that I cant find
I cant see the things that make true happiness, I must be blind
I cant see the things that make true happiness, I must be blind
- chase
- Site Admin
- Posts: 710
- Joined: Wed Oct 20, 2004 10:46 pm
- Libera.chat IRC: chase_osdev
- Location: Texas
- Discord: chase/matt.heimer
- Contact:
Don't partition your floppy unless you actually want to have mutliple filesystems on it.
Reformat the floppy, verify that the fat12 format progam you are using only makes one reserved sector and try putting your boot sector back on.
You can look at mine if it would help, http://www.osdev.org/f12boot.asm
Reformat the floppy, verify that the fat12 format progam you are using only makes one reserved sector and try putting your boot sector back on.
You can look at mine if it would help, http://www.osdev.org/f12boot.asm
Hi Joke!
The best thing you can do is format the floppy and use the dd-command to write your own bootsector to the first sector on the disk.
(For the recognition of the filesystem by other operating systems, make sure the oem string in the bpb states MSWIN4.1. However, for booting the disk, this is not necessary ofcourse.)
You should now be able to copy your kernel onto the disk. If your bootsector works properly, the bootsector should be able to load you kernel and boot it.
Good luck.
The best thing you can do is format the floppy and use the dd-command to write your own bootsector to the first sector on the disk.
(For the recognition of the filesystem by other operating systems, make sure the oem string in the bpb states MSWIN4.1. However, for booting the disk, this is not necessary ofcourse.)
You should now be able to copy your kernel onto the disk. If your bootsector works properly, the bootsector should be able to load you kernel and boot it.
Good luck.
Considering your posts, I think you need to spend more time doing reseach and less time attempting to answer the questions of others, especially when you obviously lack knowledge of the subject at hand. There are no brownie-points for sounding smart.matthias wrote:If Chase says so, it has to be, right? anyway wtf. But I think it should be possible indeed.hckr83 wrote:It's possible to partition your floppy!!Don't partition your floppy unless you actually want to have mutliple filesystems on it.
- matthias
- Member
- Posts: 158
- Joined: Fri Oct 22, 2004 11:00 pm
- Location: Vlaardingen, Holland
- Contact:
Uhm, I've seen such a floppy before, I'm not brabling something here. The only thing the BIOS does is load the bootsector if it finds the 0xAA55. So you could have a sort of MBR on your floppy that looks up the parition table instead of some fat table within the first sector and then loads the partition sector, so yes it is possible, the only thing will be that it's probably not supported by any other OS, but possible it is.SpooK wrote:Considering your posts, I think you need to spend more time doing reseach and less time attempting to answer the questions of others, especially when you obviously lack knowledge of the subject at hand. There are no brownie-points for sounding smart.matthias wrote:If Chase says so, it has to be, right? anyway wtf. But I think it should be possible indeed.hckr83 wrote: It's possible to partition your floppy!!
The source of my problems is in the source.
- chase
- Site Admin
- Posts: 710
- Joined: Wed Oct 20, 2004 10:46 pm
- Libera.chat IRC: chase_osdev
- Location: Texas
- Discord: chase/matt.heimer
- Contact:
As far as partitioning on a floppy goes the only real issue is that most partitioning software such as MS fdisk won't install a MBR with partition table to a floppy. Reading actually works for most unix-type OSes. I ran across this a couple years back but don't remember what partitioning program I was using.
As most people are pointing out it's a waste of space for such a small media. Floppies are pretty much dead, there only benefit is that you can test OSes without fear of corrupting your hard drive. With the increase in hardware that can boot from usb thumb drives and most virtual machines being free now you'll see floppies being used less and less for OS development.
Just as you can have floppies with partitions you can also have hard drives without them. While I personally think that coding your own boot loader is great for learning I think more developers will start writting raw FAT16 hard drive images to be used by a VM if they want to test boot loaders.
As most people are pointing out it's a waste of space for such a small media. Floppies are pretty much dead, there only benefit is that you can test OSes without fear of corrupting your hard drive. With the increase in hardware that can boot from usb thumb drives and most virtual machines being free now you'll see floppies being used less and less for OS development.
Just as you can have floppies with partitions you can also have hard drives without them. While I personally think that coding your own boot loader is great for learning I think more developers will start writting raw FAT16 hard drive images to be used by a VM if they want to test boot loaders.