Bochs: display library 'nogui' not available

250 Views Asked by At

I want to open a Bochs emulator from the terminal in the terminal, as i'm working in a command line environment and cannot use GUI.

I wrote a .bochsrc config file to use but it didn't work. This is what the file looks like as of now:

display_library: nogui
floppya: type=1_2, 1_2="bootloader.flp", status=inserted

I tried some options that didn't work, like display_library: text, and then i googled for .bochsrc files and found this file at https://github.com/lubomyr/bochs/blob/master/.bochsrc, which has a lot of commented documentation, and i used the display library option nogui, but it still gave me the same error:

========================================================================
                       Bochs x86 Emulator 2.6.11
              Built from SVN snapshot on January 5, 2020
                Timestamp: Sun Jan  5 08:36:00 CET 2020
========================================================================
00000000000i[      ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'
00000000000i[      ] BXSHARE not set. using compile time default '/usr/share/bochs'
00000000000i[      ] lt_dlhandle is 0x55a710930870
00000000000i[PLUGIN] loaded plugin libbx_unmapped.so
00000000000i[      ] lt_dlhandle is 0x55a710931890
00000000000i[PLUGIN] loaded plugin libbx_biosdev.so
00000000000i[      ] lt_dlhandle is 0x55a710932230
00000000000i[PLUGIN] loaded plugin libbx_speaker.so
00000000000i[      ] lt_dlhandle is 0x55a710933fb0
00000000000i[PLUGIN] loaded plugin libbx_extfpuirq.so
00000000000i[      ] lt_dlhandle is 0x55a710934780
00000000000i[PLUGIN] loaded plugin libbx_parallel.so
00000000000i[      ] lt_dlhandle is 0x55a7109363e0
00000000000i[PLUGIN] loaded plugin libbx_serial.so
00000000000i[      ] lt_dlhandle is 0x55a71093a7e0
00000000000i[PLUGIN] loaded plugin libbx_gameport.so
00000000000i[      ] lt_dlhandle is 0x55a71093b010
00000000000i[PLUGIN] loaded plugin libbx_iodebug.so
00000000000i[      ] reading configuration from .bochsrc
00000000000p[      ] >>PANIC<< .bochsrc:1: display library 'nogui' not available
00000000000e[SIM   ] notify called, but no bxevent_callback function is registered
00000000000e[SIM   ] notify called, but no bxevent_callback function is registered
========================================================================
Bochs is exiting with the following message:
[      ] .bochsrc:1: display library 'nogui' not available
========================================================================
00000000000i[SIM   ] quit_sim called with exit code 1

I also searched for tutorials and saw somebody install bochs-sdl via the command sudo apt-get install bochs-sdl and, knowing sdl and nogui were both listed as options, i tried downloading a specific package bochs-nogui that might have been missing, but there was no package with that name. For reference, i installed bochs by doing sudo apt-get install bochs.

Edit: I looked through bochs' command line configuration interface and on the github file and there was another text option called term, but when i tried that one it said the open failed for the term module and that it was not found.

========================================================================
                       Bochs x86 Emulator 2.6.11
              Built from SVN snapshot on January 5, 2020
                Timestamp: Sun Jan  5 08:36:00 CET 2020
========================================================================
00000000000i[      ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'
00000000000i[      ] BXSHARE not set. using compile time default '/usr/share/bochs'
00000000000i[      ] lt_dlhandle is 0x560ebc18b870
00000000000i[PLUGIN] loaded plugin libbx_unmapped.so
00000000000i[      ] lt_dlhandle is 0x560ebc18c890
00000000000i[PLUGIN] loaded plugin libbx_biosdev.so
00000000000i[      ] lt_dlhandle is 0x560ebc18d230
00000000000i[PLUGIN] loaded plugin libbx_speaker.so
00000000000i[      ] lt_dlhandle is 0x560ebc18efb0
00000000000i[PLUGIN] loaded plugin libbx_extfpuirq.so
00000000000i[      ] lt_dlhandle is 0x560ebc18f780
00000000000i[PLUGIN] loaded plugin libbx_parallel.so
00000000000i[      ] lt_dlhandle is 0x560ebc1913e0
00000000000i[PLUGIN] loaded plugin libbx_serial.so
00000000000i[      ] lt_dlhandle is 0x560ebc1957e0
00000000000i[PLUGIN] loaded plugin libbx_gameport.so
00000000000i[      ] lt_dlhandle is 0x560ebc196010
00000000000i[PLUGIN] loaded plugin libbx_iodebug.so
00000000000i[      ] reading configuration from .bochsrc
00000000000i[      ] lt_dlhandle is (nil)
00000000000p[      ] >>PANIC<< dlopen failed for module 'term' (libbx_term.so): file not found
========================================================================
Event type: PANIC
Device: [      ]
Message: dlopen failed for module 'term' (libbx_term.so): file not found

A PANIC has occurred.  Do you want to:
  cont       - continue execution
  alwayscont - continue execution, and don't ask again.
               This affects only PANIC events from device [      ]
  die        - stop execution now
  abort      - dump core 
  debug      - continue and return to bochs debugger
Choose one of the actions above: [die] 
========================================================================
Bochs is exiting with the following message:
[      ] dlopen failed for module 'term' (libbx_term.so): file not found
========================================================================
00000000000i[SIM   ] quit_sim called with exit code 1
1

There are 1 best solutions below

4
fenix_8 On

In case you could make it work and launch it, anyway Bochs for linux doesn't work very well simulating and running your code. Instead I use Bochs for Windows under WINE and my code runs very well. In a command line environment you could install xorg, wine, winetricks.

Then launch xserver:

$ exec startx

Three windows will appear, you can choose to work on anyone but do not close the others.

Then configure wine. I always emulate default "win7"

$ winecfg

You can try launching "notepad":

$ wine notepad

If it's all right then install Bochs for Windows:

$ wine "/home/YOUR-USER/Downloads/Bochs-win32-2.6.11.exe"

Finally you can launch "bochs.exe":

$ wine "/home/YOUR-USER/.wine/drive_c/Program Files (x86)/Bochs-2.6.11/bochs.exe"

The quotes are necessary. You can put this command line in a script file (xx.sh)

See the Bochs start Menu

Select the "Edit Options" and EDIT each one on the fly. "Disk & Boot" is necessary at least. Then press START and voila.

I'm a 100% Debian user GUI, but I had try it yesterday on an ArchLinux pure command line environment, and works fine.

If you choose to load a "configuration file" maybe will not work. I always simulate editing from the wizard Menu.