PDA

View Full Version : Manual Grub overwrite from Kali install



SeVaS
2018-02-24, 08:50
Im very proud of myself tonight. Ive spent 3 days trying to install Kali the way I want it and Ive finally succeeded. I must have installed it 40+ times now.

Encrypted LVM EFI on only part of a hard drive! My first problem, which I walked away from and eventually returned to was "grub dummy install failed"

I managed to create a persistence Live Kali which I had to run in rescue mode to boot. I had thought I needed to update it fully and disable that nasty nouveau, but rescue mode did it.

Then I ran the commands to mount this and bind that and installed grub again after it failed in the Kali Install.

So I got grub back. I got windows running. I got Kali running. updated, customized and kernel rebuilt.

Now one issue!

Grub installed somewhere funny. When my laptop boots, it asks me for a password to my cryptsetup. I put the password in and it takes me to grub. Then I choose Kali and it asks me for my password again... Whats the cause of this?

Should I try to install grub to the EFI partition? Thats the only thing thats not encrypted. Last time I screwed with the EFI, I lost windows. Im afraid to mess with it.

~S

_defalt
2018-02-24, 20:38
Where have you installed grub currently?

SeVaS
2018-02-26, 05:54
Well, after reading some more into it, I decided to keep it for extra security.

But it would still be nice to know and understand how this works.

Following this tutorial,
https://forums.kali.org/showthread.php?36601-UEFI-How-to-repair-kali-linux-grub-dual-boot-with-Windows-10

grub-install /dev/sda
Partitioning Scheme:
/sda1 /boot/EFI (unencrypted; as far as I know...)
/sda2 Kali (encrypted)

/mapper/Crypto-root


/mapper/Crypto-home
/mapper/Crypto-tmp
/mapper/Crypto-var
/mapper/Crypto-swap


/sdb1 Windows


I attempted to run:

grub-install /dev/sda1
grub-install /dev/sda3

Note that when installing Guided Use Entire HDD LVM Encrypted, grub is not encrypted. However, when creating your own partitions for Encrypted LVM on only half of the HDD (is that a threat for data leak??), grub fails with Dummy Install Failed, hence the link above and the unintentionally encrypted bootloader.

This is all theoretical now though, so dont stress yourself. Im going to stay encrypted.

Radio-Freq
2018-02-28, 19:36
I'm hoping someone can help me with a similar issue. I have read the previous post and other threads related to this issue, but am a bit confuse how I should go about this in my setup. I have a surface 4 Pro, a separate partition on the SSD drive that I installed Kali on, but received the grup dummy boot message. Below is my fdisk -l output.
/dev/nvme0n is my main SSD drive.
/dev/nvme0n
/dev/sda is a 32gb external micro ssd drive int he rear slot. I have also installed Kali here, wanting to use this instead of partitioning and using the main drive, but now have decided against it.
/dev/sdb is my Live Kali drive.
I would like to dual boot windows 10 and Kali on the main drive. If possible, I would like to also have an entry in my list to boot off the 32gb drive also. Secure boot is currently off in my BIOS. Any help would be greatly appreciated, and let me know if any more info is needed. Thanks!

root@kali:~# fdisk -l
Disk /dev/nvme0n1: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 299E9A1F-0561-4582-8DD6-0AFE891C08FB

Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 534527 532480 260M EFI System
/dev/nvme0n1p2 534528 796671 262144 128M Microsoft reserved
/dev/nvme0n1p3 796672 244508671 243712000 116.2G Microsoft basic data
/dev/nvme0n1p4 498315264 500117503 1802240 880M Windows recovery environment
/dev/nvme0n1p5 244508672 303101951 58593280 28G Linux filesystem
/dev/nvme0n1p6 303101952 336502783 33400832 15.9G Linux swap
/dev/nvme0n1p7 336502784 498315263 161812480 77.2G Linux filesystem

Partition table entries are not in disk order.


Disk /dev/sda: 29.7 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C40FF7F6-28C2-4BAE-98F7-0A57F9C44B26

Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 1550335 499712 244M Linux filesystem
/dev/sda3 1550336 62332927 60782592 29G Linux filesystem


Disk /dev/sdb: 7.5 GiB, 8019509248 bytes, 15663104 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x247233f7

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 64 5913631 5913568 2.8G 17 Hidden HPFS/NTFS
/dev/sdb2 5913632 5915039 1408 704K 1 FAT12


Disk /dev/loop0: 2.6 GiB, 2775728128 bytes, 5421344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

_defalt
2018-03-02, 08:44
@Radio-Freq Here: https://forums.kali.org/showthread.php?36601-UEFI-How-to-repair-kali-linux-grub-dual-boot-with-Windows-10