Ask Your Question

hezxd's profile - activity

2018-04-06 09:37:27 -0500 received badge  Notable Question (source)
2018-01-07 09:23:49 -0500 received badge  Popular Question (source)
2017-07-21 18:33:06 -0500 commented question grub2 dracut fedora wont boot after grub2-mkconfig

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.

2017-07-21 18:33:05 -0500 asked a question grub2 dracut fedora wont boot after grub2-mkconfig

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
<reboot>
--> 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.

and 
------------
==========> 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
        else
          search --no-floppy --fs-uuid --set=root 16aa3500-11b0-433b-8faa-b04221b861fa
        fi
        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_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
#GRUB_CMDLINE_LINUX="RD.LVM.LV=FEDORA/ROOT RD.LUKS.UUID=LUKS-BCF8E807-3C11-4FBF-89BE-0D41D0EE05FB RD.LVM.LV=FEDORA/SWAP RHGB QUIET INTEL_IOMMU=ON VFIO-PCI.IDS=10DE:1B81,10DE:10F0"
GRUB_CMDLINE_LINUX="RD.LVM.LV=fedora/root RD.LUKS.UUID=luks-f663f2d4-fccf-40ee-b886-45d42838bf87 RD.LVM.LV=fedora/swap RHGB QUIET"
GRUB_DISABLE_RECOVERY="false"




GRUB_GFXPAYLOAD_LINUX=text
[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 ...
(more)