From 4396d0e6d0d11aa271c5f6845d6ab36e97befbf1 Mon Sep 17 00:00:00 2001 From: Rod Myers <10093452+RodMyers@users.noreply.github.com> Date: Sat, 28 Sep 2019 15:51:34 -0400 Subject: [PATCH] Update void-install-zfs.sh everything but the grub-install line #265, appears to work --- src-sh/void-install-zfs.sh | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src-sh/void-install-zfs.sh b/src-sh/void-install-zfs.sh index 3e71dd6..85c5cea 100755 --- a/src-sh/void-install-zfs.sh +++ b/src-sh/void-install-zfs.sh @@ -152,15 +152,15 @@ echo "Creating Dataset: ${ds}" exit_err $? "Could not create dataset: ${ZPOOL}/${ds}" done -dirs="boot/grub boot/EFI dev etc proc run sys" +dirs="boot/grub boot/efi dev etc proc run sys" for dir in ${dirs} do mkdir -p ${MNT}/${dir} exit_err $? "Could not create directory: ${MNT}/${dir}" done -mount $EFIDRIVE ${MNT}/boot/EFI -exit_err $? "Could not mount EFI boot partition: ${EFIDRIVE} -> ${MNT}/boot/EFI (${BOOTMODE})" +mount $EFIDRIVE ${MNT}/boot/efi +exit_err $? "Could not mount EFI boot partition: ${EFIDRIVE} -> ${MNT}/boot/efi (${BOOTMODE})" dirs="dev proc sys run" @@ -206,8 +206,7 @@ echo echo "Fix dracut and kernel config, then update grub" echo "hostonly=\"yes\"" >> ${MNT}/etc/dracut.conf.d/zol.conf echo "nofsck=\"yes\"" >> ${MNT}/etc/dracut.conf.d/zol.conf -echo "add_dracutmodules+=\" zfs \"" >> ${MNT}/etc/dracut.conf.d/zol.conf -echo "omit_dracutmodules+=\" btrfs resume \"" >> ${MNT}/etc/dracut.conf.d/zol.conf +echo "add_dracutmodules+=\"zfs btrfs resume\"" >> ${MNT}/etc/dracut.conf.d/zol.conf ${CHROOT} xbps-reconfigure -f linux5.2 echo @@ -251,11 +250,19 @@ GRUB_CMDLINE_LINUX=\"root=ZFS=${ZPOOL}/ROOT/${INITBE}\" GRUB_DISABLE_OS_PROBER=true " > ${MNT}/etc/default/grub +# to see if these help +${CHROOT} update-grub +${CHROOT} zpool set cachefile=/etc/zfs/zpool.cache trident +echo "to make sure zfs, btrfs, resume modules are loaded" +${CHROOT} xbps-reconfigure -f linux5.2 +${CHROOT} lsinitrd -m + +echo " this is supposed to populate /boot/grub & /boot/efi #Stamp GPT loader on disk itself ${CHROOT} grub-install ${BOOTDEVICE} #Stamp EFI loader on the EFI partition -${CHROOT} grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=debian --recheck --no-floppy - +#${CHROOT} grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debian --recheck --no-floppy +${CHROOT} grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=void --boot-directory=/boot --recheck --debug --no-floppy echo "=========" echo "Final Steps: 1 / 2 - change root password" echo "=========" @@ -267,10 +274,10 @@ useradd -R ${MNT} echo "=========" #Now unmount everything and clean up -umount -n ${MNT}/boot/EFI -umount -n ${MNT}/dev -umount -n ${MNT}/proc -umount -n ${MNT}/sys -zpool export ${ZPOOL} +#umount -n ${MNT}/boot/efi +#umount -n ${MNT}/dev +#umount -n ${MNT}/proc +#umount -n ${MNT}/sys +#zpool export ${ZPOOL} echo "[SUCCESS] Reboot the system and remove the install media to boot into the new system"