Bochs says no bootable device [SOLVED]

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
AInoob
Posts: 2
Joined: Fri Dec 12, 2014 4:37 pm

Bochs says no bootable device [SOLVED]

Post 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~~
Last edited by AInoob on Fri Dec 12, 2014 7:31 pm, edited 1 time in total.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Bochs says no bootable device

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
AInoob
Posts: 2
Joined: Fri Dec 12, 2014 4:37 pm

Re: Bochs says no bootable device

Post by AInoob »

It worked! Thank you so much!
Post Reply