Re: LVM2 logical volumes on Loop-AES

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 16 Aug 2007 19:35:47 +0300
Jari Ruusu <jariruusu@xxxxxxxxxxxxxxxxxxxxx> wrote:

> exists". My fault, sorry. But I did say that it was completely
> untested.
I am putting my hand up to be the guinea pig to do the "testing".
> 
> #!/lib/sh
> if [ "x$1" != "x-d" ] ; then
>     /lib/losetup -e AES128 -K /lib/rootkey.gpg
> -G /lib /dev/loop5 /dev/hda6 if [ $? = 0 ] ; then
>         /lib/lvm vgscan --mknodes
>         # initrd will attempt to mount /dev/loop5, so create fake
> entry here /lib/rm /dev/loop5
returns error "/lib/rm: cannot remove '/dev/loop5': Read-only file
system".  So, initrd is mounted ro, and should be rw?  Sorry,
suggestion?
>         /lib/mknod -m 600 /dev/loop5 b ????? ?????
Same.  Returns error, "/lib/mknod: '/dev/loop5': File exists".
>     fi
> else
>     # losetup needs loop5 as real loop device node, so create the old
> one again /lib/rm /dev/loop5
>     /lib/mknod -m 600 /dev/loop5 b 7 5
>     /lib/losetup -d /dev/loop5
> fi
> 
> After successfull setup, initrd code will attempt to mount a device
> called /dev/loop5 so above script uses /lib/rm to remove /dev/loop5
> device node and then creates new node using same /dev/loop5 name, but
> different major+minor. Replace those ????? in above script with
> major+minor of the device you want to be mounted as root. If the
I would like root to, in turn, be mounted on /dev/loop5.  What, I
1	setup /dev/loop5 on the /dev/loop5 that is already in
initrd (major=7 and minor=5).
2	rm /dev/loop5
3	mknod /dev/loop5 with fake major and minor, like 4 and 4
respectively?
Don't understand this bit.  Sorry, you've lost me.
> "detach loop" branch of the script is called, it will have to create
> the original device /dev/loop5 again, using major=7 minor=5.
> 
> I'm not sure if that --mknodes option for lvm vgscan is needed at
> all. You can also try without it. The problem is that if it creates
> many device nodes, the tiny initrd may run out of space.
I'm not sure either.  On one test, with lvm uncommented, the script
returned an ugly "Set environment variable LVM_SYSTEM_DIR to
alternative location or empty string".  I'll get to this later.
> 
> 

I have ROOTTYPE=ext3 in my build-initrd.sh config.  I presume this is
ignored because I am using rootsetup?

Jari, thank you for your perseverance. 

Regards

Fog_Watch.
-- 
Lose wait.  Get Gentoo.

-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux