Ask Your Question

Fedora 25: Installing EFI GRUB with an encrypted root filesystem

asked 2017-05-31 17:59:14 -0500

octied gravatar image

I want to install Windows 10 on my computer. During the installation process I got the message that I can't install Windows 10 on my drive where Fedora 25 is currently installed, since the drive still uses MBR instead of GPT. I used the first answer of this question to convert the drive to GPT, which worked flawlessly. But when I tried to upgrade GRUB to GRUB EFI I ran into problems.

Since I can't boot into fedora anymore (when I deleted the old Windows 7 partitions GRUB got corrupted unfortunately) I used a live usb-stick with fedora 25. I used the following steps since I have an encrypted root filesystem:

sudo cryptsetup luksOpen /dev/fedora/00 cryptohome
sudo vgscan
sudo vgchange -a y
sudo mkdir /mnt/sysimage
sudo mount /dev/mapper/cryptohome /mnt/sysimage
sudo mount /dev/sdc1 /mnt/sysimage/boot
sudo mount /dev/sdc2 /mnt/sysimage/boot/efi/
sudo mount --bind /dev /mnt/sysimage/dev
sudo mount --bind /proc /mnt/sysimage/proc
sudo mount --bind /sys /mnt/sysimage/sys
sudo mount -o bind /run /mnt/sysimage/run

sudo chroot /mnt/sysimage
dnf -y reinstall grub2-efi grub2-efi-modules shim

I uploaded the output of fdisk -l to pastebin.

But when I try to start the computer I end up in dracut with the message:

[  213.443504] localhost.localdomain dracut-initqueue[510]: Warning: dracut-initqueue timeout - starting timeout scripts
[  213.443682] localhost.localdomain dracut-initqueue[510]: Warning: Could not boot.
[  213.503629] localhost.localdomain dracut-initqueue[510]: Warning: /dev/mapper/cryptohome does not exist

I uploaded the whole rdsosreport.txt file to pastebin.

I think the problem is caused by the location I use to decrypt my root filesystem. But I'm simply not sure what to do differently.

(I posted this question also on

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-06-01 06:34:02 -0500

octied gravatar image

updated 2017-06-01 08:55:21 -0500

I found the solution on my own.

I changed two things and I'm not sure if both steps are necessary.

First I went to /etc/fstab and looked up the volume name:

/dev/mapper/luks-5792bb33-c1de-435b-920a-b3abc1376c50 /                       ext4    defaults,x-systemd.device-timeout=0 1 1
UUID=b3ec3a68-51c1-45d1-9312-5ba7270aebc7 /boot                   ext4    defaults        1 2
/dev/mapper/luks-2cee902a-fcd7-43ac-9cc2-bd1c69d49a6d /home                   ext4    defaults,x-systemd.device-timeout=0 1 2
/dev/mapper/luks-f10ec0b2-d003-489c-8b7f-48cd961308ac swap                    swap    defaults,x-systemd.device-timeout=0 0 0

so I changed the first step to

sudo cryptsetup luksOpen /dev/fedora/00 luks-5792bb33-c1de-435b-920a-b3abc1376c50

and the fourth step to

sudo mount /dev/mapper/luks-5792bb33-c1de-435b-920a-b3abc1376c50 /mnt/sysimage

Unfortunately I overread a statement in dnf which said that there was no match found for grub2-efi-modules. dnf reinstall does not install new packages. So grub2-efi-modules was missing, so I used

sudo dnf install grub2-efi-modules

to install grub2-efi-modules.

To make sure the grub configuration is up to date I used

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

although this last step should not be necessary.

edit flag offensive delete link more

Question Tools



Asked: 2017-05-31 17:59:14 -0500

Seen: 878 times

Last updated: Jun 01 '17