Page 1 of 1

Bochs and Grub

Posted: Sat Aug 12, 2006 6:42 pm
by spider
Im trying to get bochs to load my kernel from my hdd. I dont want to place this kernel in the mbr or anything. I currently have grub installed on my system to boot into linux. And my kernel (kernel.bin) is located on my linux partition. I was wondering if there is anyway to get bochs or qemu it doesnt bother me which one to load my current installation of grub (i can then just config grub to load my kernel) or to get bochs/qemu to just load my kernel straight from my hdd. I should note im not using my own bootloader(which is why i was more leaning to using my current installation of grub as my bootloader).

Re:Bochs and Grub

Posted: Sat Aug 12, 2006 6:51 pm
by bluecode
spider wrote:Im trying to get bochs to load my kernel from my hdd. I dont want to place this kernel in the mbr or anything.
Why don't you just configure grub (/boot/grub/menu.lst), reboot your system and let grub boot your kernel... ???
or to get bochs/qemu to just load my kernel straight from my hdd.
Tell bochs/qemu to use /dev/hdXY as your hdd image.

Or am I completely missing the point?

Re:Bochs and Grub

Posted: Sat Aug 12, 2006 6:57 pm
by spider
bluecode wrote: Why don't you just configure grub (/boot/grub/menu.lst), reboot your system and let grub boot your kernel... ???
I thought about doing that, but that would be a pain in the @$$ having to restart my computer everytime i want to test the kernel.
or to get bochs/qemu to just load my kernel straight from my hdd.
Tell bochs/qemu to use /dev/hdXY as your hdd image.

Or am I completely missing the point?
Nope your not missing anything. I was playing around with bochs for a few hours last night and it keept erroring out on me, i thought i tryed that. Ill try it again. Thanx.

Re:Bochs and Grub

Posted: Sat Aug 12, 2006 7:20 pm
by spider
when ever i try to open /dev/hdXY in qemu it just tells me it cant open the hard disk image

Re:Bochs and Grub

Posted: Sat Aug 12, 2006 7:29 pm
by bluecode
You must be root to use files in /dev/.

Re:Bochs and Grub

Posted: Sat Aug 12, 2006 8:02 pm
by spider
my bad, it works now kind of. Grub just gives me error 21. OH well i downloaded an image file off the net that has grub on it and that loads perfect for me.

Re:Bochs and Grub

Posted: Sat Aug 12, 2006 8:30 pm
by evincarofautumn
I thought about doing that, but that would be a pain in the @$$ having to restart my computer everytime i want to test the kernel.
Not to mention the fact that it may decrease its lifespan.
Tell bochs/qemu to use /dev/hdXY as your hdd image.
"...this is NOT RECOMMENDED" by the makers of Bochs and it only (in theory) will work on nix. afaik, it's not implemented specifically; it just might work because Bochs has support for reading from /dev/ in general.