You are not logged in.

#1 2013-07-13 07:57:57

netpumber
Member
Registered: 2009-09-20
Posts: 126

[SOLVED] Full system encryption with Luks + LVM + 6 HDDs

Hello.

I create a system with 6 HDDs. Only one has the /boot (which is not encrypted) and the rest of the system (/ , home , swap).

Before post the configuration of this system let me post the error after GRUB loading.

ERROR: device '/dev/mapper/lvmpool-root' not found. Skipping fsck.
ERROR: Unable to find root device '/dev/mapper/lvmpool-root'.
You are being dropped to a recovery shell

I boot from a livecd and after decrypt HDDs i mount them. Here is the result of lsblk command

sda
|_sda1                     10G   part

sdb
|_sdb1
   |_dumpsClone      80G   crypt /mnt/dumpsClone

sdc
|_sdc1
   |_netBu                 160G  crypt /mnt/netBu

sdd
|_sdd1
   |_netBuClone       160G   crypt /mnt/netBuClone

sde
|_sde1
   |_storage              500G   crypt /mnt/storage

sdf
|_sdf1                       500M  part /mnt/boot
|_sdf2       
   |_crypt_root
      |_lvmpool-root   80G     lvm /mnt
      |_lvmpool-swap  2G       lvm  [SWAP]
      |_lvmpool-home 215G  lvm /mnt/home

All disks except sdf2 sdf1 and sda1 are decrypted through keyfile.

sdf2 uses passphrase
sdf1 is the /boot
sda1 works with truecrypt

Here are two lines of  /mnt/etc/default/grub file :

GRUB_CMDLINE_LINUX="cryptdevice=/dev/sdf2:lvmpool-root"
GRUB_DISABLE_LINUX_UUID=true

Any idea on why this happens ? Is there a problem in /etc/fstab file or in /boot/grub/grub.cfg ?

Where to look for fix it ?

Thanks in advance.

EDIT:

With more searching there is a line in /boot/grub/grub.cfg that mabe from there will the problem starts

linux /vmlinuz-linux root=/dev/mapper/lvmpool-root ro quiet

Last edited by netpumber (2013-07-15 16:52:45)

Offline

#2 2013-07-13 08:23:23

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,298
Website

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

I don't use grub, but shouldn't your root line look more like:

root=/dev/mapper/lvmpool-root cryptdevice=/dev/sdf2:lvmpool ro quiet

See: https://wiki.archlinux.org/index.php/LU … bootloader


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Online

#3 2013-07-13 08:26:35

netpumber
Member
Registered: 2009-09-20
Posts: 126

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

Yes i agree with you but i put it as it is in wiki configuration https://wiki.archlinux.org/index.php/Gr … encryption

Offline

#4 2013-07-13 08:30:41

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,298
Website

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

That doesn't take into account the fact that / is a logical volume. Try using the line I posted (after double checking that it does correspond to your volume names).


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Online

#5 2013-07-13 09:08:23

netpumber
Member
Registered: 2009-09-20
Posts: 126

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

Hmm nothing changed.

Now my linux line is

linux /vmlinuz-linux root=/dev/mapper/lvmpool-root cryptdevice=/dev/sdf2:lvmpool-root ro quiet

mabe i have to use somehow and the crypt_root (see lsblk result in the first post) ?

Offline

#6 2013-07-13 09:17:51

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,298
Website

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

netpumber wrote:

Hmm nothing changed.

Now my linux line is

linux /vmlinuz-linux root=/dev/mapper/lvmpool-root cryptdevice=/dev/sdf2:lvmpool-root ro quiet

I'm pretty sure the last string should be:

cryptdevice=/dev/sdf2:lvmpool


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Online

#7 2013-07-13 10:32:56

netpumber
Member
Registered: 2009-09-20
Posts: 126

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

I change it but now i take this :

GRUB loadingRead Error.

and after a while im getting the same error for lvmpool-root.

Last edited by netpumber (2013-07-13 10:41:33)

Offline

#8 2013-07-13 10:42:02

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,298
Website

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

Please post more information about how you are trying to get grub to work: MBR or GPT, the full grub config, etc.
Are you sure grub can boot from the sixth partition?

Perhaps someone who uses grub will be able to help you further...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Online

#9 2013-07-13 15:40:42

netpumber
Member
Registered: 2009-09-20
Posts: 126

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

So i tried again to install the system from ground zero but this time with GPT method.

Now the lsblk returns this :

