I have encrypted manjaro installed.
as the screen brightness was not working i went across manjaro solutions to make it work. But instead i messed up /etc/default/grub file. Mainly the GRUB_CMDLINE_LINUX_DEFAULT line was edited and it contained some UUID which was mistakenly removed. After that I ran “sudo reboot”.
I tried to recover with the snapshots but couldn’t recover it.
Now I’m not able to access manjaro OS. Getting error as shown in the below.
mount: /openswap_keymount: no filesystem type specified
Failed to open key file.
unmount: can't unmount openswap_keymount: Invalid argument
ERROR: resume: no device specified for hibernation
mount: /new_root: can't find UUID=<uuid>
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]#
I have tried decrypting it and mounting with the usb thumb drive.
followed the steps mentioned in the below links.
I’m not able to add the deleted(GRUB_CMDLINE_LINUX_DEFAULT) as i’m not able to access the OS.
I had saved the GRUB_CMDLINE_LINUX_DEFAULT=’ ’ in a notepad which i’m not able to access.
You mount the decrypted partition, inside the encrypted container, on /mnt, but you generate a new /boot/grub/grub.cfg which is not inside the /mnt
Plus you won’t get any different outcome unless you change the /etc/default/grubINSIDE/mnt and chroot into /mnt before you give the command to regenerate your grub config…
Thus you need to in sequence:
Open the encrypted container
Mount the @ subvolume inside the container at /mnt
chroot into /mnt
Change /etc/default/grub from within the chroot.
Regenerate your grub config from inside the chroot.
It would help to post your fstab from inside the encrypted container, which might still have the UUID’s you need.
I suppose you saved that file inside your HOME dir?
In that case you probably can mount that also, it should be the @home subvolume instead of the @ one…
yes I booted up the manjaro OS(did not re-install) using bootable USB and then later decrypted the logical volume(/dev/nvme0n1p2) and mounted it.
after mounting, wat is the next step?
after mounting I just shutdown and restarted the laptop to see if I can access manjaro OS but was not successful.
Thank you. I could manage to recover the GRUB_CMDLINE_LINUX_DEFAULT= ’ ’ which i had saved in the notepad. As you had mentioned to access the files from the @home directory.
But now i want to paste the GRUB_CMDLINE_LINUX_DEFAULT= ’ ’ back into /etc/default/grub of the encrypted volume. is there a way to access that file?
I managed to recover the command and paste it back in the /etc/default/grub and later updated the grub via chroot and restarted the system voila i was able to get back the OS.