-
Notifications
You must be signed in to change notification settings - Fork 107
Booting Harvey on real hardware II (USB)
If you don't feel comfortable with previous network setup for booting Harvey in a real machine or just don't wanna make too much setup on host machine, or just you only have one computer available, this time we'll cover how to boot Harvey on a real computer booting from a USB dongle instead (pendrive, memory bird...). You will need:
-
Booting from USB locally
- A working computer of x86_64 (amd64) architecture USB disk booting capable (check your BIOS or UEFI settings).
-
Booting from USB and connecting to a ninep external server
- Previous working computer.
- A Local Area Network (LAN) ready.
- Another computer which will be the host, storing the main file server.
Assuming you have a computer in what you built Harvey following previous instructions:
-
1. Build raw image
cd util sudo ./syslinux -imgtype raw
-
2. Write to USB
Assuming your USB stick is at
/dev/sdc
(check withlsblk
first!):sudo dd if=harvey.raw of=/dev/sdc bs=1MB status=progress
If your machine has UEFI, ensure you disable any security measure which could break the load of a kernel through a USB disk. Then, BIOS/UEFI, select as primary device the USB disk. 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 keeping plugged the USB dongle. Select the 1st option from the syslinux menu and wait for loading Harvey kernel and see how it boots a cpuserver. Connect to it through a drawterm.
As usual, we'll cover the case of a host with Linux and a machine for booting Harvey. 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.
Run ninep manually in another shell session just executing this:
util/ufs -root=/$HARVEY-REPO_PATH -debug=3
On the host machine in what you built Harvey and have ninep running:
-
1. Build raw image
Unless your host machine had an IP address 10.0.2.2, you will have to edit
util/src/harvey/cmd/syslinux/syslinux.go
and changefs
andauth
kernel parmameters for your convenience in line 45:LABEL 1 TEXT HELP Boot Harvey kernel with remote filesystem (10.0.2.2) ENDTEXT MENU LABEL Harvey OS (Remote FS) KERNEL mboot.c32 APPEND ../harvey service=cpu nobootprompt=tcp maxcores=1024 fs=10.0.2.2 auth=10.0.2.2 nvram=/boot/nvram nvrlen=512 nvroff=0 acpiirq=1 mouseport=ps2 vgasize=1024x768x24 monitor=vesa
Then rebuild the syslinux.go tool with:
GOBIN="$(pwd)/util" GOPATH="$(pwd)/util/third_party:$(pwd)/util" go get harvey/cmd/...
Finally create the raw:
cd util sudo ./syslinux -imgtype raw
-
2. Write to USB
Assuming your USB stick is at
/dev/sdc
(check withlsblk
first!):sudo dd if=harvey.raw of=/dev/sdc bs=1MB status=progress
If your machine has UEFI, ensure you disable any security measure which could break the load of a kernel through a USB disk. Then, BIOS/UEFI, select as primary device the USB disk. 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 keeping plugged the USB dongle. Select the 2nd option from the syslinux menu and wait for loading Harvey kernel and see how it boots a cpuserver. Connect to it through a drawterm.