grub2 dracut fedora wont boot after grub2-mkconfig

asked 2017-07-21 18:33:02 -0500

hezxd gravatar image

updated 2017-07-21 18:33:37 -0500

I did backup of my system with a tarball, installed windows and installed Fedora afterwards.

I got the system up after a restore, but I assume the luksUUID has changed since then and that is why my grub2 won't boot. (I had no issues prior to running grub2-mkconfig).

Some info:

==========> I ran:
grub2-mkconfig -o /boot/grub2/grub.cfg
--> would not boot

==========> I tried:
cryptsetup luksOpen /dev/sdb6 rescue
<mount all partitions and bind dev proc sys etc.>
chroot /mnt/root
<backup of all .img files under /boot>
dracut --force --regenerate-all
<still same>

updated UUIDs from what I see with blkid from the liveCD and I still get no further. Even after rerunning the grub2-mkconfig command.

==========> sample entry in grub.cfg:
menuentry 'Fedora (4.11.10-100.fc24.x86_64) 24 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.11.10-100.fc24.x86_64-advanced-23a852e6-48ac-4403-8018-fb59e8adf37b' {
        set gfxpayload=text
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5'  16aa3500-11b0-433b-8faa-b04221b861fa
          search --no-floppy --fs-uuid --set=root 16aa3500-11b0-433b-8faa-b04221b861fa
        linux16 /vmlinuz-4.11.10-100.fc24.x86_64 root=/dev/mapper/fedora-root ro RD.LVM.LV=fedora/root RD.LUKS.UUID=luks-f663f2d4-fccf-40ee-b886-45d42838bf87 RD.LVM.LV=fedora/swap RHGB QUIET 
        initrd16 /initramfs-4.11.10-100.fc24.x86_64.img

==========> fstab
[root@localhost /]# cat /etc/fstab 

# /etc/fstab
# Created by anaconda on Thu Jul 20 04:04:34 2017
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
/dev/mapper/fedora-root /                       ext4    defaults,x-systemd.device-timeout=0 1 1
UUID=16aa3500-11b0-433b-8faa-b04221b861fa /boot                   ext4    defaults        1 2
/dev/mapper/fedora-home /home                   ext4    defaults,x-systemd.device-timeout=0 1 2
/dev/mapper/fedora-opt  /opt                    ext4    defaults,x-systemd.device-timeout=0 1 2
/dev/mapper/fedora-tmp  /tmp                    ext4    defaults,x-systemd.device-timeout=0 1 2
/dev/mapper/fedora-var  /var                    ext4    defaults,x-systemd.device-timeout=0 1 2
/dev/mapper/fedora-var_log /var/log                ext4    defaults,x-systemd.device-timeout=0 1 2
/dev/mapper/fedora-swap swap                    swap    defaults,x-systemd.device-timeout=0 0 0
/dev/sda2 /mnt/DATA ntfs defaults 0 0
/dev/sdc2 /mnt/LNX_DATA ext4 defaults 0 0
[root@localhost /]# 

==========> grub cfg (removed vfio as i am going to be dualbooting windows rather than have windows in a KVM vm - this is where I noticed the RD.LUKS.UUID differance, commented line is the old one)
[root@localhost /]# cat /etc/default/grub
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_CMDLINE_LINUX="RD.LVM.LV=fedora/root RD.LUKS.UUID=luks-f663f2d4-fccf-40ee-b886-45d42838bf87 RD.LVM.LV=fedora/swap RHGB QUIET"

[root@localhost /]# 
==========> info from blkid UUIDs etc. fetched from booted LiveCD
[root@localhost liveuser]# blkid |grep crypto
/dev/sdb6: UUID="f663f2d4-fccf-40ee-b886-45d42838bf87" TYPE="crypto_LUKS" PARTUUID="5ac43570-06 ...
edit retag flag offensive close merge delete


I assume it is something silly I am overseeing, but I can't for the life of me figure this out, the UUIDs seems to match correctly.

hezxd gravatar imagehezxd ( 2017-07-21 18:31:25 -0500 )edit