..
...
....
sdf                  8:80   0 298.1G  0 disk  
├─sdf1               8:81   0   200M  0 part   <-----------This is the partition tha GPT wants with ef02 type
├─sdf2               8:82   0     1G  0 part  /mnt/boot
└─sdf3               8:83   0 296.9G  0 part  
  └─crypt_system   254:1    0 296.9G  0 crypt 
    ├─lvmpool-root 254:2    0    20G  0 lvm   /mnt
    ├─lvmpool-swap 254:3    0     2G  0 lvm   [SWAP]
    └─lvmpool-home 254:4    0 274.9G  0 lvm   /mnt/home

after chrooted i install the grub according this :

pacman -S grub
modprobe dm-mod
grub-install --target=i386-pc --recheck --debug /dev/sdf

Here is the grub.cfg

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  ad4103fa-d940-47ca-8506-301d8071d467
else
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  ad4103fa-d940-47ca-8506-301d8071d467
else
  search --no-floppy --fs-uuid --set=root ad4103fa-d940-47ca-8506-301d8071d467
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-ad4103fa-d940-47ca-8506-301d8071d467' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  ad4103fa-d940-47ca-8506-301d8071d467
        else
          search --no-floppy --fs-uuid --set=root ad4103fa-d940-47ca-8506-301d8071d467
        fi
        echo    'Loading Linux core repo kernel ...'
        linux   /boot/vmlinuz-linux root=UUID=ad4103fa-d940-47ca-8506-301d8071d467 ro  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-ad4103fa-d940-47ca-8506-301d8071d467' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  ad4103fa-d940-47ca-8506-301d8071d467
        else
          search --no-floppy --fs-uuid --set=root ad4103fa-d940-47ca-8506-301d8071d467
        fi
        echo    'Loading Linux core repo kernel ...'
        linux   /boot/vmlinuz-linux root=UUID=ad4103fa-d940-47ca-8506-301d8071d467 ro  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initramfs-linux-fallback.img
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

Are you sure grub can boot from the sixth partition?

Why not to ?

I also tried to change the linux line again but nothing happend

linux   /boot/vmlinuz-linux root=UUID=ad4103fa-d940-47ca-8506-301d8071d467  cryptdevice=/dev/sdf3:lvmpool ro  quiet

When im booting either i get GRUB loadingRead Error or a black screen.

Also /boot directory has only grub directory and nothing else like vmlinuz-linux or initramfs-linux.img

Something get wrong within pacstrap ?

Moderator edit:  Changed Quote tags to Code tags.

Last edited by ewaller (2013-07-14 17:41:24)

Offline

#10 2013-07-13 16:26:18

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,092
Website

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

netpumber wrote:

So i tried again to install the system from ground zero but this time with GPT method.

Now the lsblk returns this :

..
...
....
sdf                  8:80   0 298.1G  0 disk  
├─sdf1               8:81   0   200M  0 part   <-----------This is the partition tha GPT wants with ef02 type
├─sdf2               8:82   0     1G  0 part  /mnt/boot
└─sdf3               8:83   0 296.9G  0 part  
  └─crypt_system   254:1    0 296.9G  0 crypt 
    ├─lvmpool-root 254:2    0    20G  0 lvm   /mnt
    ├─lvmpool-swap 254:3    0     2G  0 lvm   [SWAP]
    └─lvmpool-home 254:4    0 274.9G  0 lvm   /mnt/home

If this really is your lsblk output, then your cmdline must necessarily contain:

root=/dev/mapper/lvmpool-root cryptdevice=/dev/sdf3:crypt_system

