Update install-grub.sh

This commit is contained in:
proledatarian 2022-04-06 18:19:03 +00:00
parent 0c24d207c5
commit 01abbcc078
1 changed files with 13 additions and 28 deletions

View File

@ -345,41 +345,26 @@ echo
# Install bootloader. # Install bootloader.
echo "Installing GRUB." echo "Installing GRUB."
arch-chroot /mnt grub-install --target=i386-pc /dev/$dev && arch-chroot /mnt grub-install --target=i386-pc /dev/$dev &&
sed -i '7s/.*/GRUB_CMDLINE_LINUX="cryptdevice=/dev/$main:lvm root=/dev/mapper/main-root"/' /mnt/etc/default/grub &&
sed -i '10s/.*/GRUB_PRELOAD_MODULES="part_gpt part_msdos lvm"/' /mnt/etc/default/grub &&
arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg && arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg &&
echo "Done." echo "Done."
echo echo
# Set bootloader entry. # Set bootloader entry.
echo "Setting up bootloader." #echo "Setting up bootloader."
cat << EOF > /mnt/boot/loader/entries/arch.conf && #cat << EOF > /mnt/boot/loader/entries/arch.conf &&
title Arch Linux #title Arch Linux
linux /vmlinuz-linux-zen #linux /vmlinuz-linux-zen
#initrd /amd-ucode.img ##initrd /amd-ucode.img
#initrd /intel-ucode.img #initrd /intel-ucode.img
initrd /initramfs-linux-zen.img #initrd /initramfs-linux-zen.img
options cryptdevice=/dev/$main:lvm #options cryptdevice=/dev/$main:lvm
options root=/dev/mapper/main-root rw #options root=/dev/mapper/main-root rw
options lang=de locale=de_DE.UTF-8 #options lang=de locale=de_DE.UTF-8
options init=/usr/lib/systemd/systemd #options init=/usr/lib/systemd/systemd
#options loglevel=3 #options loglevel=3
EOF #EOF
# Set bootloader fallback entry.
cat << EOF > /mnt/boot/loader/entries/arch-fallback.conf &&
title Arch Linux Fallback
linux /vmlinuz-linux
initrd /initramfs-linux-fallback.img
options cryptdevice=/dev/$main:lvm
options root=/dev/mapper/main-root rw
options lang=de locale=de_DE.UTF-8
options init=/usr/lib/systemd/systemd
EOF
# Set bootloader.
echo "timeout 1" >> /mnt/boot/loader/loader.conf &&
echo "default arch.conf" >> /mnt/boot/loader/loader.conf &&
echo "Done."
echo
# Set username, password and group. # Set username, password and group.
echo "Adding user." echo "Adding user."