You are not logged in.
System setup details:
Thinkpad X1 carbon 5th gen with 3 OSes (Arch, Linux Mint & Ubuntu) on separate partitions
reFind along with Grub installed.
LUKS encryption on Arch root
Issue. Stuck with the below in the grub screen:
rEFInd - Booting OS
Starting grubx64.efi
Using load options ''
Enter passphrase for hd1.gpt2 (746hf74gd-3456778gh-edf3w22):
This screen comes before grub lists the oses (Arch Linux). Not after selecting Arch Linux.
This is not supposed to come up. But I don't know what I did to do this.
Linux Mint and Ubuntu works fine BTW.
What have I done so far?
A few weeks ago, my laptop broke and journalctl -b showed the issue was with lightdm as it failed to start.
Instead of trying to fix that, I tried to restore the system with timeshift snapshot which was created just before the updation. This broke GRUB.
Lack of time made me wait a few weeks and yesterday I chrooted into the installation.
I updated the grub and packages. The issue is now I am stuck on passphrase screen instead of grub listing arch and my root password is not letting me access it.
Logs
journal -b -1 - https://pastebin.com/JE7sgS1K
grub.cfg - https://pastebin.com/2R9SiicG
Last edited by tporg (2024-01-21 17:53:37)
Offline
set root='cryptouuid/818983faf7653d0e94ae42bg90a857ba'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/818983faf7653d0e94ae42bg90a857ba' ff7b3893-8e64-4529-8eee-5142023d9a5f
else how did you end up w/ that?
Is grub supposed to be on an unencrypted root partition (the ESP?) or the root partition? Cause it looks a bit like that's also "cryptdevice=/dev/nvme0n1p2:cryptroot" and nvme0n1p2 is probably your encrypted root?
If you can still boot the install iso, decrypt and chroot the installed system make sure to mount the proper boot partition and run grub-mkconfig and in doubt re-install grub.
Online
Is grub supposed to be on an unencrypted root partition (the ESP?)
Yes. And yes, nvmen1p2 is the encrypted root.
If you can still boot the install iso, decrypt and chroot the installed system make sure to mount the proper boot partition and run grub-mkconfig and in doubt re-install grub.
I can chroot in just fine. Could you please tell me what you mean by mount the proper boot partition?
Cos, here is what I did.
First I switch on the swap
swapon /dev/nvme0n1p5Then mount the efi after mkdir /mnt/efi
mount /dev/nvme0n1p6 /mnt/eficryptsetup luksOpen /dev/nvme0n1p2 dm_namemount /dev/mapper/dm_name /mntarch-chroot /mntYou then reinstall the grub:
grub-install --target=x86_64-efi --efi-directory=/mnt/efi --bootloader-id=GRUBThen generate the main configuration file using:
grub-mkconfig -o /boot/grub/grub.cfgCorrect? Am I missing something?
Offline
And where's you /boot partition in that setup?
https://wiki.archlinux.org/title/Dm-cry … ile_system
Online
You then reinstall the grub:
grub-install --target=x86_64-efi --efi-directory=/mnt/efi --bootloader-id=GRUB
Hey, the --efi-directory parameter is wrong. As you are chrooted already, from the chroot's perspective (which is in /mnt), efi directory is /efi, not /mnt/efi.
Also, grub prompting for a password at bootup when root is encrypted is a legitimate setup.
However, you can setup /boot directory to be in a seperate unencrypted partition (mounted in /boot) where grub bootloader files would be stored. Then you would get a prompt with selection of operating systems to boot from.
How are other operating systems setup in this case? Do they also have grub installed in root directory's /boot?
Last edited by dequesto (2024-01-21 16:46:04)
Offline
You then reinstall the grub:
grub-install --target=x86_64-efi --efi-directory=/mnt/efi --bootloader-id=GRUBHey, the --efi-directory parameter is wrong. As you are chrooted already, from the chroot's perspective (which is in /mnt), efi directory is /efi, not /mnt/efi.
Also, grub prompting for a password at bootup when root is encrypted is a legitimate setup.
However, you can setup /boot directory to be in a seperate unencrypted partition (mounted in /boot) where grub bootloader files would be stored. Then you would get a prompt with selection of operating systems to boot from.How are other operating systems setup in this case? Do they also have grub installed in root directory's /boot?
Other OSes are all inside root directory and they were installed after I setup Arch with LUKS encryption. How do I find the right /boot partition? My guess is the 1.5GB nvme0n1p1 partition which I kept along with /efi which is 1.4GB at nvme0n1p6.
Do you have any tips on how to find my /boot partition?
And where's you /boot partition in that setup?
This is something I am unclear with. My memory is that it is /dev/nvme0n1p1. But I don't remember. I thought efi contained the /boot. But my guess is it might be in /dev/nvme0n1p1.
How do I confirm this? Running fdisk -l or lsblk just shows it as linux file system. It doesn't show whether it is /boot partition.
Edit: I have confirmed that the /boot partition is /dev/nvme0n1p1. I have run grub install and grub-mkconfi.
I am currently trying to figure out how to run the mkinitcpio command for my luks encryption setup.
Edit2: Since mkinitcpio is automatically triggered after package updates, I just did sudo pacman -Syu. And I have my system WORKING!!
Thank you Seth & Dequesto for the assistance. Very very much appreciated!
Last edited by tporg (2024-01-21 17:52:21)
Offline