|
|
|
|
@ -309,18 +309,6 @@ echo "fi">> /mnt/setup-chroot.sh
|
|
|
|
|
|
|
|
|
|
echo 'echo "Done."' >> /mnt/setup-chroot.sh
|
|
|
|
|
|
|
|
|
|
if ! [ "$disks" = "" ]; then
|
|
|
|
|
echo 'echo ""' >> /mnt/setup-chroot.sh
|
|
|
|
|
echo 'echo "Copying EFI partition to other boot disks..."' >> /mnt/setup-chroot.sh
|
|
|
|
|
i="2"
|
|
|
|
|
for disk in `echo "$disks" | tail -n+2`; do
|
|
|
|
|
echo "errors=\$(dd if=/dev/disk/by-id/${firstdisk}-part2 of=/dev/disk/by-id/${disk}-part2 2>&1 1>/dev/null && efibootmgr -c -g -d /dev/disk/by-id/${disk} -p 3 -L "ubuntu-$i" -l '\EFI\ubuntu\grubx64.efi' 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh
|
|
|
|
|
echo "if ! [ \"\$?\" = \"0\" ]; then echo \"EFI copy failed - \$errors\"; exit 20; fi" >> /mnt/setup-chroot.sh
|
|
|
|
|
i=$((i + 1))
|
|
|
|
|
done
|
|
|
|
|
echo 'echo "Done."' >> /mnt/setup-chroot.sh
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "echo ''" >> /mnt/setup-chroot.sh
|
|
|
|
|
echo 'echo "Setting root password..."' >> /mnt/setup-chroot.sh
|
|
|
|
|
echo "errors=\$(echo 'root:${rootpassword}' | chpasswd 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh
|
|
|
|
|
@ -383,6 +371,18 @@ echo "errors=\$(grub-install --target=x86_64-efi --efi-directory=/boot/efi --boo
|
|
|
|
|
echo "if ! [ \"\$?\" = \"0\" ]; then echo \"Failed to install grub UEFI on plex1 - \$errors\"; exit 104; fi" >> /mnt/setup-chroot.sh
|
|
|
|
|
echo "echo \"Done.\"" >> /mnt/setup-chroot.sh
|
|
|
|
|
|
|
|
|
|
if ! [ "$disks" = "" ]; then
|
|
|
|
|
echo 'echo ""' >> /mnt/setup-chroot.sh
|
|
|
|
|
echo 'echo "Copying EFI partition to other boot disks..."' >> /mnt/setup-chroot.sh
|
|
|
|
|
i="2"
|
|
|
|
|
for disk in `echo "$disks" | tail -n+2`; do
|
|
|
|
|
echo "errors=\$(dd if=/dev/disk/by-id/${firstdisk}-part2 of=/dev/disk/by-id/${disk}-part2 2>&1 1>/dev/null && efibootmgr -c -g -d /dev/disk/by-id/${disk} -p 3 -L "ubuntu-$i" -l '\EFI\ubuntu\grubx64.efi' 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh
|
|
|
|
|
echo "if ! [ \"\$?\" = \"0\" ]; then echo \"EFI copy failed - \$errors\"; exit 20; fi" >> /mnt/setup-chroot.sh
|
|
|
|
|
i=$((i + 1))
|
|
|
|
|
done
|
|
|
|
|
echo 'echo "Done."' >> /mnt/setup-chroot.sh
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# error check this as one big block
|
|
|
|
|
echo "zfs set mountpoint=legacy bpool/BOOT/ubuntu" >> /mnt/setup-chroot.sh
|
|
|
|
|
echo "echo \"bpool/BOOT/ubuntu /boot zfs nodev,relatime,x-systemd.requires=zfs-import-bpool.service 0 0\" >> /etc/fstab" >> /mnt/setup-chroot.sh
|
|
|
|
|
|