Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bottim stuck at start job is running for /dev/mapper/root
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 324

PostPosted: Thu Mar 07, 2024 4:15 pm    Post subject: bottim stuck at start job is running for /dev/mapper/root Reply with quote

so hello i tried installing after few years encrypted gentoo installation i went little bit off normal course, so i have one disk
/dev/sda1 EFI boot mounted at /efi
/dev/sda2 swap
/dev/sda3 Luks encryption NO LVM inside it only ext4 partition inside,

and i can easily open my partition arch-chroot inside it with no problem but it wont boot,
this is what is see when i boot it


my fstab is but i also tried insdead of PARTUIID of /dev/sda3 replacing it with /dev/mapper/cryptroot
and this is my /etc/grub/default
also my make.conf
but i dont think i changed anything else
keep in mind i dont use LVM inside so ijust
Code:

cryptsetup luksOpen /dev/sda3 cryproot
mount /dev/mapper/cryptroot /mnt/gentoo
#and it works


what did i do wrong? i use gentoo-kernel-bin and otherwise i just have plasma desktop which i had no chance to test yet
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1896

PostPosted: Thu Mar 07, 2024 4:47 pm    Post subject: Reply with quote

Fix the grub config changing cryptdevice=UUID= to rd.luks.name= and change :cryptroot to =cryptroot on the end of that parameter as well.

Edit: changed advice based on new information
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 324

PostPosted: Thu Mar 07, 2024 7:19 pm    Post subject: Reply with quote

grknight wrote:
Fix the grub config changing cryptdevice=UUID= to rd.luks.name= and change :cryptroot to =cryptroot on the end of that parameter as well.

Edit: changed advice based on new information


thank you for the fast reply, howere i couldnt find more info on that command rd.luks.name, but i tried it but same problem i tried waiting 120 seconds now, and it still wouldnt mount
did i do it correclty? ignore the blkid at the bottom i was just verifying, after editing that config i ran
Code:

grub-install for efi into /efi directory
and grub-mkconfig to /boot/grub/grub.cfg

not sure how to diagnose this further i thought this simple setup would be simple to set up
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1896

PostPosted: Thu Mar 07, 2024 7:43 pm    Post subject: Reply with quote

Try also adding rd.auto=1 to the kernel command-line (like GRUB_CMDLINE_LINUX).
gentoo-kernel-bin uses dracut for its initramfs so options for unlocking LUKS must be interpreted by dracut.
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 324

PostPosted: Thu Mar 07, 2024 8:19 pm    Post subject: Reply with quote

grknight wrote:
Try also adding rd.auto=1 to the kernel command-line (like GRUB_CMDLINE_LINUX).
gentoo-kernel-bin uses dracut for its initramfs so options for unlocking LUKS must be interpreted by dracut.

true i have ina package.use dracut and some other use flags for kernel i will try it out
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 324

PostPosted: Thu Mar 07, 2024 10:05 pm    Post subject: Reply with quote

grknight wrote:
Try also adding rd.auto=1 to the kernel command-line (like GRUB_CMDLINE_LINUX).
gentoo-kernel-bin uses dracut for its initramfs so options for unlocking LUKS must be interpreted by dracut.


so i found out some new info, its behavior is very weird when i input no passowrd and it doesnt seem to unlock my luks partition when asking for passphrase and is it fine it asks for my pass before grub even loads?

firstly here is my package.use

new grub.cfg
veryfing it is correct partition type


now this is weird stuff when no password is inputted i get this weird behaviours it kicks me out an i cant try again
this is what it looks like when i enter passphrase correctly and it puts me in the system but gets stuck again

videos may not play in browse but work when downloaded
i think i somehow got issue withunlocking the luks partition, but not sure how to fix it without loosing data, efi is at sda1 and root sda3, do i need other stuff on different partitions?
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 481

PostPosted: Fri Mar 08, 2024 5:24 pm    Post subject: Reply with quote

picarica wrote:
grknight wrote:
Try also adding rd.auto=1 to the kernel command-line (like GRUB_CMDLINE_LINUX).
gentoo-kernel-bin uses dracut for its initramfs so options for unlocking LUKS must be interpreted by dracut.


so i found out some new info, its behavior is very weird when i input no passowrd and it doesnt seem to unlock my luks partition when asking for passphrase and is it fine it asks for my pass before grub even loads?


Not sure if I understand you correctly. The kernel is stored under /boot which is on your /-partition. Because it is encrypted, Grub needs to unlock your LUKS container to be able to read the /boot/grub/grub.cfg. So it is normal to be asked for the password before it can show the boot menu.

If you did not want an encrypted /boot, then you need an unencrypted /boot its own partition (you could use the ESP as /boot). In this case Grub does not need to unlock a LUKS container and can load the kernel and initramfs (and GRUB_ENABLE_CRYPTODISK is not needed/used).

Can you please share
Code:
emerge -pv systemd
to see the USE flags?
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 324

PostPosted: Fri Mar 08, 2024 7:22 pm    Post subject: Reply with quote

sMueggli wrote:
picarica wrote:
grknight wrote:
Try also adding rd.auto=1 to the kernel command-line (like GRUB_CMDLINE_LINUX).
gentoo-kernel-bin uses dracut for its initramfs so options for unlocking LUKS must be interpreted by dracut.


