Re: LVM2 logical volumes on Loop-AES

Fog_Watch <[email protected]>
Newsgroups gmane.linux.cryptography
Message-ID <[email protected]>
On Fri, 17 Aug 2007 21:18:08 +0300
Jari Ruusu <[email protected]> wrote:

> 4a) mount /proc
http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/LVM2/scripts/lvm2create_initrd/lvm2create_initrd?content-type=text/plain&cvsroot=lvm2&only_with_tag=HEAD
includes:
# We need /proc for device mapper
echo "$PRE Mounting /proc"
mount -t proc none /proc
> 4b) mount /sys
http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/LVM2/scripts/lvm2create_initrd/lvm2create_initrd?content-type=text/plain&cvsroot=lvm2&only_with_tag=HEAD
does not say anything about /sys.
> 4c) run /lib/losetup -a
> 4d) unmount /sys
> 4e) unmount /proc
> 
> That "mknod dev/root b 7 5" (line 765) at the end of the patch
> decides what device gets mounted at step 5. You need to change that.
Based on:
mr-nosey ~ # ls -la /dev/mapper/vg-root 
brw------- 1 root root 254, 0 Aug 19 06:04 /dev/mapper/vg-root
The line in build-initrd.sh read (high levels of guessing going on
here):
mknod dev/root b 254 0

I don't know about this.  That lvm2create_initrd script says, "#
Device-Mapper dynamically allocates all device numbers. "
> Also, step 4c (at line 564) needs to be changed to run "/lib/lvm
> vgscan". 
I also tried the --ignorelockingfailure option.
> /lib/rootsetup script and /lib/sh and other programs
> (/lib/lvm excluded) that you copied to your boot partition can be
> removed. Set USEROOTSETUP=0 in build-initrd.sh config, this plan B
> does not need that.
> 
> This time I tested this patch. I don't have lvm on my test box, so I
> used "/lib/losetup -a" as the program to run between loop setup (at
> step 4) and mount (at step 5).
> 
I used the "2007-08-17 22:12" patch when testing.

The error returned by the patched script, after entering the password
for losetup, was:
"Failed to create LVM2 system dir for metadata backups, config files
and internal cache.

Set environment variable LVM_SYSTEM_DIR to alternative location or
empty string."

This appears to be consistent with a line in 
http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/LVM2/scripts/lvm2create_initrd/lvm2create_initrd?content-type=text/plain&cvsroot=lvm2&only_with_tag=HEAD
"echo "$PRE Remounting / read/write"
mount -t ext2 -o remount,rw /dev/ram0 /"

Jari, I think you're getting closer.  I can almost smell that booting
logical volume.

Regards

Fog_Watch.


-- 
Lose wait.  Get Gentoo.

-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.