Question about recoving a system where there maybe a bad line in the grub.cfg using a Endeavor live USB key

Hi,

I figure I would play it safe to try to get some help on recovering my Endeavor install which is a dual boot (EFI) with Windows 10. Pretty much I decided to update the **/etc/default/grub file:

(1) Added a line like

"GRUB_CMDLINE_LINUX_DEFAULT=“resume=UUID=c9244e6e-3127-4c6e-99f1-f61c0efa81eb resume_offset=6600704… i915.enable_psr=1 apparmor=1 lsm=lockdown,yama,apparmor”

(2) Update the GRUB configuration.

sudo grub-mkconfig -o /boot/grub/grub.cfg

(3) I rebooted and it appears after I choose the Endeavor from grub and see each of the services starting I am stuck before getting to the GDM\Gnome login screen.

Troubleshoot:

(1) I tried using CTRL ALT F3 but I was unable to get to the terminal.

(2) Booted in with my Endeavor Live USB key to make sure I can access the files.

(3) I was able to go to /dev/sda5 and see my OS files “/run/media/liveuser//etc/default”. I was able to remove the configuration line.

At this point (not wanting to lose data or break something I’m trying to figure out how to run “sudo grub-mkconfig -o /boot/grub/grub.cfg” command while booted into my computer with a USB key?

My guess to fix on a EFI System:

(1) Confirm the mounting point of the Linux root files:

sudo fdisk -l

(2) Use arch-chroot

sudo arch-chroot /dev/sda5

(3) Run grub-mkconfig to update the boot/grub/grub.cfg configuration

sudo grub-mkconfig -o /boot/grub/grub.cfg

OR

sudo arch-chroot /dev/sda5 grub-mkconfig -o /boot/grub/grub.cfg

Source:
https://wiki.archlinux.org/title/GRUB#Generated_grub.cfg
https://wiki.archlinux.org/title/chroot

To use arch-chroot you must first mount both the EFI and root partitions of your installed system.

Here is a step-by-step guide:

In brief:

  1. Boot up a live image, open a terminal and become root (sudo su).
  2. Find the device names of the root partition and the EFI (boot) partition of your installed system with fdisk -l.
  3. Mount them both, using
    mount /dev/sdXn /mnt
    mount /dev/sdYn /mnt/boot/efi
    
    (where you replace sdXn and sdYn with the actual partitions)
  4. Change root from the live image into the installed system using arch-chroot:
    arch-chroot /mnt
    

Now you’re in your installed system. What you do here will “stick”. So you can use a terminal text editor like nano to edit your /etc/default/grub if necessary, and then run grub-mkconfig -o /boot/grub/grub.cfg. Type exit to exit chroot, and reboot to reboot.

7 Likes

@dalto
Thank you Kresimir. All fixed. You saved all my configuration work as i change my laptop from Manjaro to EOS. Its a total new install … but then taking everything i learned and applied my .config files.

I will definitely write your solution in my note book to keep it handy. I’m glad this is no longer a mystery as i see people hit this issue configuring apparmour or changing kernel configurations.

Additional findings that caused the system to freeze on boot:

So I figured out that the setting in the kernel “i915.enable_psr=1” is not compatible with the LCD in my Thinkpad T450 but works for the T450s.

Pretty much when this setting is use and GDM starts the LCD shuts off. But if you have external monitor you can see on that. The T450 has a third party LG panel which I self upgraded.

Source:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.