Run FreeBSD on Linux + qemu

Introduction

Here are the steps to run FreeBSD on Linux + qemu.

In each explanation below, the command to be actually executed is described in the following format.

$sudo apt install package name

Actually, when you execute the above command, the progress of package installation is displayed, but these are omitted on this page.

Execution environment, etc.

Uses Ubuntu 20.04.1 LTS.

Package installation

Make the following settings on Ubuntu.

$ sudo apt install qemu-system-x86
$ sudo gpasswd -a $(whoami) kvm

FreeBSD installation

To install FreeBSD, do the following on Ubuntu:

$ mkdir -p ~/VM/fbsd122
$ cd ~/VM/fbsd122
$ qemu-img create -f qcow2 fbsd122.qcow2 16g
$ wget https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/12.2/FreeBSD-12.2-RELEASE-amd64-disc1.iso

Start FreeBSD with FreeBSD-12.2-RELEASE-amd64-disc1.iso.

$ qemu-system-x86_64 -enable-kvm -m 1024 -boot order=d -cdrom FreeBSD-12.2-RELEASE-amd64-disc1.iso fbsd122.qcow2

qemu-freebsd-start.png qemu-freebsd-installer.png Operate FreeBSD on the above QEMU Window.

Please refer to the following documents for the installation procedure of FreeBSD.

Please note the following two points as installation precautions.

Setting root password

During the installation, the following screen will be displayed and you will be prompted to enter the "root" password.

Registration of general users

The following screen will be displayed during installation, prompting you to register as a general user.

Operation at the end of installation

When the installation is complete, the dialog "Complete" will be displayed. Press the TAB key to select "Live CD" and press the Enter key. qemu-freebsd-complete.png When "login:" is displayed, type "root" and press the Enter key.

Boot from HDD

If you remove the "-boot" and "-cdrom" during installation and run it, FreeBSD will boot from the HDD.

$ qemu-system-x86_64 -enable-kvm -m 1024 fbsd122.qcow2

qemu-hdd-login.png For login:, type root and press Enter. qemu-hdd-password.png For "Password:", enter the "root" password that you set when you installed FreeBSD and press Enter.

FreeBSD shutdown

Log in as root, type "shutdown -p now" and press Enter to shut down FreeBSD. qemu-hdd-shutdown.png When the shutdown is complete, the QEMU Window disappears.

Recommended Posts

Run FreeBSD on Linux + qemu
Run Linux on ARM architecture with QEMU
Run a Linux server on GCP
[Note] Run Django on Amazon Linux 2
Run docker-compose on Amazon Linux2 on ARM64
Run Yocto on Ubuntu using QEMU.
Run cron on Amazon Linux (set on Linux)
Run Radeon GPU on Windows on QEMU / KVM
Run bootgen on Debian GNU / Linux, Ubuntu
Run Keycloak on Amazon Linux 2 without Docker
Run Debian (Linux) & LXQt on Athlon 200GE (AMD)
Daemonizing processes on Linux
jblas on Arch Linux
Linux (WSL) on Windows
NAT router on Linux
Run mysqlclient on Lambda
Run OpenMVG on Mac
Monitor traffic on Linux
Update vscode on linux
Try NeosVR on Linux
Check capacity on Linux
LiveUSB creation on Linux
Linux operation on Win10
Run Kali Linux on Windows with GUI (without VirtualBox)
Install Docker on Arch Linux and run it remotely
NTP configuration memo on Linux
Install Minecraft on Arch Linux
Run Jupyter on Ubuntu on Windows
Run Openpose on Python (Windows)
Install Linux on your Chromebox
Downgrade Mcomix on Arch Linux
Monitor disk usage on Linux
Use Github Desktop on Linux
Install the JDK on Linux
Elixir = Comfortable on Linux Mint
Run Lima Driver on Debian GNU / Linux for Ultra96 / Ultra96-V2
Recording and playback on Linux
Check TTL on Linux router
Run Tensorflow 2.x on Python 3.7
Put jenv on Amazon Linux
Easy df command on Linux
Run Python CGI on CORESERVER
Linux on Windows -1-: debian introduction
Install tomcat 5.5 on Amazon Linux.
Introducing Elixir on Linux Mint
Use sshpass on Amazon linux2
Install Homebrew on Amazon Linux 2
Run IPython Notebook on Docker
Run YOLO v3 on AWS v2
Paste the link on linux
Install strongSwan 5.9.1 on Amazon Linux 2
Run Amazon Linux 2 in VirtualBox
Run CircuitPython on Seeeduino XIAO
Linux environment construction (on WSL environment)
Run Jupyter Notebook on windows
Run OpenVino on macOS Catalina
Use Linux on Windows 10 (WSL2)
Run YOLO v3 on AWS
Run X Window on Debian GNU / Linux for Ultra96 / Ultra96-V2 (LibMali)
Setting up OpenSSH on Arch Linux
Use host.docker.internal on linux (docker-compose required)