You are not logged in.

#1 2010-01-11 07:57:08

Bender Unit #22
Member
Registered: 2009-03-08
Posts: 7

LVM DM-CRYPT GRUB /dev/mapper/root already exists <SOLVED>

Hello there lovely arch community

I just successfully installed arch, i created a SYSTEM lvm group that consists of 4 physical volumes then i created a LOGICAL VOLUME called ROOT
So the outcome of it is /dev/mapper/SYSTEM-ROOT now the problem

From the documentation i read that i need to have cryptdevice=/dev/mapper/SYSTEM-ROOT:root    root=/dev/mapper/root   BUT if i set it like that then after decrypting the SYSTEM-ROOT it tries to decrypt /dev/mapper/root once again?? As it says that it already exists and is waiting for that device.

If i use                        cryptdevice=/dev/mapper/SYSTEM-ROOT:root    root=/dev/mapper/SYSTEM-ROOT      at the grub line it says later at booting it is being deprecated and i should use first line which doesn't work, then it normally works but mounts my root partition as read only.

I tried to set fstab to use both /dev/mapper/SYSTEM-ROOT or /dev/mapper/root  but neither make it read write after restart.

Anyone knows how i should set my fstab etc to make it work properly?

/etc/fstab:

#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0

#/dev/cdrom             /media/cd   auto    ro,user,noauto,unhide   0      0
#/dev/dvd               /media/dvd  auto    ro,user,noauto,unhide   0      0
#/dev/fd0               /media/fl   auto    user,noauto             0      0

/dev/mapper/root / ext4 defaults 0 1
/dev/sdc2 /boot ext4 defaults 0 1


vgdisplay:

--- Volume group ---
  VG Name               SYSTEM
  System ID
  Format                lvm2
  Metadata Areas        4
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                4
  Act PV                4
  VG Size               159.39 GB
  PE Size               4.00 MB
  Total PE              40804
  Alloc PE / Size       30720 / 120.00 GB
  Free  PE / Size       10084 / 39.39 GB
  VG UUID               14bdH6-Bmti-Z4de-RXP9-mWVU-7KJd-lJnLL8

/boot/grub/menu.lst:

# (0) Arch Linux
title  Arch Linux
root   (hd2,1)
kernel /vmlinuz26 Cryptdevice=/dev/mapper/SYSTEM-ROOT:root root=/dev/mapper/SYSTEM-ROOT ro vga=0x365
initrd /kernel26.img
(i put only the most important stuff from menu.lst)

lvdisplay:


--- Logical volume ---
  LV Name                /dev/SYSTEM/ROOT
  VG Name                SYSTEM
  LV UUID                ILGIQf-hxL3-T4pm-Grfa-RZd9-SoIl-M0tHyU
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                120.00 GB
  Current LE             30720
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     1024
  Block device           254:2

P.S. It seems as if with the new way of using encrypted filesystem it tries to decrypt /dev/mapper/root which is already decrypted.

Looks like i fixed it, after first mkinitcpio (because of autodetect?) the system did put keymap between lvm2 and encrypt

so it was like:

lvm2 keymap encrypt

I moved keymap earlier before lvm2

so it was like:

keymap lvm2 encrypt filesystem

Last edited by Bender Unit #22 (2010-01-11 19:03:53)

Offline

Board footer

Powered by FluxBB