Page 1 of 1

Bochs says no bootable device [SOLVED]

Posted: Fri Dec 12, 2014 4:44 pm
by AInoob
I have no idea why this happened, qemu says the same thing.

But I can run in vortualbox, which makes me crazy.

Here are the codes you might interested in:

boot.asm

Code: Select all

	org	07c00h
	mov 	ax, cs
	mov	ds, ax
	mov	es, ax
	call	DispStr
	jmp	$
DispStr:
	mov	ax, BootMessage
	mov	bp, ax
	mov	cx, 13
	mov	ax, 01301h
	mov	bx, 000ch
	mov	dl, 0
	int	10h
	ret
BootMessage:		db	"Hello,AInoob!"
times	520-($-$$)	db	0
dw	0xaa55
bochsrc

Code: Select all

megs: 32
romimage: file=/usr/share/bochs/BIOS-bochs-latest
vgaromimage: file=/usr/share/vgabios/vgabios.bin
floppya: image="a.img", status=inserted
boot: floppy
log:bochsout.txt
mouse: enabled=0
display_library: sdl
and the link is the img file and bochsout.txt
http://ainoob-files.stor.sinaapp.com/ainoob.zip


Please help me if you have any idea. Thanks~~

Re: Bochs says no bootable device

Posted: Fri Dec 12, 2014 6:47 pm
by Brendan
Hi,

Is the 0xAA55 marker in the correct place (did you check with something like "hexdump")?

I think it's supposed to be "times 510-($-$$)" instead of "times 520-($-$$)"; and that your 0xAA55 marker ends up near the start of the second sector, causing Bochs/Qemu to decide the disk isn't bootable because the 0xAA55 isn't where it should be.


Cheers,

Brendan

Re: Bochs says no bootable device

Posted: Fri Dec 12, 2014 7:30 pm
by AInoob
It worked! Thank you so much!