Created
May 14, 2020 07:33
-
-
Save Swipe650/5d0301b319377dd1d79501c90becdd37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Configure systemd-boot | |
arch-chroot /mnt bootctl --path=/boot install | |
arch-chroot /mnt bootctl update | |
# pacman hook | |
mkdir -p /mnt/etc/pacman.d/hooks | |
cat > /mnt/etc/pacman.d/hooks/100-systemd-boot.hook << EOF | |
[Trigger] | |
Type = Package | |
Operation = Upgrade | |
Target = systemd | |
[Action] | |
Description = Updating systemd-boot. | |
When = PostTransaction | |
Exec = /usr/bin/bootctl update | |
EOF | |
# Create systemd-boot config files | |
cat > /mnt/boot/loader/loader.conf << EOF | |
default arch | |
timeout 0 | |
console-mode max | |
editor no | |
EOF | |
cat > /mnt/boot/loader/entries/arch.conf << EOF | |
title Arch Linux | |
linux /vmlinuz-linux | |
initrd /intel-ucode.img | |
initrd /initramfs-linux.img | |
options root=PARTUUID=$(blkid -s PARTUUID -o value "${root_partition}") rw quiet | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment