Page 1 of 1

using bochs

Posted: Wed Jul 11, 2007 11:05 pm
by Pyrofan1
right i can't figure out how to use bochs
i use

Code: Select all

dd if=kernel.bin of=kernel.img bs=512 count=20160
to create the image and this is my bochsrc

Code: Select all

config_interface: textconfig
display_library: x
log: bochsout.txt
romimage: file=/usr/share/bochs/BIOS-bochs-latest, address=0xf0000
megs: 32
vgaromimage: file=/usr/share/vgabios/vgabios.bin
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, path="kernel.img", mode=flat, cylinders=20, heads=16, spt=63

boot: disk
and when i run bochs it says
size of disk image must be multiple of 512 bytes

Posted: Wed Jul 11, 2007 11:23 pm
by Brynet-Inc
So what? You're writing your kernel directly to a disk image.. What about your bootloader? do you expect bochs to magically load your kernel without one?

Please explain in more "detail" please...

Posted: Wed Jul 11, 2007 11:24 pm
by Candy
Pad your image to a multiple of 512 bytes? Like, 20480?

Posted: Thu Jul 12, 2007 9:18 pm
by earlz
maybe his kernel.bin is just a disk image with kernel and more...that's how I do it in my test OS...(cept I don't name it kernel.bin)