LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 01-31-2014, 06:05 PM   #1
slacksam
Member
 
Registered: Oct 2012
Location: Germany
Distribution: Slackware, Salix, slarm64
Posts: 211

Rep: Reputation: 38
Question How can I add a second cryptdevice to GRUB2


Hi,
in a working Manjaro Linux installation with a LUKS encrypted system partition using LVM (root, swap and home) I have extended the home partition by adding another hdd, encrypted it with LUKS and expanded the logical volume so it uses the new disk.
Code:
$ lsblk
NAME           MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
fd0              2:0    1    4K  0 disk  
sda              8:0    0   10G  0 disk  
├─sda1           8:1    0  243M  0 part  /boot
└─sda2           8:2    0  9,8G  0 part  
  └─lukssda2   254:0    0  9,8G  0 crypt 
    ├─cvg-swap 254:1    0  512M  0 lvm   [SWAP]
    ├─cvg-root 254:2    0    8G  0 lvm   /
    └─cvg-home 254:3    0   10G  0 lvm   /home
sdb              8:16   0   10G  0 disk  
└─sdb1           8:17   0   10G  0 part  
  └─lukssdb1   254:4    0   10G  0 crypt 
    └─cvg-home 254:3    0   10G  0 lvm   /home
sr0             11:0    1  624M  0 rom
Now my problem is that GRUB2 doesn't understand this line in the /etc/default/grub:
Code:
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:cvg,/dev/sdb1:cvg root=/dev/cvg/root resume=/dev/cvg/swap"
When I try to boot the system, I get the following screen:Click image for larger version

Name:	Bootscreen.png
Views:	450
Size:	9.0 KB
ID:	14653

I spent lots of time with searching on the internet, not beeing able to find a solution.

Using /etc/crypttab has no effect in this case I think, because the LVM needs both disks before connecting to the root filesystem.

Does anybody know how to handle multiple cryptdevices in GRUB2 to get a correct prompt for entering the passwords?

Last edited by slacksam; 01-31-2014 at 06:12 PM.
 
Old 12-21-2021, 10:02 PM   #2
typewar
LQ Newbie
 
Registered: Mar 2019
Distribution: Arch Linux
Posts: 4

Rep: Reputation: Disabled
bump
 
Old 12-21-2021, 11:43 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,147

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
Are we to presume you have similar concerns ?. If so provide details - this is over 7 years dead.

Given that this is the Arch forum, as in all things Arch, start with the wiki.
 
Old 12-21-2021, 11:51 PM   #4
typewar
LQ Newbie
 
Registered: Mar 2019
Distribution: Arch Linux
Posts: 4

Rep: Reputation: Disabled
I stumbled upon this issue myself yes, but found that you don't need to change /etc/default/grub. Just use /etc/crypttab to do this:

# <target name> <source device> <key file> <options>
dm_crypt-1 UUID=523cef47-ebb4-49b4-b4f5-b6beaa31f3bd none luks,swap,initramfs
dm_crypt-2 UUID=6cef1c92-f4be-42df-9ea9-cd9857bdddef none luks,initramfs

---

Either way, I bumped the thread because it had no replies, and it showed pretty high up on duckduckgo.
 
  


Reply

Tags
crypt, devices, grub2, luks, lvm2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How do I add Opensuse to Grub2 menu in a triple boot setup Speedy624 Linux - Software 4 03-20-2013 05:00 PM
How to add PCBSD partition to Sabayon Grub2? rameshan12 Linux - Desktop 4 04-30-2012 09:25 PM
How to probe grub2 to add new installed os? shams Linux - Software 1 03-12-2012 12:45 PM
[SOLVED] How do I add gentoo to grub2 ? JESSEJJ89 Linux - General 6 12-29-2011 02:14 AM
How to add entry to GRUB2 with 2 hard disks rhklinux Linux - Newbie 3 06-08-2010 06:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 12:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration