I wrote a previous article about the centos-I386 + Bochs +VirtualBox environment setup. You can also install Bochs directly on the MAC of the host machine, which is much simpler.
Bochs installation
brew install bochs
Copy the code
Bochs configuration
If the configuration is as follows, comment out the line of the KEYBOARD on the MAC; otherwise, an error message is displayed.
megs: 32
romimage: file=/usr/local/share/bochs/BIOS-bochs-latest
vgaromimage: file=/usr/local/share/bochs/VGABIOS-lgpl-latest
boot: disk
log: bochs.out
mouse: enabled=0
#keyboard: keymap=/usr/local/share/bochs/keymaps/sdl-pc-us.map
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, path="hd60M.img", mode=flat
#gdbstub: enabled=1, port=1234, text_base=0, data_base=0, bss_base=0
Copy the code
The virtual disk is then created using bxImage. After entering bximage directly on the command line, follow the instructions step by step.
Unknown option: -hd if bximage-hd-mode =”flat” -size=60 -q hd60m. img is used in Linux. Unknown option: -hd
mbr
Then, following the procedure in hands-on MBR code, the following 1 MBR character can be successfully displayed in Bochs as well.