Ver código fonte

try fixing grub

Noah Vogt 3 anos atrás
pai
commit
4c7f3de1b7
2 arquivos alterados com 10 adições e 5 exclusões
  1. 7 4
      arch.sh
  2. 3 1
      chroot.sh

+ 7 - 4
arch.sh

@@ -33,8 +33,6 @@ p
 
 
 +${SIZE}G
-t
-2
 82
 n
 p
@@ -47,8 +45,13 @@ w
 EOF
 partprobe
 
-cryptsetup luksFormat --type luks1 /dev/${DRIVE}2
-cryptsetup open /dev/${DRIVE}2 cryptroot
+while true; do
+    cryptsetup luksFormat --type luks1 /dev/${DRIVE}2 && break
+done
+
+while true; do
+    cryptsetup open /dev/${DRIVE}2 cryptroot && break
+done
 
 yes | mkfs.ext4 /dev/mapper/cryptroot
 mount /dev/mapper/cryptroot /mnt

+ 3 - 1
chroot.sh

@@ -30,11 +30,13 @@ sed -i 's/FILES=()/FILES=(\/crypto_keyfile.bin)/' /etc/mkinitcpio.conf
 sed -i 's/block filesystems/block encrypt filesystems/' /etc/mkinitcpio.conf
 mkinitcpio -P
 
+pacman --noconfirm --needed -S grub
 sed -i "s/GRUB_CMDLINE_LINUX=\"\"/GRUB_CMDLINE_LINUX=\"cryptdevice=\/dev\/${DRIVE}2:cryptroot\"/" /etc/default/grub
 sed -i 's/#GRUB_ENABLE_CRYPTODISK/GRUB_ENABLE_CRYPTODISK/' /etc/default/grub
 
 echo "swap /dev/${DRIVE}1 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256" >> /etc/crypttab
 
-pacman --noconfirm --needed -S grub
 grub-install --target=i386-pc /dev/${DRIVE} --recheck
 grub-mkconfig -o /boot/grub/grub.cfg
+
+rm drive tzfinal.tmp