Error with Bochs... "couldn't open ROM file"...
Error with Bochs... "couldn't open ROM file"...
Hey everyone!
So I just started out with kernel development, and I read around some stuff and decided to try out the bare bone example on the wiki. I did basically everything they did there, except that in kernel.c I added my own functions for writing text and clearing the screen, but that isn't the issue (everything compiled and linked just fine).
I created a floppy.img file as the instructions say, and when I fire up Bochs it gives me the follow error:
00000000000i[MEM0 ] 4.00MB
00000000000i[MEM0 ] ROM: couldn't open ROM image file ''.
Any idea of what's happening here??
By the way, I am currently running this on Damn Small Linux on a virtual machine...
Thanks
So I just started out with kernel development, and I read around some stuff and decided to try out the bare bone example on the wiki. I did basically everything they did there, except that in kernel.c I added my own functions for writing text and clearing the screen, but that isn't the issue (everything compiled and linked just fine).
I created a floppy.img file as the instructions say, and when I fire up Bochs it gives me the follow error:
00000000000i[MEM0 ] 4.00MB
00000000000i[MEM0 ] ROM: couldn't open ROM image file ''.
Any idea of what's happening here??
By the way, I am currently running this on Damn Small Linux on a virtual machine...
Thanks
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Error with Bochs... "couldn't open ROM file"...
for bochs you need to write a configuration file (bochs comes with a default called bochsrc, full with comments - make a copy for your OS). There you will also find entries pointing to the various image files (system bios, vga bios, floppy image, HD image, ...)
Right now you have either no configuration, or one which is missing important things.
Right now you have either no configuration, or one which is missing important things.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Error with Bochs... "couldn't open ROM file"...
You're probably missing a "romimage:" line in your bochsrc file or there's a broken one.
Re: Error with Bochs... "couldn't open ROM file"...
Thanks for the quick reply guys!
I have a ~/.bochrc file, which has:
boot: floppy
floppya: 1_44="floppy.img", status=inserted
I just read something about romimage: actually, but I don't know exactly what I should do... I tried a couple of things but they didn't work. Any suggestions as to what I should use for 'file='?
I have a ~/.bochrc file, which has:
boot: floppy
floppya: 1_44="floppy.img", status=inserted
I just read something about romimage: actually, but I don't know exactly what I should do... I tried a couple of things but they didn't work. Any suggestions as to what I should use for 'file='?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Error with Bochs... "couldn't open ROM file"...
over here its /usr/share/bochs/BIOS-bochs-latest (and /usr/share/bochs/VGABIOS-lgpl-latest) but it may differ on your distro.
Re: Error with Bochs... "couldn't open ROM file"...
Ok... so I did
romimage: file=/usr/share/bochs/BIOS-bochs-latest, address 0xe0000
but it returns:
00000000000i[MEM0 ] 4.00MB
00000000000i[MEM0 ] rom at 0xe0000/65536 ('/usr/share/bochs/BIOS-bochs-latest')
00000000000i[MEM0 ] ROM: couldn't open ROM image file ''.
This is what I have in /usr/share/bochs:
root@box:/# ls /usr/share/bochs/
BIOS-bochs-2-processors BIOS-bochs-latest README
BIOS-bochs-4-processors CHANGES keymaps
romimage: file=/usr/share/bochs/BIOS-bochs-latest, address 0xe0000
but it returns:
00000000000i[MEM0 ] 4.00MB
00000000000i[MEM0 ] rom at 0xe0000/65536 ('/usr/share/bochs/BIOS-bochs-latest')
00000000000i[MEM0 ] ROM: couldn't open ROM image file ''.
This is what I have in /usr/share/bochs:
root@box:/# ls /usr/share/bochs/
BIOS-bochs-2-processors BIOS-bochs-latest README
BIOS-bochs-4-processors CHANGES keymaps
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Error with Bochs... "couldn't open ROM file"...
What's in your directory with the bochs executable in it?
Re: Error with Bochs... "couldn't open ROM file"...
Well, I'm running this on linux, the executable is in /usr/bin, so... that directory just has a bunch of other executables...
If you mean the directory where floppy.img is:
dsl@box:/root/Kernel$ ls
floppy.img kernel.c linker.ld loader.s pad~ stage2
kernel.bin kernel.o loader.o pad stage1
If you mean the directory where floppy.img is:
dsl@box:/root/Kernel$ ls
floppy.img kernel.c linker.ld loader.s pad~ stage2
kernel.bin kernel.o loader.o pad stage1
Re: Error with Bochs... "couldn't open ROM file"...
Hmmm... Seems I missed something that -might- help..
Scrolling up, I see this:
00000000000i[ ] reading configuration from /tmp/8515
00000000000p[ ] >>PANIC<< /tmp/8515: boot directive with unknown boot device 'floppy'. use 'a', 'c' or 'cdrom'.
========================================================================
Event type: PANIC
Device: [ ]
Message: [ ] /tmp/8515: boot directive with unknown boot device 'floppy'. use 'a', 'c' or 'cdrom'.
then it just restarts and gives the errors that I original talked about....
Oh, and this is how I'm invoking bochs:
dsl@box:/root/Kernel$ bochs floppy
Scrolling up, I see this:
00000000000i[ ] reading configuration from /tmp/8515
00000000000p[ ] >>PANIC<< /tmp/8515: boot directive with unknown boot device 'floppy'. use 'a', 'c' or 'cdrom'.
========================================================================
Event type: PANIC
Device: [ ]
Message: [ ] /tmp/8515: boot directive with unknown boot device 'floppy'. use 'a', 'c' or 'cdrom'.
then it just restarts and gives the errors that I original talked about....
Oh, and this is how I'm invoking bochs:
dsl@box:/root/Kernel$ bochs floppy
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Error with Bochs... "couldn't open ROM file"...
Invoke bochs with just "bochs" and add a "boot: floppy" line to your bochsrc, that might work.
Re: Error with Bochs... "couldn't open ROM file"...
Ok, I think I'm getting somewhere..
I added
vgaromimage: /usr/share/vgabios/vgabios.bin
to ~/.bochsrc
And now it's giving me:
00000000000i[MEM0 ] 4.00MB
00000000000i[MEM0 ] rom at 0xf0000/65536 ('/usr/share/bochs/BIOS-bochs-latest')
00000000000i[MEM0 ] rom at 0xc0000/26106 ('/usr/share/vgabios/vgabios.bin')
00000000000i[CMOS ] Setting initial clock to: Wed Dec 31 02:03:16 2008
00000000000i[FDD ] fd0: 'floppy.img' ro=0, h=2,t=80,spt=18
00000000000p[XGUI ] >>PANIC<< Could not open vga font. See docs-html/install.html
Reading install.html, it says I need to install vga fonts...
but what's confusing is the way they explain it... I installed using apt-get
I added
vgaromimage: /usr/share/vgabios/vgabios.bin
to ~/.bochsrc
And now it's giving me:
00000000000i[MEM0 ] 4.00MB
00000000000i[MEM0 ] rom at 0xf0000/65536 ('/usr/share/bochs/BIOS-bochs-latest')
00000000000i[MEM0 ] rom at 0xc0000/26106 ('/usr/share/vgabios/vgabios.bin')
00000000000i[CMOS ] Setting initial clock to: Wed Dec 31 02:03:16 2008
00000000000i[FDD ] fd0: 'floppy.img' ro=0, h=2,t=80,spt=18
00000000000p[XGUI ] >>PANIC<< Could not open vga font. See docs-html/install.html
Reading install.html, it says I need to install vga fonts...
but what's confusing is the way they explain it... I installed using apt-get
Re: Error with Bochs... "couldn't open ROM file"...
First, here's my bochsrc file:
boot: floppy
floppya: 1_44="floppy.img", status=inserted
romimage: file=/usr/share/bochs/BIOS-bochs-latest, address=0xf0000
vgaromimage: /usr/share/vgabios/vgabios.bin
when I run it with just 'bochs' it complains about needing a disk?
Please specify which disk set to boot (without the suffix):
Usage: bochs <disk>
Where <disk> will replace the #disk# strings in ~/.bochsrc
boot: floppy
floppya: 1_44="floppy.img", status=inserted
romimage: file=/usr/share/bochs/BIOS-bochs-latest, address=0xf0000
vgaromimage: /usr/share/vgabios/vgabios.bin
when I run it with just 'bochs' it complains about needing a disk?
Please specify which disk set to boot (without the suffix):
Usage: bochs <disk>
Where <disk> will replace the #disk# strings in ~/.bochsrc
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Error with Bochs... "couldn't open ROM file"...
I'm just guessing, I haven't done a bochsrc by hand in a year. Been using Virtual PC cause Bochs 2.3 was crap enough for me to seek an alternative.
Re: Error with Bochs... "couldn't open ROM file"...
Is it still complaining if you don't use any options?
Try running it with: bochs -f .bochsrc
Although according to the docs it should search for a .bochsrc in the current directory (on Linux), wouldn't hurt
to spare it the search.
Try running it with: bochs -f .bochsrc
Although according to the docs it should search for a .bochsrc in the current directory (on Linux), wouldn't hurt
to spare it the search.
Re: Error with Bochs... "couldn't open ROM file"...
Tried it, still doesn't work....
/usr/bin/bochs: line 55: 11780 Exit 1
cat $bochs_wrap /dev/stdin
11781 Segmentation fault | /usr/lib/bochs/bochs
and it's still complaining about vga fonts..
Stuff like that.... would you guys recommend giving up on bochs and using qemu or something of the sort?
/usr/bin/bochs: line 55: 11780 Exit 1
cat $bochs_wrap /dev/stdin
11781 Segmentation fault | /usr/lib/bochs/bochs
and it's still complaining about vga fonts..
Stuff like that.... would you guys recommend giving up on bochs and using qemu or something of the sort?