bochs error

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
apples
Posts: 6
Joined: Fri Oct 12, 2007 6:13 pm
Location: hillsborough, nc

bochs error

Post by apples »

i've just started working on my bootloader..and i was able to test it out on windows using vfd + partcopy, but the other day i completely switched over to linux. i've installed bochs, and i was able to get it to run using my floppy, but it kept giving the error ">>PANIC<< Could not read the boot disk".

i'm pretty sure that i created the boot image correctly, and the only thing i changed in the bochsrc was to point the emulated floppy drive to my file. here are all the steps i took to create the image.

Code: Select all

nasm boot.asm -f bin -o boot.bin
dd if=/dev/zero of=boot.img bs=512 count=2880
losetup /dev/loop0 boot.img
mkdosfs /dev/loop0
dd if=boot.bin of=/dev/loop0 bs=512 count=1
losetup -d /dev/loop0
if anyone can help me with this very simple problem, it would be greatly appreciated. :)
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Post by bewing »

About halfway down your bochsrc file (in the "# BOOT:" section), did you make sure it says "boot: floppy" and comment out the "#boot: disk" line?
apples
Posts: 6
Joined: Fri Oct 12, 2007 6:13 pm
Location: hillsborough, nc

Post by apples »

still didn't work. here's my bochsrc:

Code: Select all

config_interface: textconfig
display_library: x
romimage: file=/usr/share/bochs/BIOS-bochs-latest, address=0xf0000
megs: 32
vgaromimage: file=/usr/share/vgabios/vgabios.bin
floppya: 1_44=/media/FUNNYFACE/floppy.img, status=inserted
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata1: enabled=0, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata2: enabled=0, ioaddr1=0x1e8, ioaddr2=0x3e0, irq=11
ata3: enabled=0, ioaddr1=0x168, ioaddr2=0x360, irq=9
#ata0-master: type=disk, path="", mode=flat, cylinders=1024, heads=16, spt=63
ata0-slave: type=cdrom, path="/dev/cdrom", status=inserted

boot: floppya

ips: 1000000
floppy_bootsig_check: disabled=0
log: /dev/stdout
panic: action=ask
error: action=report
info: action=report
debug: action=ignore
debugger_log: -
com1: enabled=1, dev=/dev/ttyS0
#parport1: enabled=1, file="/dev/loop0"
sb16: midimode=1, midi=/dev/midi00, wavemode=1, wave=/dev/dsp, loglevel=2, log=/dev/stdout, dmatimer=600000
vga_update_interval: 300000
keyboard_serial_delay: 250
keyboard_paste_delay: 100000
floppy_command_delay: 500
mouse: enabled=1
private_colormap: enabled=0
#ne2k: ioaddr=0x240, irq=9, mac=b0:c4:20:00:00:00, ethmod=linux, ethdev=eth0
#keyboard_mapping: enabled=0, map=/usr/share/bochs/keymaps/x11-pc-de.map
#keyboard_type: mf
#user_shortcut: keys=ctrlaltdel
#magic_break: enabled=1
#cmosimage: cmos.img
#load32bitOSImage: os=nullkernel, path=../kernel.img, iolog=../vga_io.log
#load32bitOSImage: os=linux, path=../linux.img, iolog=../vga_io.log, initrd=../initrd.img
#i440fxsupport: enabled=1
usb1: enabled=1, ioaddr=0xFF80, irq=10
#text_snapshot_check: enable
EDIT: i got it to work by running

Code: Select all

bochs 'boot:floppy' 'floppya:1_44=/media/FUNNYFACE/floppy.img, status=inserted'
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

so change the "boot: floppya" line to "boot: floppy" ?

EDIT: my bochsrc just has "boot: a".
apples
Posts: 6
Joined: Fri Oct 12, 2007 6:13 pm
Location: hillsborough, nc

Post by apples »

JamesM wrote:so change the "boot: floppya" line to "boot: floppy" ?

EDIT: my bochsrc just has "boot: a".
i had tried that too.
mmiikkee12
Member
Member
Posts: 38
Joined: Sat Jun 03, 2006 11:00 pm

Post by mmiikkee12 »

Code: Select all

boot: floppy
floppy_bootsig_check: disabled=0
floppya: 1_44="disk-images/floppy.img", status=inserted
# no floppyb
Yours looks fine, but there's mine for reference, in case I missed a problem.

Also, you could have just done:

Code: Select all

nasm boot.asm -f bin -o boot.bin
dd if=/dev/zero of=boot.img bs=1k count=1440
mkdosfs boot.img
dd if=boot.bin of=boot.img bs=512 count=1 conv=notrunc
Google wrote:Did you mean: 131072 bytes in bytes
Post Reply