Running GoboLinux under QEMU
This article is potentially out of date!
You can find a more up-to-date approach here: https://gist.github.com/fyrak1s/fd58e1bcb3a9ead77588a83e087ed376. These resources are meant to be merged in the future.
We’ll illustrate how to:
- create a disk image
- boot an ISO image of Gobo under QEMU
- install Gobo to a disk image on the host filesystem
- reboot the newly installed guest
- initialize networking
- launch QEMU from a helper script
Create a disk image
This is where we will install our Linux system.
Boot the installer
Here is the full command you can edit and paste into the terminal:
To test boot only the ISO, omit the -hda option.
Boot the disk image
After you’ve finished the installation, shutdown the guest OS and terminate QEMU. Start QEMU again, this time booting from the disk image:
Networking under QEMU
QEMU provides a networking stack so that the guest OS running on this virtual machine can access the internet, or ssh to the host.
The only extra setup needed is to run Gobo’s DHCP client inside the guest.
By default QEMU acts as a firewall and does not permit any incoming traffic. It also doesn’t support protocols other than TCP and UDP. This means that ping and other ICMP utilities won’t work.
Details can be found here.
Helper script
Qemust is a perl5 script you can use to start your QEMU processes. With most
options defined in the script, the command line becomes much simpler.
To boot from an ISO and install to a disk image:
To boot from the disk image
To test an ISO:
The script has some library dependencies. The most convenient way to install
them (and any CPAN modules) is to use cpanminus (cpanm). So install
cpanminus, then the dependencies:
The script follows below. Edit the QEMU options to your liking, put the script
in somewhere in your $PATH, and make it executable with something like
chmod a+x ~/bin/qemust.