Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Booting Harvey on real hardware I (TFTP)

Daniel Maslowski edited this page Jul 20, 2020 · 16 revisions

One of the goals of every operating system has is to run in a real machine. This how to covers a method for booting from network through PXE. You will need:

  • A working computer of x86_64 (amd64) architecture PXE booting capable (check your BIOS or UEFI settings).
  • A Local Area Network (LAN) ready.
  • Another computer which will be the host, running the tftp and http server for the kernel (pxeserver) and the 9p file server (ufs)

We'll cover for this case a host with Linux and an empty "dumb" machine for booting Harvey. So if you're using one of the other platforms covered in Getting Started, just follow the proper instructions for your platform there. You won't need any disk support for this since the main file server will be served by the Linux host machine.

Preparing the host

  1. Build harvey
  2. Build pxeserver from u-root. We will assume pxeserver will be built in $HOME/go/bin:
go get github.com/u-root/u-root
go install github.com/u-root/u-root/cmds/exp/pxeserver
  1. Create the file $HARVEY/cfg/pxe/tftpboot/pxelinux.cfg/default, and paste the following into it, taking care to change the references to 192.168.0.19 with the IP address of the machine that will run pxeserver and ufs:
DEFAULT harvey
LABEL harvey
  KERNEL mboot.c32
  APPEND http://192.168.0.19/harvey.32bit service=cpu nobootprompt=tcp maxcores=1024 fs=192.168.0.19 auth=192.168.0.19 nvram=/boot/nvram nvrlen=512 nvroff=0 acpiirq=1
  1. Run ufs: $HARVEY/util/ufs -root=$HARVEY -debug=3
  2. Run pxeserver, taking care to change the IP address and interface to that of the machine running pxeserver:
sudo $HOME/go/bin/pxeserver \
  -tftp-dir $HARVEY/cfg/pxe/tftpboot/ \
  -http-dir $HARVEY/cfg/pxe/tftpboot/ \
  -bootfilename lpxelinux.0 \
  -interface enp0s31f6 \
  -ip 192.168.0.19

Preparing the target

If your machine has UEFI, ensure you disable any security measure which could break the load of a kernel through the network. Then, BIOS/UEFI, select as primary device the network card and enable PXE protocol. This could be very different between vendors, so please read the manual of your motherboard: it always has worth.

Once done, just reboot the machine and wait for loading Harvey kernel and see how it boots a cpuserver. Connect to it through a drawterm.

Clone this wiki locally