-
Notifications
You must be signed in to change notification settings - Fork 111
Booting Harvey on real hardware I (TFTP)
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, storing the main file server and dnsmasq program.
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.
The first step here is having Harvey built and ninep ready. So we'll assume you followed building tutorial and you have all the system ready.
In a Debian or Ubuntu distribution you just need to do sudo apt install dnsmasq
.
Run ninep manually in another shell session just executing this:
util/ufs -root=/$HARVEY-REPO_PATH -debug=3
Then setup dnsmasq.conf
replacing data for your convenience:
domain-needed
bogus-priv
strict-order
interface=eth0
local-service
expand-hosts
domain=yourdomain.net
dhcp-range=192.168.1.101,192.168.1.150,2h
dhcp-option=3,192.168.1.1
dhcp-boot=pxelinux.0,yourhost,192.168.1.2
enable-tftp
tftp-root=/media/src/harvey/cfg/pxe/tftpboot
dhcp-authoritative
log-queries
log-dhcp
As you can see, tftp-root
will be the path to your Harvey's tree until cfg/pxe/tftpboot
. Replace the yourfoo
names for your convenience as well the IPs.
For finishing dnsmasq setup, go to cfg/pxe/tftpboot/pxelinux.cfg/
and make a default
file there with this content:
label harvey.32bit
kernel mboot.c32
append harvey.32bit service=cpu nobootprompt=tcp fs=192.168.1.2 auth=192.168.1.2 nvram=/boot/nvram nvrlen=512 nvroff=0 acpiirq=1
default harvey.32bit
One more time adjust the IPs to your Linux host address.
Then reload dnsmasq for getting the new configuration through sudo systemctl reload dnsmasq
. You're now ready for going to the computer which will boot Harvey.
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.