Your original config was wrong, as it created the cryptdevice with the name of the root LV (meaning that LVM can't create that LV name when the VG is activated). You seem to have a fundamental misunderstanding of how the cmdline is constructed for such a setup.

netplumber wrote:

Something get wrong within pacstrap ?

Laughable, since pacstrap has no responsibility for any of this (and quite intentionally).

Strongly urge you to use PARTUUIDs or PARTLABELs for identifying devices as well.

Last edited by falconindy (2013-07-13 16:29:22)

Offline

#11 2013-07-13 16:54:06

netpumber
Member
Registered: 2009-09-20
Posts: 126

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

Thank you a lot for your answer but why the vmlinuz-linux and initramfs-linux.img are missing? Should i reinstall the base system from the start or something else happened ?

Laughable, since pacstrap has no responsibility for any of this (and quite intentionally).

I think that during pacstrap execution (while linux package get installed) these images are being created.

Last edited by netpumber (2013-07-13 18:02:22)

Offline

#12 2013-07-13 18:17:33

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,092
Website

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

I listed only the args. You can figure out what to do with them.

Offline

#13 2013-07-13 18:26:30

netpumber
Member
Registered: 2009-09-20
Posts: 126

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

Finally grub2 loaded nice and let me choose to boot into the system. But after "loading Linux core repo kernel:  it returns again this error :

ERROR: device '/dev/mapper/lvmpool-root' not found. Skipping fsck.
ERROR: Unable to find root device '/dev/mapper/lvmpool-root'.

Why this lvm volume didn't created ?

Offline

#14 2013-07-13 19:27:51

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

Once it times out, from the console you are dropped into, try doing "vgscan && vgchange -ay".  Then exit out of the initramfs shell to continue the boot process.  If this works, then there is a massive thread about this issue here: https://bbs.archlinux.org/viewtopic.php?id=158012


Edit: If this is the problem, then there is really no clear solution with the current lvm2 and device-mapper packages. Though some people have found success with the global_filter option listed in that thread linked above, this did not work for me.  But what did work was using the lvm2 git sources instead.  I modified the current lvm2 build sources to do just that.  You can use ABS to download the tarball (PKGBUILD and other patches, etc.), then use this PKGBUILD in place of the one included.

Last edited by WonderWoofy (2013-07-13 19:34:15)

Offline

#15 2013-07-13 20:02:51

netpumber
Member
Registered: 2009-09-20
Posts: 126

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

Hmm something else it is .
It cannot found vgscan command the shell that i 've been dropped to.

Offline

#16 2013-07-13 20:06:23

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

Do you actually have the lvm2 hook in your initramfs (mkinitcpio)?

Edit: Actually, I don't think that you should have the vgscan command.  Rather you should have the all encompassing lvm command.  So you would do "lvm vgscan" then "lvm vgchange -ay".  Of course, you could just use '&&' to put it on all one line...

Last edited by WonderWoofy (2013-07-13 20:07:58)

Offline

#17 2013-07-13 20:13:18

netpumber
Member
Registered: 2009-09-20
Posts: 126

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

WonderWoofy wrote:

Do you actually have the lvm2 hook in your initramfs (mkinitcpio)?

Edit: Actually, I don't think that you should have the vgscan command.  Rather you should have the all encompassing lvm command.  So you would do "lvm vgscan" then "lvm vgchange -ay".  Of course, you could just use '&&' to put it on all one line...

Oh yea i have this

HOOKS="base udev ... block lvm2 filesystems" in /etc/mkinitcpio.conf and then i run mkinitcpio -p linux

Pff cannot understand.. I also change the linux line to use the uuid but still i get tha same error.

linux   /boot/vmlinuz-linux root=/dev/disk/by-uuid/c0e8326c-fd6f-4ac4-b17c-d32e423e0aec  cryptdevice=/dev/sdf3:crypt_system ro  quiet

Last edited by netpumber (2013-07-13 20:57:47)

Offline

#18 2013-07-13 22:57:19

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

Are you positive that is the UUID for the logical volume? Please post the output of lsblk -f.

For comparision:

root=/dev/vgroup-cfr/arch ro rootfstype=ext4 cryptdevice=/dev/disk/by-uuid/52c6459e-e27a-400f-a282-f73337d70f74:lvm

are the relevant parts of the command line I use with grub. (Not just grub but I am currently booting with grub.)

Here is the relevant part of lsblk -f:

└─sda3                         crypto_LUKS           52c6459e-e27a-400f-a282-f73337d70f74   
  └─lvm                        LVM2_member           VR2OhX-2hDp-ENmA-EWQg-NvNt-tb3o-NO9aJp 
    ├─vgroup--cfr-arch         ext4                  d21c59ce-afd2-430b-ba28-de546b5045ff   /

vgroup-cfr is the name of the volume group. lvm is the name I use for the decrypted luks container on sda3. (It is also the label of the GPT partition but I am not sure this matters.)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#19 2013-07-14 07:31:49

netpumber
Member
Registered: 2009-09-20
Posts: 126

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

here are the results of lsblk -f before chrooting


sdf                                                                               
├─sdf1                                                                           
├─sdf2             ext4                    e669721b-923d-4b6c-940a-94517f904e0a   /mnt/boot
└─sdf3             crypto_LUKS             bc7dd991-8573-42be-9c7f-ab879eb9f0f7   
  └─crypt_system   LVM2_member             RQ7u63-z0n6-EtZX-7j9O-kHxk-Nfvl-EmA30s
    ├─lvmpool-root ext4                    c0e8326c-fd6f-4ac4-b17c-d32e423e0aec   /mnt
    ├─lvmpool-swap swap                    5f50fd77-80cf-4479-9f0b-41cb34d9d93f   [SWAP]
    └─lvmpool-home ext4                    3887abcf-3677-4038-b51c-1dcb0d5c74b5   /mnt/home

So i will try this and i ll tell you:

root=/dev/lvmpool/root ro rootfstype=ext4  cryptdevice=/dev/disk/by-uuid/c0e8326c-fd6f-4ac4-b17c-d32e423e0aec:crypt_system

Last edited by netpumber (2013-07-14 07:32:06)

Offline

#20 2013-07-14 12:09:58

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,092
Website

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

netpumber wrote:

So i will try this and i ll tell you:

root=/dev/lvmpool/root ro rootfstype=ext4  cryptdevice=/dev/disk/by-uuid/c0e8326c-fd6f-4ac4-b17c-d32e423e0aec:crypt_system

No, this is again wrong.

Your cryptdevice isn't your root. I explicitly pointed out in my example that your cryptdevice should be /dev/sdf3, or UUID=bc7dd991-8573-42be-9c7f-ab879eb9f0f7 -- this is the encrypted block device that needs unlocking in order to expose (indirectly) your actual root device specified by root=/dev/mapper/lvmpool-root.

Offline

#21 2013-07-14 13:40:32

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

Just to illustrate what falconindy said notice that my command line uses cryptdevice=/dev/disk/by-uuid/52c6459e-e27a-400f-a282-f73337d70f74:lvm and that this corresponds to the UUID of sda3 and not to the UUID of the logical volume of root.

cfr wrote:
root=/dev/vgroup-cfr/arch ro rootfstype=ext4 cryptdevice=/dev/disk/by-uuid/52c6459e-e27a-400f-a282-f73337d70f74:lvm
└─sda3                         crypto_LUKS           52c6459e-e27a-400f-a282-f73337d70f74       <--- this matches the UUID I'm using to identify the cryptdevice
  └─lvm                        LVM2_member           VR2OhX-2hDp-ENmA-EWQg-NvNt-tb3o-NO9aJp 
    ├─vgroup--cfr-arch         ext4                  d21c59ce-afd2-430b-ba28-de546b5045ff   /   <--- this is NOT the UUID I'm using

In contrast, you are trying to use the UUID of your root logical volume for your cryptdevice. But that volume is not available until after the encrypted container is decrypted. So as far as the system is concerned, it simply does not exist at that point in the boot process.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#22 2013-07-14 13:47:09

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,277

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

Sorry to jump in, but:

falconindy wrote:

If this really is your lsblk output, then your cmdline must necessarily contain:

root=/dev/mapper/lvmpool-root cryptdevice=/dev/sdf3:crypt_system

Is it really needed to specify a "root="?
I ask for two reasons: Firstly, I always used to specify it but learned on the way that it is not necessary. Secondly, if it is necessary, our wiki is wrong on a number of occassions (e.g.).

Take away any possibly existing errors/bugs users have with lvm2 assembly, is it desirable to specify the root= for mkinitcpio or not?

Offline

#23 2013-07-14 13:49:02

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,092
Website

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

Strike0 wrote:

Sorry to jump in, but:

falconindy wrote:

If this really is your lsblk output, then your cmdline must necessarily contain:

root=/dev/mapper/lvmpool-root cryptdevice=/dev/sdf3:crypt_system

Is it really needed to specify a "root="?
I ask for two reasons: Firstly, I always used to specify it but learned on the way that it is not necessary. Secondly, if it is necessary, our wiki is wrong on a number of occassions (e.g.).

Take away any possibly existing errors/bugs users have with lvm2 assembly, is it desirable to specify the root= for mkinitcpio or not?

Uhh, you can't boot without root= specified... mkinitcpio's /init reads this, and if not this, then the kernel reads it.

How is root supposed to be mounted if the responsible party doesn't know what to mount?

Offline

#24 2013-07-14 14:08:49

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

The example in the wiki you link to is actually specifying the command line in /etc/default/grub. I don't generate grub.cfg automatically but have you checked what ends up in grub.cfg? Since / is mounted when the config is autogenerated, maybe the script adds root= in that case?

An example a little further down does specify root= for grub for some reason...


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#25 2013-07-14 14:13:12

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,277

Re: [SOLVED] Full system encryption with Luks + LVM + 6 HDDs

falconindy wrote:

Uhh, you can't boot without root= specified... mkinitcpio's /init reads this, and if not this, then the kernel reads it.

How is root supposed to be mounted if the responsible party doesn't know what to mount?

Ah, I did not take into account that root= gets sorted automagically when generating the grub.cfg and the boot parameters are appended to it. That way, the wiki is right as well then (as the cryptdevice= parameter is appended to the autogenerated root=UUID=). I used to specify the root=/dev/mapper/.. manually too, that was the way I was remembering. Thanks!

edit: cfr, crosspost and yes, I saw the seemingly contradictionary wiki as well. But we have the answer now.

Last edited by Strike0 (2013-07-14 14:26:27)

Offline

Board footer

Powered by FluxBB