Page 1 of 1
how to use bochs
Posted: Mon Nov 22, 2010 3:38 pm
by vinise
Hy everyone
i've got to write a boot sequence for school... i'm actually using a amaising floppy disk and rebooting a computer over and over again ... i'm getting sick...
anyway i've find bochs but i dont find how to use it right.
i use nasm to make binary file (nasm boots.asm -o boots.bin -f bin)
and dd to transfer it into my flopy (dd if=boot.bin of=/dev/sda0)
how can i do the same with bochs?
Re: how to use bochs
Posted: Mon Nov 22, 2010 3:51 pm
by HitmanYesman
This should do it:
Code: Select all
romimage: file=BIOS-bochs-latest, address=0xf0000
vgaromimage: file=VGABIOS-lgpl-latest
floppya: 1_44=a:, status=inserted
log: report.log
It essentially boots off whatever is inside the floppy a: drive.
Re: how to use bochs
Posted: Mon Nov 22, 2010 4:00 pm
by vinise
Message: ROM: System BIOS must end at 0xfffff
and if i'm using bochs it's to stop using a real floppy.... how can i create and use img?
Re: how to use bochs
Posted: Mon Nov 22, 2010 4:08 pm
by f2
vinise wrote:Message: ROM: System BIOS must end at 0xfffff
Replace
address=0xf0000 by
address=0xe0000. The size of the Bochs BIOS is 128kb, not 64kb.
vinise wrote:and if i'm using bochs it's to stop using a real floppy.... how can i create and use img?
RawWrite can do that.
Re: how to use bochs
Posted: Mon Nov 22, 2010 4:23 pm
by vinise
RawWrite make img out off a floppy...
i want to make img from mine binary file... and boot on my binarry file
Re: how to use bochs
Posted: Mon Nov 22, 2010 5:10 pm
by Hangin10
Re: how to use bochs
Posted: Mon Nov 22, 2010 5:21 pm
by vinise
Hangin10 wrote:http://wiki.osdev.org/Virtual_Floppy_Disk
Next time, search the wiki first.
very not useful for linux :/
Re: how to use bochs
Posted: Mon Nov 22, 2010 5:27 pm
by Combuster
dd can be used just as well for image files as it can be used for actual devices. But Hangin is right - there are a ton of methods to create images, if only you bothered to search. Shame on you for not finding the first entry in the frequently asked questions.
Re: how to use bochs
Posted: Mon Nov 22, 2010 5:57 pm
by vinise
Combuster wrote:dd can be used just as well for image files as it can be used for actual devices. But Hangin is right - there are a ton of methods to create images, if only you bothered to search. Shame on you for not finding the first entry in the frequently asked questions.
if you're speaking of this
http://wiki.osdev.org/Disk_Images i've seen it and try... but it's not working... i may do something wrong ere is what's im doing:
Code: Select all
dd if=/dev/zero of=floppy.flp bs=512 count=2880
nasm boot1.asm -o boot1.bin -f bin
dd if=boot1.bin of=floppy.flp
cat .bochsrc
Code: Select all
romimage: file=/usr/share/bochs/BIOS-bochs-latest, address=0xe0000
vgaromimage: file=/usr/share/bochs/VGABIOS-lgpl-latest
floppya: 1_44=~/floppy.flp, status=inserted
log: report.log
and when i run bochs i get :
Booting from Floppy...
Boot failed could not read the boot disk
FATAL: No bootable device.
Re: how to use bochs
Posted: Mon Nov 22, 2010 9:35 pm
by Thomas
Hi ,
Code: Select all
dd if=/dev/zero of=floppy.flp bs=512 count=2880
nasm boot1.asm -o boot1.bin -f bin
dd if=boot1.bin of=floppy.flp
Use this instead .
Code: Select all
dd if=boot1.bin of=floppy.flp conv= notrunc seek=0
If you have noticed the size of the floopy img reduces to 512 bytes after your last command . I have to look at the dd manual though , I do not have a linux box at my desk.
--Thomas
Re: how to use bochs
Posted: Tue Nov 23, 2010 3:16 am
by vinise
hy
i've look the all night...
thanks Thomas... it was a part of the problem but the other part came from my boot sequence
I used to do the boot signature as :
and it's not working with bochs ... a bit strange... it's working find with a real floppy and a computer
anyway i put
and it's working just fine
Thanks to every one
Re: how to use bochs
Posted: Tue Nov 23, 2010 5:43 am
by Owen
One word: Endian
Re: how to use bochs
Posted: Wed Nov 24, 2010 3:06 am
by egos
This is right.
But this is not.