so i found out some new info, its behavior is very weird when i input no passowrd and it doesnt seem to unlock my luks partition when asking for passphrase and is it fine it asks for my pass before grub even loads?


Not sure if I understand you correctly. The kernel is stored under /boot which is on your /-partition. Because it is encrypted, Grub needs to unlock your LUKS container to be able to read the /boot/grub/grub.cfg. So it is normal to be asked for the password before it can show the boot menu.

If you did not want an encrypted /boot, then you need an unencrypted /boot its own partition (you could use the ESP as /boot). In this case Grub does not need to unlock a LUKS container and can load the kernel and initramfs (and GRUB_ENABLE_CRYPTODISK is not needed/used).

Can you please share
Code:
emerge -pv systemd
to see the USE flags?


found systemd options here
it didnt had cryptsetup use flag, so i enabled it remerge installed grub anwew redid config and still same problem :( am i missing something else ?
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 481

PostPosted: Sat Mar 09, 2024 10:21 am    Post subject: Reply with quote

Did you rebuild the initramfs after adding cryptsetup to systemd?
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 324

PostPosted: Sat Mar 09, 2024 9:11 pm    Post subject: Reply with quote

sMueggli wrote:
Did you rebuild the initramfs after adding cryptsetup to systemd?

what do you mean rebuilding initramfs? emerge -a --config gentoo-kernel-bin ? i use bin kernel,
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 481

PostPosted: Sun Mar 10, 2024 9:59 am    Post subject: Reply with quote

The USE flag cryptsetup for systemd pulls in sys-fs/cryptsetup. Dracut is then adding the module "crypt" if it finds sys-fs/cryptsetup installed.

I watched the two videos today. The Grub video is correct, you enter the LUKS passphrase and Grub is successfully unlocking the LUKS container and loading the grub.cfg.

The video with the dracut/initramfs part is not ok. In the video it tries to mount /dev/mapper/root, but you are never asked to enter the LUKS passphrase prior to mount /dev/mapper/root.

Can you please show the /boot/grub/grub.cfg (please as text)? And I would also rebuild the initramfs with Dracut:

Code:
# as an example, adjust the values
dracut --force --logfile=/tmp/dracut.txt initramfs-6.6.13-gentoo.img 6.6.13-gentoo
#      |       |                         |                           \ name of the kernel (uname -r)
#      |       |                         \ name of the initramfs in /boot
#      |       \ store the output in a logfile to share
#      \ if the initramfs already exists, force the creation


I am using gentoo-sources and I do not know, which dracut command gentoo-kernel-bin is using.
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 324

PostPosted: Sun Mar 10, 2024 3:17 pm    Post subject: Reply with quote

sMueggli wrote:
The USE flag cryptsetup for systemd pulls in sys-fs/cryptsetup. Dracut is then adding the module "crypt" if it finds sys-fs/cryptsetup installed.

I watched the two videos today. The Grub video is correct, you enter the LUKS passphrase and Grub is successfully unlocking the LUKS container and loading the grub.cfg.

The video with the dracut/initramfs part is not ok. In the video it tries to mount /dev/mapper/root, but you are never asked to enter the LUKS passphrase prior to mount /dev/mapper/root.

Can you please show the /boot/grub/grub.cfg (please as text)? And I would also rebuild the initramfs with Dracut:

Code:
# as an example, adjust the values
dracut --force --logfile=/tmp/dracut.txt initramfs-6.6.13-gentoo.img 6.6.13-gentoo
#      |       |                         |                           \ name of the kernel (uname -r)
#      |       |                         \ name of the initramfs in /boot
#      |       \ store the output in a logfile to share
#      \ if the initramfs already exists, force the creation


I am using gentoo-sources and I do not know, which dracut command gentoo-kernel-bin is using.


yes the proble was with me not rebuilding kernel with emerge -a --config gentoo-kenrelbin i did that now it works, but well it asks for my passhphrae 3 TIMES !!!!
1. before grub shows which is fine
then 2 times in systemd, first for unlokcing UID of /dev/sda3 a
and the third time for unlocking /dev/mapper/root? what the hell,,
and i couldnt share my cfg as text because i couldnt login :d now i can and will post soon as soon i compile firefox
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 481

PostPosted: Sun Mar 10, 2024 3:20 pm    Post subject: Reply with quote

Entering the LUKS passphrase twice is expected. 3 times is not normal.
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 324

PostPosted: Tue Mar 12, 2024 5:41 pm    Post subject: Reply with quote

sMueggli wrote:
Entering the LUKS passphrase twice is expected. 3 times is not normal.

ye three times look here
one before grub and after grub like this


but well after this it worked, so iwas in system was installing firefox and dolphin but hardware accelartion wasnt working, i have nvidia quadro K2200 so i masked nvidia propertiary driver versin 470 and remerge did emerge --config gentoo-kernel-bin and did grub again, but now i cant boot
i got this error very werid i am not sure why and how this happened, it was fine this morning, should i jus use normal open source driver? i would benefit from the performacne of the propetiary one
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum