Skip to content

Instantly share code, notes, and snippets.

@hrefhref
Last active October 30, 2020 10:09
Show Gist options
  • Save hrefhref/927bfca9c6a8966c2846e305df7efc7e to your computer and use it in GitHub Desktop.
Save hrefhref/927bfca9c6a8966c2846e305df7efc7e to your computer and use it in GitHub Desktop.
Install FreeBSD or other OSes more easily on Online.net/Scaleway Dedibox by using qemu in rescue
* Passer en rescue
root
With NVMe:
apt-get update && apt-get install -y qemu-system qemu-kvm ovmf \
&& wget https://download.freebsd.org/ftp/releases/ISO-IMAGES/12.1/FreeBSD-12.1-RELEASE-amd64-disc1.iso \
&& qemu-system-x86_64 -drive if=none,format=raw,media=disk,file=/dev/nvme0n1,id=nvme0 -drive if=none,format=raw,media=disk,file=/dev/nvme1n1,id=nvme1 \
-device nvme,drive=nvme0,serial=0 -device nvme,drive=nvme1,serial=1 -display curses \
-net none -smp $(nproc) -m 32G -cdrom ./FreeBSD-12.1-RELEASE-amd64-disc1.iso -enable-kvm -bios /usr/share/ovmf/OVMF.fd -serial stdio -boot d
Without NVMe, and VNC (Spice) (thanks shann):
qemu-system-x86_64 -hda /dev/sda -hdb /dev/sdb -hdc /dev/sdc -net none -smp $(nproc) -m 32G -drive format=raw,media=cdrom,readonly,file=ovirt-node-ng-installer-4.4.2-2020091810.el8.iso -enable-kvm -vga qxl -spice port=5900,password=monpassamoi -device virtio-serial-pci -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 -chardev spicevmc,id=spicechannel0,name=vdagent -boot d
* Then setup FreeBSD
* Don't setup networking
* When done, go to the in shell
fdisk -B -b /boot/boot0 /dev/nvme0
fdisk -B -b /boot/boot0 /dev/nvme1
vi /etc/rc.conf and add config lines for your correct network interface (name depends on the driver)
ifconfig_ix0="DHCP"
ifconfig_ix1="DHCP"
Save and exit
------
Original idea by guillaume vincent: https://gist.github.com/guillaumevincent/63bac46a2da20e9e4e39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment