Ask Your Question

Revision history [back]

This worked for me on Fedora 22:

Find the path for the default kernel:

~]# grubby --default-kernel /boot/vmlinuz-4.2.8-200.fc22.x86_64 [root@dhcp-4-151 ~]# grubby --info /boot/vmlinuz-4.2.8-200.fc22.x86_64 index=0 kernel=/boot/vmlinuz-4.2.8-200.fc22.x86_64 args="ro rd.luks.uuid=luks-8ad68390-93be-4d33-a378-24fb75ab795f rd.lvm.lv=fedora_dhcp-4-151/swap rd.lvm.lv=fedora_dhcp-4-151/root rhgb quiet LANG=en_US.UTF-8"

Find the path to the "swap" partition:

~]# blkid [output omitted] /dev/mapper/fedora_dhcp--4--151-swap: UUID="0e282f5b-cfeb-44aa-9179-5f16b0356635" TYPE="swap" [output truncated]

Update the grub menu using the full path to the "swap" partition:

~]# grubby --args=resume=/dev/mapper/fedora_dhcp--4--151-swap --update-kernel /boot/vmlinuz-4.2.8-200.fc22.x86_64

Check all is well:

~]# grubby --info /boot/vmlinuz-4.2.8-200.fc22.x86_64 index=0 kernel=/boot/vmlinuz-4.2.8-200.fc22.x86_64 args="ro rd.luks.uuid=luks-8ad68390-93be-4d33-a378-24fb75ab795f rd.lvm.lv=fedora_dhcp-4-151/swap rd.lvm.lv=fedora_dhcp-4-151/root rhgb quiet LANG=en_US.UTF-8 resume=/dev/mapper/fedora_dhcp--4--151-swap" root=/dev/mapper/fedora_dhcp--4--151-root initrd=/boot/initramfs-4.2.8-200.fc22.x86_64.img title=Fedora (4.2.8-200.fc22.x86_64) 22 (Twenty Two)

This worked for me on Fedora 22:

Find the path for the default kernel:

~]# grubby --default-kernel /boot/vmlinuz-4.2.8-200.fc22.x86_64 /boot/vmlinuz-4.2.8-200.fc22.x86_64

[root@dhcp-4-151 ~]# grubby --info /boot/vmlinuz-4.2.8-200.fc22.x86_64 index=0 kernel=/boot/vmlinuz-4.2.8-200.fc22.x86_64 args="ro rd.luks.uuid=luks-8ad68390-93be-4d33-a378-24fb75ab795f rd.lvm.lv=fedora_dhcp-4-151/swap rd.lvm.lv=fedora_dhcp-4-151/root rhgb quiet LANG=en_US.UTF-8"

Find the path to the "swap" partition:

~]# blkid [output omitted] /dev/mapper/fedora_dhcp--4--151-swap: UUID="0e282f5b-cfeb-44aa-9179-5f16b0356635" TYPE="swap" [output truncated]

Update the grub menu using the full path to the "swap" partition:

~]# grubby --args=resume=/dev/mapper/fedora_dhcp--4--151-swap --update-kernel /boot/vmlinuz-4.2.8-200.fc22.x86_64

Check all is well:

~]# grubby --info /boot/vmlinuz-4.2.8-200.fc22.x86_64 index=0 kernel=/boot/vmlinuz-4.2.8-200.fc22.x86_64 args="ro rd.luks.uuid=luks-8ad68390-93be-4d33-a378-24fb75ab795f rd.lvm.lv=fedora_dhcp-4-151/swap rd.lvm.lv=fedora_dhcp-4-151/root rhgb quiet LANG=en_US.UTF-8 resume=/dev/mapper/fedora_dhcp--4--151-swap" root=/dev/mapper/fedora_dhcp--4--151-root initrd=/boot/initramfs-4.2.8-200.fc22.x86_64.img title=Fedora (4.2.8-200.fc22.x86_64) 22 (Twenty Two)

EDIT: On second thoughts, just using grubby --info=DEFAULT should be quicker then my first two commands. Also, grubby --update-kernel=DEFAULT could replace my first two and fourth commands. See "Making Persistent Changes to a GRUB 2 Menu Using the grubby Tool" in the System Administrator's Guide for more info.

This worked for me on Fedora 22:

Find the path for the default kernel:

~]# grubby --default-kernel /boot/vmlinuz-4.2.8-200.fc22.x86_64

[root@dhcp-4-151 ~]# grubby --info /boot/vmlinuz-4.2.8-200.fc22.x86_64 index=0 kernel=/boot/vmlinuz-4.2.8-200.fc22.x86_64 args="ro rd.luks.uuid=luks-8ad68390-93be-4d33-a378-24fb75ab795f rd.lvm.lv=fedora_dhcp-4-151/swap rd.lvm.lv=fedora_dhcp-4-151/root rhgb quiet LANG=en_US.UTF-8"

Find the path to the "swap" partition:

~]# blkid [output omitted] /dev/mapper/fedora_dhcp--4--151-swap: UUID="0e282f5b-cfeb-44aa-9179-5f16b0356635" TYPE="swap" [output truncated]

Update the grub menu using the full path to the "swap" partition:

~]# grubby --args=resume=/dev/mapper/fedora_dhcp--4--151-swap --update-kernel /boot/vmlinuz-4.2.8-200.fc22.x86_64

Check all is well:

~]# grubby --info /boot/vmlinuz-4.2.8-200.fc22.x86_64 index=0 kernel=/boot/vmlinuz-4.2.8-200.fc22.x86_64 args="ro rd.luks.uuid=luks-8ad68390-93be-4d33-a378-24fb75ab795f rd.lvm.lv=fedora_dhcp-4-151/swap rd.lvm.lv=fedora_dhcp-4-151/root rhgb quiet LANG=en_US.UTF-8 resume=/dev/mapper/fedora_dhcp--4--151-swap" root=/dev/mapper/fedora_dhcp--4--151-root initrd=/boot/initramfs-4.2.8-200.fc22.x86_64.img title=Fedora (4.2.8-200.fc22.x86_64) 22 (Twenty Two)

EDIT: On second thoughts, just using grubby --info=DEFAULT should be quicker then my first two commands. Also, grubby --update-kernel=DEFAULT could replace my first two and fourth commands. See "Making Persistent Changes to a GRUB 2 Menu Using the grubby Tool" in the System Administrator's Guide for more info.