|
|
|
|
@ -400,6 +400,7 @@ echo "echo \"Success.\"" >> /mnt/setup-chroot.sh
|
|
|
|
|
|
|
|
|
|
echo 'echo ""' >> /mnt/setup-chroot.sh
|
|
|
|
|
echo 'echo "Updating initramfs..."' >> /mnt/setup-chroot.sh
|
|
|
|
|
echo "echo \"vmd\" >> /etc/initramfs-tools/modules" >> /mnt/setup-chroot.sh
|
|
|
|
|
echo 'errors=$(update-initramfs -u -k all 2>&1 1>/dev/null)' >> /mnt/setup-chroot.sh
|
|
|
|
|
echo 'if ! [ \"$?\" = \"0\" ]; then '>> /mnt/setup-chroot.sh
|
|
|
|
|
echo ' echo "Failed to update initramfs - $errors"' >> /mnt/setup-chroot.sh
|
|
|
|
|
@ -410,7 +411,7 @@ echo "echo \"Done.\"" >> /mnt/setup-chroot.sh
|
|
|
|
|
# you need sed to do this right!
|
|
|
|
|
echo 'echo ""' >> /mnt/setup-chroot.sh
|
|
|
|
|
echo 'echo "Modifying grub for ZFS root..."' >> /mnt/setup-chroot.sh
|
|
|
|
|
echo "errors=\$(sed -ir 's/quiet splash//g' /etc/default/grub 2>&1 1>/dev/null && sed -ir 's/GRUB_CMDLINE_LINUX=\".*\"/GRUB_CMDLINE_LINUX=\"root=ZFS=rpool\/ROOT\/ubuntu\"/g' /etc/default/grub 2>&1 1>/dev/null && sed -ir 's/^#GRUB_TERMINAL=console/GRUB_TERMINAL=console/g' /etc/default/grub 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh
|
|
|
|
|
echo "errors=\$(sed -ir 's/quiet splash//g' /etc/default/grub 2>&1 1>/dev/null && sed -ir 's/GRUB_CMDLINE_LINUX=\".*\"/GRUB_CMDLINE_LINUX=\"root=ZFS=rpool\/ROOT\/ubuntu noresume\"/g' /etc/default/grub 2>&1 1>/dev/null && sed -ir 's/^#GRUB_TERMINAL=console/GRUB_TERMINAL=console/g' /etc/default/grub 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh
|
|
|
|
|
echo "if ! [ \"\$?\" = \"0\" ]; then echo \"Failed to set grub ZFS root - \$errors\"; exit 104; fi" >> /mnt/setup-chroot.sh
|
|
|
|
|
echo 'echo "Done."' >> /mnt/setup-chroot.sh
|
|
|
|
|
|
|
|
|
|
|