diff --git a/voidlinux/1-pre-install.sh b/voidlinux/1-pre-install.sh index 526b295..f16efe8 100644 --- a/voidlinux/1-pre-install.sh +++ b/voidlinux/1-pre-install.sh @@ -104,6 +104,9 @@ HEREDOC fi # if YES fi # if erase all +# Install essential packages. +xbps-install -y gptfdisk + # ----- Set Passphrase ----- # Input passphrase echo "Type passphrase for the disk encryption." @@ -211,6 +214,7 @@ fi # if the root volun already exist # ADD "rd.auto=1 cryptdevice=/dev/sda2:${LUKS_NAME} root=/dev/mapper/${VGNAME}-${ROOTNAME}" to GRUB. # This is magical part. I have not understood why this is required. # Refer https://wiki.voidlinux.org/Install_LVM_LUKS#Installation_using_void-installer +echo "...Modify /etc/default/grub." sed -i "s#loglevel=4#loglevel=4 rd.auto=1 cryptdevice=/dev/sda2:${LUKS_NAME} root=/dev/mapper/${VGNAME}-${ROOTNAME}#" /etc/default/grub # Finishing message diff --git a/voidlinux/3-post-install.sh b/voidlinux/3-post-install.sh index 730b72c..c4991e5 100644 --- a/voidlinux/3-post-install.sh +++ b/voidlinux/3-post-install.sh @@ -30,7 +30,7 @@ mount -a # Set up the kernel hook of encryption echo "...Install cryptsetup-initramfs package." -xbps-install lvm2 cryptsetup +xbps-install -y lvm2 cryptsetup # Prepare a key file to embed in to the ramfs. echo "...Prepair key file." @@ -57,9 +57,12 @@ echo "...grub-mkconfig." grub-mkconfig -o /boot/grub/grub.cfg # Leave chroot -exit HEREDOC +# Unmount all +echo "...Unmount all." +umount -R /mnt/target + # Finishing message cat <