aboutsummaryrefslogtreecommitdiff
path: root/build-arch-gce
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-07-03 02:44:36 +0700
committerShulhan <ms@kilabit.info>2022-07-25 19:29:22 +0700
commitab59d4594202172caf6d2ba05cf27712f84e8a94 (patch)
treefcf31f167bac94bd299e03d65183d35f152061ee /build-arch-gce
parent885f8119b4bc45805522c51428243e7928d13093 (diff)
downloadcompute-archlinux-image-builder-ab59d4594202172caf6d2ba05cf27712f84e8a94.tar.xz
all: use predefined files to configure boot loader
Diffstat (limited to 'build-arch-gce')
-rwxr-xr-xbuild-arch-gce30
1 files changed, 7 insertions, 23 deletions
diff --git a/build-arch-gce b/build-arch-gce
index 8881ed7..f0922ff 100755
--- a/build-arch-gce
+++ b/build-arch-gce
@@ -177,31 +177,15 @@ arch-chroot -- "$mount_dir" /bin/bash -s <<-'EOS'
echo '-- Running boot loader.'
bootctl install --no-variables --quiet
+EOS
- echo '-- Configuring boot loader.'
- cat <<-'EOF' > /boot/loader/loader.conf
- default arch.conf
- editor no
- EOF
- cat <<-'EOF' > /boot/loader/entries/arch.conf
- title Arch Linux
- linux /vmlinuz-linux
- initrd /initramfs-linux.img
- options rw console=ttyS0,38400n8 net.ifnames=0 scsi_mod.use_blk_mq=Y
- EOF
- mkdir -p -- "/etc/pacman.d/hooks"
- cat <<-'EOF' > /etc/pacman.d/hooks/00-systemd-boot.hook
- [Trigger]
- Type = Package
- Operation = Upgrade
- Target = systemd
+echo '- Configuring boot loader.'
+cp ./sys/efi/loader/loader.conf $mount_dir/boot/loader/
+cp ./sys/efi/loader/entries/arch.conf $mount_dir/boot/loader/entries/
- [Action]
- Description = Gracefully upgrading systemd-boot...
- When = PostTransaction
- Exec = /usr/bin/systemctl restart systemd-boot-update.service
- EOF
-EOS
+echo '- Configuring pacman hooks.'
+mkdir -p -- "$mount_dir/etc/pacman.d/hooks"
+cp ./sys/etc/pacman.d/hooks/00-systemd-boot.hook $mount_dir/etc/pacman.d/hooks/
echo '- Cleaning up and finalizing the image.'
> "$mount_dir/etc/machine-id"