ED 410: Qemu Emulator (20 extra)
What You Need
- A Google Cloud Linux machine with a graphical desktop. I used
the Google Chrome desktop.
Purpose
To get various operating systems
and hardware platforms running in the Qemu
emulator.
Downloading a FreeDos Disk Image
On your Linux desktop,
open Firefox and go to
https://sourceforge.net/projects/bochs/files
Click "Disk Images".
Click "FreeDos".
Click fdos-10meg.tar.gz.
Save the file.
On your Linux machine,
open a Terminal and
execute these commands:
cd
cd snap/firefox/common/Downloads/
tar xvzf fdos-10meg.tar.gz
cp fdos-10meg/fdosmini.img ~
Installing Qemu-Kvm
On your Linux machine,
open a Terminal and
execute these commands,
one at a time.
You will need to enter your super
password twice.
su super
sudo apt install qemu -y
exit
cd
qemu-system-i386 -drive format=raw,file=fdosmini.img
Flag ED 410.1: Help Page (10 pts)
In the FreeDOS window, execute this command:
help
A page appears. The flag is covered
by a green box in the image below.
Installing Alpine Linux
On your Linux desktop, in Firefox, go to:
https://wiki.alpinelinux.org/wiki/Install_Alpine_in_Qemu
At the too of the page, click
"latest Alpine image".
In the "VIRTUAL" section, click
the green x86
button,
as shown below.
Save the file.
On your Linux machine,
open a Terminal and
execute these commands:
cd
mv snap/firefox/common/Downloads/alp* .
qemu-system-i386 -drive format=raw,file=fdosmini.img
Create the Virtual Machine
Create a disk image if you want to install Alpine Linux.
qemu-img create -f qcow2 alpine.qcow2 512M
Execute this command to start QEMU,
booting from the Alpine ISO image:
qemu-system-x86_64 -m 512 -boot d -cdrom alpine-virt-3.10.3-x86.iso -hda alpine.qcow2
After a minute or two it boots up and shows a "login:" prompt.
Log in as root (no password) and run:
setup-alpine
Follow the setup-alpine installation steps,
as listed below:
- Select leyboard layout [none]: us
- Select variant []: us
- Enter system hostname ...: alpine
- Which one do you want to initialize ... [eth0] >Enter
- Ip address ... [dhcp] Enter
- Do you want to do any manual network configuration? [no] Enter
- New password Your choice
- Retype password Your choice
- Which timezone ... [UTC] Enter
- HTTP/FTP proxy ... [none] Enter
- Enter mirror number ... [f] Enter
- Which SSH server ... [openssh] Enter
- Which disk(s) would you like to use ... [none] sda
- How would you like to use it? ... [?] sys
When you see the message: "Installation is complete. Please reboot.",
execute this command in the QEMU window:
poweroff
Execute this command to start QEMU,
from your disk image:
qemu-system-x86_64 -m 512 -hda alpine.qcow2
Log in as root with the password you
specified during installation.
Flag ED 410.2: Version (10 pts)
Execute this command in the QEMU window:
uname -a
The flag is covered by a green box in the
image
below:
Sources
Snippet 0x0E: Booting image files and ISOs with KVM/QEMU (EFI and BIOS)
Install KVM on Ubuntu 14.04 LTS Desktop
How to Install and Use QEMU on Debian 9
Install Alpine in Qemu
Android-x86
How to find your Google Cloud project ID
RASPBERRY PI ON QEMU
Posted 11-26-19
Point total corrected 12-9-19