|
|
|
@ -59,8 +59,7 @@ bootmirror=""; rootraidz=""; for disk in `echo "$disks"`; do bootmirror="$bootmi
|
|
|
|
partprobe 2>/dev/null 1>/dev/null
|
|
|
|
partprobe 2>/dev/null 1>/dev/null
|
|
|
|
|
|
|
|
|
|
|
|
# wait for the partitions to show up
|
|
|
|
# wait for the partitions to show up
|
|
|
|
for disk in `echo "$disks"`
|
|
|
|
for disk in `echo "$disks"`; do
|
|
|
|
do
|
|
|
|
|
|
|
|
while ! [ -e "/dev/disk/by-id/${disk}-part3" ]; do
|
|
|
|
while ! [ -e "/dev/disk/by-id/${disk}-part3" ]; do
|
|
|
|
partprobe 2>/dev/null 1>/dev/null
|
|
|
|
partprobe 2>/dev/null 1>/dev/null
|
|
|
|
echo "Waiting for ${disk} partition 3 to update..."
|
|
|
|
echo "Waiting for ${disk} partition 3 to update..."
|
|
|
|
@ -226,7 +225,7 @@ echo "echo \"Done.\""
|
|
|
|
|
|
|
|
|
|
|
|
echo "echo \"\""
|
|
|
|
echo "echo \"\""
|
|
|
|
echo "echo \"Installing linux image, bash, screen, tmux, zfs, dosfstools, openssh...\""
|
|
|
|
echo "echo \"Installing linux image, bash, screen, tmux, zfs, dosfstools, openssh...\""
|
|
|
|
echo "errors=\$(apt install -y --no-install-recommends linux-image-generic 2\>\&1 1\>/dev/null \&\& apt install -y vim bash screen tmux zfs-initramfs dosfstools openssh-server 2\>\&1 1\>/dev/null)" >> /mnt/setup-chroot.sh
|
|
|
|
echo "errors=\$(apt install -y --no-install-recommends linux-image-generic 2>&1 1>/dev/null && apt install -y vim bash screen tmux zfs-initramfs dosfstools openssh-server 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh
|
|
|
|
echo 'if ! [ "$?" = "0" ]; then '>> /mnt/setup-chroot.sh
|
|
|
|
echo 'if ! [ "$?" = "0" ]; then '>> /mnt/setup-chroot.sh
|
|
|
|
echo ' echo "Failed to install preliminary software - $errors"' >> /mnt/setup-chroot.sh
|
|
|
|
echo ' echo "Failed to install preliminary software - $errors"' >> /mnt/setup-chroot.sh
|
|
|
|
echo " exit 1">> /mnt/setup-chroot.sh
|
|
|
|
echo " exit 1">> /mnt/setup-chroot.sh
|
|
|
|
@ -236,8 +235,7 @@ echo "echo \"Done.\"" >> /mnt/setup-chroot.sh
|
|
|
|
echo 'echo ""' >> /mnt/setup-chroot.sh
|
|
|
|
echo 'echo ""' >> /mnt/setup-chroot.sh
|
|
|
|
echo 'echo "Creating EFI partition..."' >> /mnt/setup-chroot.sh
|
|
|
|
echo 'echo "Creating EFI partition..."' >> /mnt/setup-chroot.sh
|
|
|
|
firstdisk=`echo "$disks" | head -n1`
|
|
|
|
firstdisk=`echo "$disks" | head -n1`
|
|
|
|
echo "mkdosfs -F 32 -s 1 -n EFI /dev/disk/by-id/${firstdisk}-part2" >> /mnt/setup-chroot.sh
|
|
|
|
echo "mkdosfs -F 32 -s 1 -n EFI /dev/disk/by-id/${firstdisk}-part2 && mkdir /boot/efi" >> /mnt/setup-chroot.sh
|
|
|
|
echo "mkdir /boot/efi" >> /mnt/setup-chroot.sh
|
|
|
|
|
|
|
|
echo "echo PARTUUID=$(blkid -s PARTUUID -o value /dev/disk/by-id/${firstdisk}-part2) /boot/efi vfat nofail,x-systemd.device-timeout=0 0 1 >> /etc/fstab" >> /mnt/setup-chroot.sh
|
|
|
|
echo "echo PARTUUID=$(blkid -s PARTUUID -o value /dev/disk/by-id/${firstdisk}-part2) /boot/efi vfat nofail,x-systemd.device-timeout=0 0 1 >> /etc/fstab" >> /mnt/setup-chroot.sh
|
|
|
|
echo "mount /boot/efi" >> /mnt/setup-chroot.sh
|
|
|
|
echo "mount /boot/efi" >> /mnt/setup-chroot.sh
|
|
|
|
echo "apt install -y grub-efi-amd64-signed shim-signed" >> /mnt/setup-chroot.sh
|
|
|
|
echo "apt install -y grub-efi-amd64-signed shim-signed" >> /mnt/setup-chroot.sh
|
|
|
|
|