faulty Bochs BIOS file

Bug #2019531 reported by maro
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bochs (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On a 22.04 system all attempts to use Bochs with its default BIOS file (i.e. /usr/share/bochs/BIOS-bochs-latest) are ending up in failure. The issue does not materialize, if I use the respective file that is included in the Bochs v2.7 source archive. Therefore I've concluded that the file from the 'bochsbios' package is faulty.

In the following I'll describe steps one could use to try to reproduce my findings. Please note that steps (3) and (4) might look at first glance somewhat convoluted, but my aim was to ensure a high degree of repeatability.

(1) install the required packages
    sudo apt install -y bochs-x bochsbios

(2) get the alternative BIOS file
    wget https://github.com/bochs-emu/Bochs/raw/REL_2_7_FINAL/bochs/bios/BIOS-bochs-latest

(3) run a minimal testcase (with the faulty BIOS file), and capture the output in a (slightly changed) log file
    ( echo 6 ; sleep 1 ; echo c ; sleep 1 ; echo q ) \
        | bochs -n 2>&1 | sed 's#^[0-9]*##' > fail.log

(4) repeat the testcase with the alternative BIOS file (and select 'Quit', when a failure message pops up)
    ( echo 6 ; sleep 1 ; echo c ; sleep 1 ; echo q ) \
        | bochs -n romimage:file=BIOS-bochs-latest 2>&1 | sed 's#^[0-9]*##' > good.log

(5) compare the relevant lines from the two log files
    grep -E '_read| rom|e\[' fail.log good.log

In my case the result of step (5) looks like:
    fail.log:e[ ] Switching off quick start, because no configuration file was found.
    fail.log:i[MEM0 ] rom at 0xfffe0000/131072 ('/usr/share/bochs/BIOS-bochs-latest')
    fail.log:i[MEM0 ] rom at 0xc0000/38400 ('/usr/share/bochs/VGABIOS-lgpl-latest')
    fail.log:i[BIOS ] Starting rombios32
    fail.log:e[CPU0 ] interrupt(): vector must be within IDT table limits, IDT.limit = 0x0
    fail.log:e[CPU0 ] interrupt(): vector must be within IDT table limits, IDT.limit = 0x0
    fail.log:e[CPU0 ] interrupt(): vector must be within IDT table limits, IDT.limit = 0x0
    fail.log:bx_dbg_read_linear: physical memory read error (phy=0x0000322f3130, lin=0x00000000322f3130)
    fail.log:e[CPU0 ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting
    good.log:e[ ] Switching off quick start, because no configuration file was found.
    good.log:i[ ] parsing arg 3, romimage:file=BIOS-bochs-latest
    good.log:i[MEM0 ] rom at 0xfffe0000/131072 ('BIOS-bochs-latest')
    good.log:i[MEM0 ] rom at 0xc0000/38400 ('/usr/share/bochs/VGABIOS-lgpl-latest')
    good.log:i[BIOS ] Starting rombios32

To summarize: in the first run the process fails due to the faulty BIOS, in the second run one ends up with a message about the missing boot medium (which is entirely expected, due to the way the test was set up).

It seems that other users have run into the same problem, but apparently without lodging a bug report:
    https://stackoverflow.com/questions/73067357/bochs-can-not-load-bootloader-using-a-floppy-image

PS: I'm attaching my two log files in the hope they might be useful.

Revision history for this message
maro (maro) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bochs (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.