Previously, HOME was inherited from the environment of the init process, which
has HOME=/ set. Of course, / is not writable on gokrazy, so this change makes
things less strict and should therefore not break any deployments.
The first update always worked, but a subsequent update would not.
To manually switch an installation to PARTUUID, mount its boot partition and
replace the root= kernel parameter in cmdline.txt, like so:
/tmp/breakglass669384965 # mkdir boot
/tmp/breakglass669384965 # mount /dev/mmcblk0p1 boot
/tmp/breakglass669384965 # cat boot/cmdline.txt
console=ttyAMA0,115200 root=/dev/mmcblk0p2 init=/gokrazy/init elevator=deadline rootwait
/tmp/breakglass669384965 # sed -i 's,root=/dev/mmcblk0p,root=PARTUUID=471cad93-0,g' boot/cmdline.txt
/tmp/breakglass669384965 # cat boot/cmdline.txt
console=ttyAMA0,115200 root=PARTUUID=471cad93-02 init=/gokrazy/init elevator=deadline rootwait
/tmp/breakglass669384965 # umount boot
/tmp/breakglass669384965 # reboot
The PARTUUID= for your installation is printed by gokr-packer:
[…]
2020/05/01 10:05:34 write.go:366: writing MBR (LBAs: vmlinuz=51789, cmdline.txt=119561, PARTUUID=471cad93)
[…]
To configure, run the following command in an interactive shell (e.g. via
breakglass, or when mounting the permanent partition of the SD card on the
host):
mkdir /perm/remote_syslog
echo 10.0.0.76:514 > /perm/remote_syslog/target
I recommend using a (static) IP address for increased reliability, so that
remote syslog works even when DNS does not.
fixes#50
All existing DHCPv4 packages I looked at were unappealing for one reason or
another, so we’re now using a little helper to glue github.com/google/gopacket
and github.com/mdlayher/raw together, which suffices for our use-case and gives
us more control.
When calling reboot shortly after /update/*, the kernel should flush its cache,
but if you’re not calling reboot, it would be good to persist the data on disk
nevertheless.
We can do away with a bunch of hacks now, but we’ll keep them around for a
little while to make updates easier (i.e. to boot with old and new gokr-packer
versions, just in case people don’t update both at the same time).
This is useful when the network doesn’t come up correctly: you can connect a
network cable between your computer and the gokrazy machine, press <ENTER> on
the serial console and connect to gokrazy via its IPv6 link-local address (to
find the address, use ping6 ff02::1%eth0).