You are not logged in.

#1 2010-07-21 12:44:13

mbrown
Member
Registered: 2008-11-09
Posts: 10

[SOLVED] LVM on dm_crypt: bootup error

When I try to boot into my freshly installed (2010.05) system, I get the following errors at boot:

:: Activating LVM2 groups     [Busy] File-based locking initialisation failed.
                                                [Done]
:: Unlocking encrypted volumes: swap..creating swapspace..ok home..ok [Done]
File-based locking initialization failed.
:: Mounting Root Read-only     [Done]
:: Checking Filesystems     [Busy] /dev/mapper/cryptvol-root: clean, 25734/960992 files, 222374/3840000 blocks
fsck.ext4: Device or resource busy while trying to open /dev/mapper/cryptvol-home
Filesystem mounted or opened exclusively by another program?
/dev/sda1: clean, 30/24096 files, 17653/96356 blocks
                                              [FAIL]

******** FILESYSTEM CHECK FAILED **********
Please repair manually and reboot. Note that the root 
file system is currently mounted read-only. To remount it 
read-write type: mount -n -o remount,rw / . When you exit 
the maintenance shell the system will reboot automatically.

When I then try to do:

# mount /dev/mapper/cryptvol-home /mnt/test
mount: /dev/mapper/cryptvol-home already mounted or /mnt/test busy

# cat /proc/mounts
rootfs / rootfs rw 0 0
proc /proc proc rw,relatime 0 0
sys /sys sysfs rw,relatime 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=128077,mode=755 0 0
/dev/mapper/cryptvol-root / ext4 rw,relatime,barrier=1,data=ordered 0 0

Followed the LVM on dm_crypt instructions in the Official Install Guide.

My /etc/fstab:

...
/dev/mapper/cryptvol-root / ext4 defaults 0 1
/dev/mapper/cryptvol-swap swap swap defaults 0 0
/dev/mapper/cryptvol-home /home ext4 defaults 0 1
/dev/sda1 /boot ext2 defaults 0 1

My /etc/crypttab:

swap /dev/cryptvol/swap SWAP -c aes-cbc-essiv:sha256 -s 256
home /dev/cryptvol/home <MYPASSWORD> -c aes-cbc-essiv:sha256 -s 256

Can anyone help?

Last edited by mbrown (2010-07-30 23:21:18)

Offline

#2 2010-07-27 02:49:06

mbrown
Member
Registered: 2008-11-09
Posts: 10

Re: [SOLVED] LVM on dm_crypt: bootup error

No ideas?

This is a complete showstopper for me...

Offline

#3 2010-07-30 23:19:50

mbrown
Member
Registered: 2008-11-09
Posts: 10

Re: [SOLVED] LVM on dm_crypt: bootup error

Finally all I needed was an EMPTY /etc/crypttab and an /etc/fstab as follows:

/dev/mapper/cryptvol-root / ext3 defaults 0 1
/dev/sda1 /boot ext2 defaults 0 1
/dev/mapper/cryptvol-home /home ext4 defaults 0 1
/dev/mapper/cryptvol-swap swap swap defaults 0 0

Hope someone will find this useful!

Offline

#4 2010-07-31 11:53:24

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,004
Website

Re: [SOLVED] LVM on dm_crypt: bootup error

crypttab is not needed indeed. the encryption mkinitcpio hook decrypts the volume, lvm hooks makes the volumes available, and from then on, volumes like /dev/mapper/cryptvol-home and such are regular LVM logical volumes which you can mount just like that.

why did you have stuff in your crypttab? It would suprise me if the installer filled in that stuff.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#5 2010-08-03 00:29:30

mbrown
Member
Registered: 2008-11-09
Posts: 10

Re: [SOLVED] LVM on dm_crypt: bootup error

Dieter@be wrote:

why did you have stuff in your crypttab? It would suprise me if the installer filled in that stuff.

I think I must have edited the crypttab because aif listed it as a config file to edit. I said to myself "I'm using encryption", and so I wrote entries based on the commented examples.

Should /etc/crypttab thus be removed as an option at the conf file editing step of an aif install if it's not used?

Offline

#6 2010-08-03 17:39:58

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,004
Website

Re: [SOLVED] LVM on dm_crypt: bootup error

mbrown wrote:
Dieter@be wrote:

why did you have stuff in your crypttab? It would suprise me if the installer filled in that stuff.

I think I must have edited the crypttab because aif listed it as a config file to edit. I said to myself "I'm using encryption", and so I wrote entries based on the commented examples.

Should /etc/crypttab thus be removed as an option at the conf file editing step of an aif install if it's not used?

The system configuration steps lists multiple config files which may or may not apply to you.  It's up to the user to know which files he must edit. (and no, aif cannot be smarter then the user.  The user might have encrypted things which aif doesn't know about)


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

Board footer

Powered by FluxBB