diff --git a/howto/new-machine-cymru.md b/howto/new-machine-cymru.md index 12ef9990a136dd845180ed632a371ac89b770961..af50658ac91d422310aaeb067bbf7883a25a3e7a 100644 --- a/howto/new-machine-cymru.md +++ b/howto/new-machine-cymru.md @@ -220,34 +220,36 @@ on-disk install. But in my last attempts, it failed during `pivot_root` and unmounting everything would fix this, but at that point it becomes a bit too complicated. -### boot setup +### remount procedure -TODO: in the last attempt at following this config ([ticket -40065](https://gitlab.torproject.org/tpo/tpa/team/-/issues/40065)), the `/boot` partition wasn't setup properly. Those extra -steps were necessary (more or less): +If you need to do something post-install, this should bring you a +working shell in the `chroot`: cryptsetup luksOpen /dev/sda3 crypt_sda3 && vgchange -a y && mount /dev/mapper/vg_ganeti-root /mnt && - for fs in /run /sys /dev /dev/pts; do mount -o bind $fs /mnt$fs; done && - mv /mnt/boot /mnt/boot.old && - mkdir /mnt/boot && + for fs in /run /sys /dev /dev/pts /proc; do mount -o bind $fs /mnt$fs; done && mount /dev/sda2 /mnt/boot && - mv /mnt/boot.old/* /mnt/boot && - rmdir /mnt/boot.old && + chroot /mnt /bin/bash + +This will rebuild grub: + chroot /mnt update-grub && - chroot /mnt grub-install /dev/sda && + chroot /mnt grub-install /dev/sda + +And this will cleanup the rest: + umount /mnt/boot && - for fs in /dev/pts /dev /sys /run; do umount /mnt$fs; done && + for fs in /dev/pts /dev /sys /run /proc; do umount /mnt$fs; done && umount /mnt && vgchange -a n && cryptsetup luksClose crypt_sda3 ### IP address -TODO: in the last setup, this was also required: - - fab -H root@38.229.82.104 host.rewrite-interfaces 38.229.82.104 24 38.229.82.1 +TODO: in the last setup, the IP address had to be set in +`/etc/network/interfaces` by hand. The automated install assumes DHCP +works, which is not the case here. TODO: IPv6 configuration also needs to be done by hand. hints in new-machine. @@ -275,8 +277,10 @@ TODO: figure out the best way to setup the initramfs. So far we've dumped the IP address in `/etc/default/grub.d/local-ipaddress.cfg` like so: - # for dropbear-initramfs because we don't have dhcp - GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX ip=38.229.82.104::38.229.82.1:255.255.255.0::eth0:off" +``` +# for dropbear-initramfs because we don't have dhcp +GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX ip=38.229.82.104::38.229.82.1:255.255.255.0::eth0:off" +``` ... but it seems it's also possible to specify the IP by configuring the initramfs itself, in `/etc/initramfs-tools/conf.d/ip`, for example