Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OL 8.1 x86_64 editing /etc/default/grub and running grub2-mkconfig breaks booting

RaiderOfTheLostSPARCApr 25 2020 — edited Apr 27 2020

Hi,

I just installed Oracle Linux 8.1 x86_64 (via V984216-01.iso) in VirtualBox using the graphical installer. After the installation I changed GRUB_CMDLINE_LINUX in /etc/default/grub according to:

  https://docs.oracle.com/en/operating-systems/oracle-linux/8/osmanage/ol-bootconf-grub2.html

[root@localhost ~]# sed -i -e 's/rhgb quiet/console=tty0 console=ttyS0,115200n8/' /etc/default/grub

[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg

/usr/bin/grub2-editenv: error: invalid environment block.

Generating grub configuration file ...

/usr/bin/grub2-editenv: error: invalid environment block.

Strange thing is, grub2-mkconfig didn't change anything:

[root@localhost ~]# diff -u /boot/grub2/grub.cfg /root/grub.cfg

but the new default grub menu boot entry looks weird:

load_video

set gfx_payload=keep

insmod gzio

linux ($root)/vmlinuz-4.18.0-147.el8.x86_64

initrd  ($root)/initramfs-4.18.0-147.el8.x86_64.img $tuned_initrd

And next reboot, the system is broken:

[  OK  ] Stopped Hardware RNG Entropy Gatherer Daemon.

[  OK  ] Started Cleanup udevd DB.

[  OK  ] Started Setup Virtual Console.

[  OK  ] Reached target Switch Root.

         Starting Switch Root...

[FAILED] Failed to start Switch Root.

See 'systemctl status initrd-switch-root.service' for details.

Generating "/run/initramfs/rdsosreport.txt"

Entering emergency mode. Exit the shell to continue.

Type "journalctl" to view system logs.

You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot

after mounting them and attach it to a bug report.

:/#

How can I edit /etc/default/grub without breaking my system?

This post has been answered by Dude! on Apr 26 2020
Jump to Answer
Comments
Post Details
Added on Apr 25 2020
8 comments
8,438 views