From 8c8ed360ecde9498eae866f86d38c13681cef529 Mon Sep 17 00:00:00 2001 From: sticky-note Date: Tue, 12 Nov 2024 17:04:34 +1100 Subject: [PATCH] fix: set `GRUB_CMDLINE_LINUX_DEFAULT` Reestablish an empty `GRUB_CMDLINE_LINUX_DEFAULT` as `late_command`. Signed-off-by: sticky-note --- builds/linux/ubuntu/20-04-lts/data/user-data.pkrtpl.hcl | 2 ++ builds/linux/ubuntu/22-04-lts/data/user-data.pkrtpl.hcl | 2 ++ builds/linux/ubuntu/24-04-lts/data/user-data.pkrtpl.hcl | 2 ++ 3 files changed, 6 insertions(+) diff --git a/builds/linux/ubuntu/20-04-lts/data/user-data.pkrtpl.hcl b/builds/linux/ubuntu/20-04-lts/data/user-data.pkrtpl.hcl index 08a56b7ac..348f55428 100644 --- a/builds/linux/ubuntu/20-04-lts/data/user-data.pkrtpl.hcl +++ b/builds/linux/ubuntu/20-04-lts/data/user-data.pkrtpl.hcl @@ -43,3 +43,5 @@ ${network} - sed -i -e 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /target/etc/ssh/sshd_config - echo '${build_username} ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/${build_username} - curtin in-target --target=/target -- chmod 440 /etc/sudoers.d/${build_username} + - curtin in-target --target=/target -- sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT=""/' /etc/default/grub + - curtin in-target --target=/target -- update-grub diff --git a/builds/linux/ubuntu/22-04-lts/data/user-data.pkrtpl.hcl b/builds/linux/ubuntu/22-04-lts/data/user-data.pkrtpl.hcl index 419cd7315..4d51dee52 100644 --- a/builds/linux/ubuntu/22-04-lts/data/user-data.pkrtpl.hcl +++ b/builds/linux/ubuntu/22-04-lts/data/user-data.pkrtpl.hcl @@ -43,3 +43,5 @@ ${network} - sed -i -e 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /target/etc/ssh/sshd_config - echo '${build_username} ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/${build_username} - curtin in-target --target=/target -- chmod 440 /etc/sudoers.d/${build_username} + - curtin in-target --target=/target -- sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT=""/' /etc/default/grub + - curtin in-target --target=/target -- update-grub diff --git a/builds/linux/ubuntu/24-04-lts/data/user-data.pkrtpl.hcl b/builds/linux/ubuntu/24-04-lts/data/user-data.pkrtpl.hcl index 2616f7f5e..4ed14c34a 100644 --- a/builds/linux/ubuntu/24-04-lts/data/user-data.pkrtpl.hcl +++ b/builds/linux/ubuntu/24-04-lts/data/user-data.pkrtpl.hcl @@ -43,3 +43,5 @@ ${network} - sed -i -e 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /target/etc/ssh/sshd_config - echo '${build_username} ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/${build_username} - curtin in-target --target=/target -- chmod 440 /etc/sudoers.d/${build_username} + - curtin in-target --target=/target -- sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT=""/' /etc/default/grub + - curtin in-target --target=/target -- update-grub