install grub and configure /etc/mkinitcpio.conf in install script

This commit is contained in:
Maximilian Keßler 2022-07-25 22:55:19 +02:00
parent bdac4a78b4
commit d159004731

View file

@ -129,6 +129,7 @@ fi
### Install and configure the basic system ### ### Install and configure the basic system ###
echo "Installing packages into /mnt" echo "Installing packages into /mnt"
pacman -Sy
pacstrap /mnt mkessler-desktop pacstrap /mnt mkessler-desktop
echo "Configuring mkessler-arch repo in installed system" echo "Configuring mkessler-arch repo in installed system"
@ -153,12 +154,19 @@ arch-chroot /mnt chsh -s /usr/bin/zsh
echo "${user}:${user_password}" | chpasswd --root /mnt echo "${user}:${user_password}" | chpasswd --root /mnt
echo "root:${user_password}" | chpasswd --root /mnt echo "root:${user_password}" | chpasswd --root /mnt
echo "Installing grub bootloader"
# install grub (but not main configuration file)
arch-chroot /mnt grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
echo 'Configuring HOOKS in /etc/mkinitcpio.conf and regenerating initramfs'
sed -i 's/HOOKS=(base udev autodetect consolefont modconf block keyboard fsck)/HOOKS=(base udev autodetect keyboard keymap consolefont modconf block enrcypt lvm2 resume fsck)/' /mnt/etc/mkinitcpio.conf
arch-chroot /mnt mkinitcpio -P
cat <<EOF cat <<EOF
--------------------- ---------------------
Installed basic packages and setup in /mnt Installed basic packages and setup in /mnt
Manual configuration is still needed for the following Manual configuration is still needed for the following
- edit /etc/mkinitcpio.conf and generate initcpio - configure grub parameters, generate main grub.cfg
- install grub, configure grub parameters, generate main grub.cfg
--------------------- ---------------------
EOF EOF