skepticnerdguy
2019-03-10, 00:34
Hardware is an MSI G70 laptop (https://www.msi.com/Laptop/GT70-2PC-Dominator/Specification).
Internal HDD is a Samsung msata 500gb SSD
Installing Kali Linux 64 Bit 2019.a on a USB drive.
Checksum on iso checks out.
I have made several attempts at installing kali 2019.a on a luks encrypted lvm and been met with no success. I am specifically attempting to install the OS with the /boot partition within the luks encrypted volumes. I have been met with failure and am now posting here.
The original setup and first attempt.
sda
|- sda1 fat32 esp partition (550MB)
|- sda2 ntfs OEM partition (450MB)
|- sda3 some windows proprietary partition (17MB)
|- sda4 ntfs Windows partition (~180GB)
|- sda5 ntfs Windows recovery partition (~don't remember the size that this was allocated, a few GB)
|- sda6
`-luks encrypted partition logical volume group 300GB
|- lvm 1 kali root (~278 GB)
`- lvm 2 kali swap area (~12 GB)
The above setup might not be perfectly accurate as it was the first attempt and did not document anything properly, I manually created the esp partition first, then installed windows leaving ~300GB free on the drive. Assume sda2-sda5 are the normal partitions windows creates during install. The windows install was creating five days ago using the Microsoft Media Creation Tool.
First attempt was to install windows 10 first then install kali in the left over space, windows installed perfectly fine, but when installing kali I ran into the "Executing grub-install dummy failed" error. I attempted multiple times to re-install to see if my install method was wrong but it still failed in the same manner. I saw the procedures listed here (https://forums.kali.org/showthread.php?35926-Executing-grub-install-dummy-failed) and here (https://forums.kali.org/showthread.php?36601-UEFI-How-to-repair-kali-linux-grub-dual-boot-with-Windows-10) and they did not work for me. I got as far as booting into grub after inputting the passphrase but was unsure how to proceed. When I exited grub, it booted straight into windows. I gave up on dual boot and wanted to try to install Kali on encrypted LVMs on its own to start so i can at least get a better understanding of the process. So i deleted all the partitions and proceeded.
Next attempt looked like this
sda
|- sda1 fat32 esp partition (550MB)
|- sda2
`-luks "crypto" encrypted partition logical volume group 300GB
|- lvm 1 kali ext4 root (~278 GB)
`- lvm 2 kali swap area (~12 GB)
Free space left over is for windows 10 install after (never got that far)
It again gave me the "Executing grub-install dummy failed" error. I attempted the fix linked above again, and again it it half worked and put me into grub. (it asks me for the encryption passphrase and goes into grub command line)
So for the sake of experimentation, i installed Kali with no encryption on the entire disk (using guided partition/use entire disk) and it worked fine, no errors. Not what I am looking for and not what I am trying to do, so I deleted the partitions and went again to try the encrypted route.
Lastly I tried again but with the /boot partition outside the encrypted lvm.
sda
|- sda1 fat32 esp partition (550MB)
|- sda2 ext2 /boot partition (250MB)
|- sda3
`-luks "crypto" encrypted partition logical volume group 300GB
|- lvm 1 kali ext4 root (~278 GB)
`- lvm 2 kali swap area (~12 GB)
This worked, but is not what I want to do, I have the system installed like this for now but plan on re-attempting the first or second method to keep /boot in the encrypted volume.
I do want to dive a bit into what I tried to do for the fix that @_default listed a few times in the forum.
I tried the below commands, this will be listed for the second scenario's drive structure
sda
|- sda1 fat32 esp partition (550MB)
|- sda2
`-luks "crypto" encrypted partition logical volume group 300GB
|- lvm 1 kali ext4 root (~278 GB)
`- lvm 2 kali swap area (~12 GB)
I got as far as "Executing grub-install dummy failed" error, then proceeded with no boot loader.
I booted into Kali live off the USB install drive.
I unlocked the encrypted partitions in the drive manager, they were listed as so.
/dev/crypto/root
/dev/crypto/swap
I proceded with the instructions @_default had listed in this forum post (https://forums.kali.org/showthread.php?35926-Executing-grub-install-dummy-failed) I modified them to adhere to my drive structure.
mount /dev/crypto/root /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount /dev/sda1 /mnt/boot/efi
mount -o remount,rw /dev/sda1 /mnt/boot/efi
mkdir /mnt/hostrun
mount --bind /run /mnt/hostrun
chroot /mnt
mkdir /run/lvm
mount --bind /hostrun/lvm /run/lvm
grub-install /dev/sda
<------------------------------------------------------see note 1
update-grub
<------------------------------------------------------see note 2
exit
umount /mnt/dev
umount /mnt/proc
umount /mnt/sys
umount /mnt/boot/efi
umount /mnt/hostrun
umount /mnt/run/lvm
umount /mnt
Note 1:
During grub-install I got several warnings listing all the drives and partitions, below is an example.
"WARNING: Device /dev/loop0 not initialized in udev database even after waiting 10000000 microseconds."
following about 10 minutes of these warnings i got the error about changing "GRUB_ENABLE_CRYPTODISK=y" in /etc/default/grub
I did so and initiated the grub-install again.
This time it proceded to show the warnings again for about 10+ Minutes but this time it finished saying it succeed in installing the "x86_64-efi platform"
Note 2:
update-grub has something else going on, it hangs forever. I don't know what its doing but I left the laptop for over an hour and it does not complete.
I cancelled the operation (CTL+X) and wasnt sure what to do from here. I tried it several times and it hangs indefinitely. Eventually I give up, cancel the operation again and restart.
After all of this, I see the grubs screen asking for a passphrase, so I enter it and I am met with a black screen with a GNU GRUB version 2.02 and a short intro and "grub>" command line option.
Does this mean I have a partial fix? I am not sure what to do here as I am unfamiliar with grub command line.
I am fairly new to linux, i have been teaching myself here and there with my homelab setup, installing various flavors of linux into VMs but have not tried anything with encryption. I am trying to setup linux (specifically Kali) onto this laptop and would like to secure it with encryption. I plan on encrypting the windows partition as well using veracrypt. I know that will also break things within the esp partition, but the fix for that looks simple enough from what I have seen. First I want to tackle the issue with encrypting linux in order to build an understanding and educate myself.
I appreciate any and all help with this, this has been frustrating, but educational. I hope to be able to resolve this and also get a better understanding of what is going on.
Internal HDD is a Samsung msata 500gb SSD
Installing Kali Linux 64 Bit 2019.a on a USB drive.
Checksum on iso checks out.
I have made several attempts at installing kali 2019.a on a luks encrypted lvm and been met with no success. I am specifically attempting to install the OS with the /boot partition within the luks encrypted volumes. I have been met with failure and am now posting here.
The original setup and first attempt.
sda
|- sda1 fat32 esp partition (550MB)
|- sda2 ntfs OEM partition (450MB)
|- sda3 some windows proprietary partition (17MB)
|- sda4 ntfs Windows partition (~180GB)
|- sda5 ntfs Windows recovery partition (~don't remember the size that this was allocated, a few GB)
|- sda6
`-luks encrypted partition logical volume group 300GB
|- lvm 1 kali root (~278 GB)
`- lvm 2 kali swap area (~12 GB)
The above setup might not be perfectly accurate as it was the first attempt and did not document anything properly, I manually created the esp partition first, then installed windows leaving ~300GB free on the drive. Assume sda2-sda5 are the normal partitions windows creates during install. The windows install was creating five days ago using the Microsoft Media Creation Tool.
First attempt was to install windows 10 first then install kali in the left over space, windows installed perfectly fine, but when installing kali I ran into the "Executing grub-install dummy failed" error. I attempted multiple times to re-install to see if my install method was wrong but it still failed in the same manner. I saw the procedures listed here (https://forums.kali.org/showthread.php?35926-Executing-grub-install-dummy-failed) and here (https://forums.kali.org/showthread.php?36601-UEFI-How-to-repair-kali-linux-grub-dual-boot-with-Windows-10) and they did not work for me. I got as far as booting into grub after inputting the passphrase but was unsure how to proceed. When I exited grub, it booted straight into windows. I gave up on dual boot and wanted to try to install Kali on encrypted LVMs on its own to start so i can at least get a better understanding of the process. So i deleted all the partitions and proceeded.
Next attempt looked like this
sda
|- sda1 fat32 esp partition (550MB)
|- sda2
`-luks "crypto" encrypted partition logical volume group 300GB
|- lvm 1 kali ext4 root (~278 GB)
`- lvm 2 kali swap area (~12 GB)
Free space left over is for windows 10 install after (never got that far)
It again gave me the "Executing grub-install dummy failed" error. I attempted the fix linked above again, and again it it half worked and put me into grub. (it asks me for the encryption passphrase and goes into grub command line)
So for the sake of experimentation, i installed Kali with no encryption on the entire disk (using guided partition/use entire disk) and it worked fine, no errors. Not what I am looking for and not what I am trying to do, so I deleted the partitions and went again to try the encrypted route.
Lastly I tried again but with the /boot partition outside the encrypted lvm.
sda
|- sda1 fat32 esp partition (550MB)
|- sda2 ext2 /boot partition (250MB)
|- sda3
`-luks "crypto" encrypted partition logical volume group 300GB
|- lvm 1 kali ext4 root (~278 GB)
`- lvm 2 kali swap area (~12 GB)
This worked, but is not what I want to do, I have the system installed like this for now but plan on re-attempting the first or second method to keep /boot in the encrypted volume.
I do want to dive a bit into what I tried to do for the fix that @_default listed a few times in the forum.
I tried the below commands, this will be listed for the second scenario's drive structure
sda
|- sda1 fat32 esp partition (550MB)
|- sda2
`-luks "crypto" encrypted partition logical volume group 300GB
|- lvm 1 kali ext4 root (~278 GB)
`- lvm 2 kali swap area (~12 GB)
I got as far as "Executing grub-install dummy failed" error, then proceeded with no boot loader.
I booted into Kali live off the USB install drive.
I unlocked the encrypted partitions in the drive manager, they were listed as so.
/dev/crypto/root
/dev/crypto/swap
I proceded with the instructions @_default had listed in this forum post (https://forums.kali.org/showthread.php?35926-Executing-grub-install-dummy-failed) I modified them to adhere to my drive structure.
mount /dev/crypto/root /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount /dev/sda1 /mnt/boot/efi
mount -o remount,rw /dev/sda1 /mnt/boot/efi
mkdir /mnt/hostrun
mount --bind /run /mnt/hostrun
chroot /mnt
mkdir /run/lvm
mount --bind /hostrun/lvm /run/lvm
grub-install /dev/sda
<------------------------------------------------------see note 1
update-grub
<------------------------------------------------------see note 2
exit
umount /mnt/dev
umount /mnt/proc
umount /mnt/sys
umount /mnt/boot/efi
umount /mnt/hostrun
umount /mnt/run/lvm
umount /mnt
Note 1:
During grub-install I got several warnings listing all the drives and partitions, below is an example.
"WARNING: Device /dev/loop0 not initialized in udev database even after waiting 10000000 microseconds."
following about 10 minutes of these warnings i got the error about changing "GRUB_ENABLE_CRYPTODISK=y" in /etc/default/grub
I did so and initiated the grub-install again.
This time it proceded to show the warnings again for about 10+ Minutes but this time it finished saying it succeed in installing the "x86_64-efi platform"
Note 2:
update-grub has something else going on, it hangs forever. I don't know what its doing but I left the laptop for over an hour and it does not complete.
I cancelled the operation (CTL+X) and wasnt sure what to do from here. I tried it several times and it hangs indefinitely. Eventually I give up, cancel the operation again and restart.
After all of this, I see the grubs screen asking for a passphrase, so I enter it and I am met with a black screen with a GNU GRUB version 2.02 and a short intro and "grub>" command line option.
Does this mean I have a partial fix? I am not sure what to do here as I am unfamiliar with grub command line.
I am fairly new to linux, i have been teaching myself here and there with my homelab setup, installing various flavors of linux into VMs but have not tried anything with encryption. I am trying to setup linux (specifically Kali) onto this laptop and would like to secure it with encryption. I plan on encrypting the windows partition as well using veracrypt. I know that will also break things within the esp partition, but the fix for that looks simple enough from what I have seen. First I want to tackle the issue with encrypting linux in order to build an understanding and educate myself.
I appreciate any and all help with this, this has been frustrating, but educational. I hope to be able to resolve this and also get a better understanding of what is going on.