gaf
User
 Platinum Osdever
| Posts: 153 |  | Karma: 10
|
Re: bootable cd - 2006/02/02 11:32
are floppys fat12 by default Most floppies are already formated as FAT12, but it's nevertheless a good idea to rebuild the file-system in order to avoid problems with bad sectors. In Linux you can do so by either using the graphical utilities gfloppy/kfloppy or the command-line tool mkdosfs - on windows you'd simply right-click the floppy symbol and choose "format".
I have read something about not overwriting the dos mrb The MBR contains bootcode that is needed to load the kernel and, at least on larger disks, a partition-table. Overwriting your hard-disk's mbr would thus indeed lead to some problems as the operating-system couldn't boot any longer and accessing the partitions would be impossible. To get you own operating system started, you however have to overwrite the bootsector of a floppy with your boot-code which will then be executed by the BIOS at system start-up (boot sequence).
To copy your bootsector to a floppy you can use dd:
linux: - Open a console window - Type "dd if=your_bootsector of=/dev/fd0 bs=512 count=1"
windows: - Download this port of the dd utility and unzip it to your desktop - Click "Start/Run" and type "command", press enter - Type "cd Desktop" and "dd if=c:\\your_bootsector of=\\.\\a: bs=512 count=1"
Can you load the kernel in protected mode, or do you have to do it in real mode, and jump to it after you have entered protected mode
Loading the kernel from pmode unfortunately won't work as you can't use the BIOS interrupts that way, which are however needed to get the kernel off the disk. Most people therefore either use the so called unreal-mode (access to 4gb of memory, real-mode addressing) or load the kernel in real-mode and switch to pmode later on.
Just as a sidenode: I personally have some doubt whether writing an own bootsector/bootloader is really such a great idea, especially if you're new to operating system development. You do know that there are freely avaliable loaders such as grub that may load the kernel for you ?
regards, gaf
|