Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions vagrant/boxes/archlinux_systemd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,19 +169,18 @@ MACHINE_ID="$(</etc/machine-id)"
# we return non-zero if we, for whatever reason, fail to parse the version, just to make
# debugging easier.
KERNEL_VER="$(pacman -Ql linux | grep vmlinuz | sed -nr 's/^.+\/([^/]+)\/vmlinuz$/\1/p;tx;q1;:x')"
BOOT="$(bootctl --print-boot-path)"

bootctl install
cat >/efi/loader/entries/arch.conf <<EOF
cat >"$BOOT/loader/entries/arch.conf" <<EOF
title ArchLinux
linux /$MACHINE_ID/$KERNEL_VER/linux
initrd /$MACHINE_ID/$KERNEL_VER/initrd
options root=UUID=$(findmnt -n -o UUID /) rw console=ttyS0 net.ifnames=0
EOF
# Follow the recommended layout from the Boot Loader Specification
mkdir -p "/efi/$MACHINE_ID/$KERNEL_VER"
mv -v /boot/vmlinuz-linux "/efi/$MACHINE_ID/$KERNEL_VER/linux"
mv -v /boot/initramfs-linux.img "/efi/$MACHINE_ID/$KERNEL_VER/initrd"
mkdir -p "$BOOT/$MACHINE_ID/$KERNEL_VER"
mv -v /boot/vmlinuz-linux "$BOOT/$MACHINE_ID/$KERNEL_VER/linux"
mv -v /boot/initramfs-linux.img "$BOOT/$MACHINE_ID/$KERNEL_VER/initrd"
bootctl status
pacman -Rcnsu --noconfirm grub
# shellcheck disable=SC2114
rm -rf /boot
2 changes: 1 addition & 1 deletion vagrant/vagrant-make-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ if [[ "${VAGRANT_FILE##*/}" == "Vagrantfile_archlinux_systemd" ]]; then
vagrant ssh -c 'lsblk; df -h /'
# Also, sanity-check the whole BLS stuff
# shellcheck disable=SC2016
vagrant ssh -c 'sudo bash -xec "ls -lR /efi; cat /etc/machine-id; [[ -e /efi/$(</etc/machine-id)/$(uname -r)/linux ]]"'
vagrant ssh -c 'sudo bash -xec "ls -lR $(bootctl -x); cat /etc/machine-id; [[ -e $(bootctl -x)/$(</etc/machine-id)/$(uname -r)/linux ]]"'
vagrant halt
fi

Expand Down
Loading