Page 1 of 1

Does not work under grub

Posted: Sat Oct 29, 2005 8:05 am
by yanix
I compiled my new kernel image .
It includes 2 files :
boot.S - boot sector
kernel.c - contain 1 function , that prints string '123'.
It works under bochs 2.2.1 and vmware 5.0 ,
but does not work under grub ...

>:( >:( >:(

Re:Does not work under grub

Posted: Sat Oct 29, 2005 8:50 am
by AR
What? GRUB is a bootloader. It LOADs kernels, it is not an emulator.

The BareBones in the Wiki has an example multiboot header if you are trying to use GRUB as the bootloader.

Re:Does not work under grub

Posted: Sat Oct 29, 2005 9:28 am
by yanix
There is makefile :
arebones.img: barebones bootfloppy.img menu.cfg ...

What is a bootfloppy.img and how i can take it for hard hisk image ?

Re:Does not work under grub

Posted: Sat Oct 29, 2005 9:45 am
by AR
Ok, I have no idea what you're talking about. You install GRUB on a floppy (something along the lines of [Gentoo Linux]: "mount /dev/fd0 /boot; emerge grub") then configure menu.lst to boot the kernel:

Code: Select all

default 0
timeout 0

title My OS
kernel /MyOS/krnl.elf
Then reboot the computer with the floppy still in the drive to boot the OS. Alternatively, you can mount a loopback device to create a floppy image instead. With Bochs, the only difference between a harddrive and floppy image is whether you set it to be a floppy or harddrive in the settings file.

Re:Does not work under grub

Posted: Mon Oct 31, 2005 2:58 am
by Pype.Clicker
http://www.osdev.org/osfaq2/index.php/W ... k%20Images

might help (just updated).

"A disk image is nothing more than a file whose content reflects the layout of a disk and that the tool will use as if it was a physical device. E.g. A floppy image typically is 1.44MB large and its 512 first bytes consist of the 'floppy's boot sector. The different sub-pages should tell you how to create such images from real disks and use them under the most common operating systems."