Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Getting grub2 running with encrypted root fails
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
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 104
Location: Augsburg (Germany)

PostPosted: Sun Feb 10, 2013 9:15 pm    Post subject: Getting grub2 running with encrypted root fails Reply with quote

Hi,

i'm using gentoo since several years and i have several systems encrypted and working with grub1 and now i wanted to test grub2. I read the gentoo wiki and also the archlinux wiki and i tried this to get it working:
Code:
grub2-install --modules="part_gpt fat ext2" --no-floppy /dev/sda


in /etc/default/grub i have:
Code:
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:root"


and then i run:
Code:
grub2-mkconfig -o /boot/grub2/grub.cfg


But when i reboot, the system says it won't recognize root. So i got it working with this:
Code:
GRUB_DEVICE="/dev/mapper/root"
GRUB_CMDLINE_LINUX_DEFAULT="crypt_root=/dev/sda3"


Why is the second version working? Why is "cryptdevice" not working, what did i miss? I'm just guessing for now that "cryptdevice" instead of "crypt_root" is not supported by genkernel (as i didn't find it in the source)

thanks
Back to top
View user's profile Send private message
windex
n00b
n00b


Joined: 09 Dec 2012
Posts: 70

PostPosted: Mon Feb 11, 2013 6:18 pm    Post subject: Reply with quote

Thank you for your inquiry. We'll see if we can't get this sorted out. Can you please post /var/log/messages? Might be a clue in there.
Back to top
View user's profile Send private message
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 104
Location: Augsburg (Germany)

PostPosted: Mon Feb 11, 2013 7:01 pm    Post subject: Reply with quote

just a testing system for now. but i emerge syslog and post it :)

as i said it's working with crypt_root and i guess that genkernel just doesn't support cryptdevice as i searched through the sourcecode.
Back to top
View user's profile Send private message
gabrielg
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2012
Posts: 134

PostPosted: Tue Feb 12, 2013 3:07 pm    Post subject: Reply with quote

If you are using genkernel, then you have to use crypt_root, as specified in the manual.
I'm assuming that your kernel is in your boot partition (as opposed to the root partition), hence grub2 doesn't have to do any decryption.
Back to top
View user's profile Send private message
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 104
Location: Augsburg (Germany)

PostPosted: Wed Feb 13, 2013 7:07 pm    Post subject: Reply with quote

yes, was just confusing with the documentation from other distris.
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