You are not logged in.
Pages: 1
So I'm adding to my script to install Arch Linux that automatically adds the UUID to /etc/default/grub and makes the last adjustments so the home encrypted partition gets mounted correctly.
so Here is the last part of the script:
#Setting up lusk partition for booting up
partitionLuskID=$(blkid | awk -F'"' 'NR == 3 { print $2 }') #Same as before
partitionHardwareID=$(blkid | awk -F'"' 'NR == 4 { print $2 }') #These lines assumes that always the second drive is encrypted
echo "Checking partition variables: "
echo "$partitionHardwareID"
echo "$partitionLuskID"
sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT=/ s/\"$/ cryptdevice=UUID=$partitionHardwareID:cryptlvm root=UUID=$partitionLuskID\"/" /mnt/etc/default/grub
sed -i "/^HOOKS=/ s/\([^)]*\)/\1 encrypt lvm2/" /mnt/etc/mkinitcpio.conf
cp /root/ArchLinuxInstaller/endingSetup.sh /mnt/endingSetup.sh
echo "Checking variables before chrooting: "
echo "DISK: $DISK"
echo "BiosOrUefi: $BiosOrUefi"
sleep 10
arch-chroot /mnt /endingSetup.sh "$DISK" "$BiosOrUefi"
umount -R /mnt$DISK and BiosOrUefi are variables that are previous initiated in the beginning of the script. They are okey because I check the values from the main script and also inside endingSetup.sh script. They have /dev/vda and 0 , because I'm testing in a BIOS virtual machine.
the endingSetup.sh script is this:
#!/bin/sh
DISK="$1"
BiosOrUefi="$2"
echo "Checking variables after chrooting: "
echo "DISK: $DISK"
echo "BiosUEFI: $BiosOrUefi"
sleep 10
mkinitcpio -P
if [ "$BiosOrUefi" = '64' ]
then
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
elif [ "$BiosOrUefi" = '32' ]
then
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
else
grub-install "$DISK"
fi
grub-mkconfig -o /boot/grub/grub.cfg
exitThe issues is that when I reboot the boot gets idle in Loading init ramdisk. I don't know why. The script without encrypting with LUSK2 just works fine in the virtual machine, is just that when I encrypt the drive it does stays over there a couple of minutes and then send the failure signal into screen. I checked the sed commands to inject the UUID of the drive and the UUID of the /dev/mapper devices. Seems correct, also inside the " ", /etc/mkinitcpio.conf does have in HOOKS= the encrypt and lvm2 arguments. Also made the swap of $partitionHardwareID and $partitionLuskID [ yeah I know they are not "partitions" they are UUID, but gonna change the name into something different in the future that makes it more intuitive to what really the variable have] in the sed line that adds the UUID to the /etc/default/grub , just in case I had made the mistake by how goes first. But I mostly sure they are okey. Also checked the UUID with blkid command to see that matches the /dev/vda and /dev/mapper/"name of the encrypted drive by lusk command"
So I don't know what is happening. I'm makin this with the lastest arch iso realease, or at least the one that I downloaded the last sunday.
EDIT:
Also in this line:
grub-install "$DISK"I had added the flag --target=i386-pc and tried once, it doesn't works, and seems that grub always uses i386 in that context by default.
Last edited by Succulent of your garden (Today 12:16:44)
str( @soyg ) == str( @potplant ) btw!
Also now with avatar logo included!
Offline
Pages: 1