diff --git a/Makefile b/Makefile index 408d6a4..bd091d5 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ _ck_root: [ `whoami` = 'root' ] # Only root can summon vmdb2 ☹ _clean_yaml: - rm -f $(addsuffix .yaml,$(platforms)) raspi_base_buster.yaml raspi_base_bullseye.yaml + rm -f $(addsuffix .yaml,$(platforms)) raspi_base_buster.yaml raspi_base_bullseye.yaml raspi_base_bookworm.yaml _clean_images: rm -f $(addsuffix .img,$(platforms)) _clean_xzimages: diff --git a/raspi_master.yaml b/raspi_master.yaml index bfae52a..683f71e 100644 --- a/raspi_master.yaml +++ b/raspi_master.yaml @@ -134,14 +134,17 @@ steps: rm -rf /var/lib/apt/lists # Modify the kernel commandline we take from the firmware to boot from - # the partition labeled raspiroot instead of forcing it to mmcblk0p2 + # the partition labeled raspiroot instead of forcing it to mmcblk0p2. + # Also insert the serial console right before the root= parameter. # # These changes will be overwritten after the hardware is probed - # after dpkg reconfigures raspi-firmware (upon first boot). + # after dpkg reconfigures raspi-firmware (upon first boot), so make + # sure we don't lose label-based booting. - chroot: / shell: | - sed -i 's/^/console=__SERIAL_CONSOLE__ /' /boot/firmware/cmdline.txt - sed -i 's/.dev.mmcblk0p2/LABEL=RASPIROOT/' /boot/firmware/cmdline.txt + sed -i 's/root=/console=__SERIAL_CONSOLE__ root=/' /boot/firmware/cmdline.txt + sed -i 's#root=/dev/mmcblk0p2#root=LABEL=RASPIROOT#' /boot/firmware/cmdline.txt + sed -i 's/^#ROOTPART=.*/ROOTPART=LABEL=RASPIROOT/' /etc/default/raspi-firmware __EXTRA_CHROOT_SHELL_CMDS__ @@ -160,6 +163,8 @@ steps: # populated during installation. # # Note this will also trigger ConditionFirstBoot=yes for systemd. + # On Buster, /etc/machine-id should be an emtpy file, not an absent file + # On Bullseye, /etc/machine-id should not exist in an image - chroot: / shell: | rm -f /etc/machine-id /var/lib/dbus/machine-id