Difference between pages "Welcome" and "Rootfs over encrypted lvm"

From Funtoo
(Difference between pages)
Jump to: navigation, search
 
(Create logical volumes)
 
Line 1: Line 1:
<div style="float:right; width: 35%">
+
This howto describes how to setup LVM and rootfs with cryptoLUKS-encrypted drive
{{#Widget:MonthlyDonate}}
+
  
<div class="boxy">
+
= Prepare the hard drive and partitions =
== Get on the UserMap! ==
+
This is an example partition scheme, you may want to choose differently.
{{#compound_query:[[Category:People]] [[Role type::Staff]];?Geoloc;icon=Purplemarker.png;limit=9999
+
<code>/dev/sda1</code> used as <code>/boot</code>. <code>/dev/sda2</code> will be encrypted drive with LVM.
    |[[Category:People]][[Role type::Contributor]];?Geoloc;icon=Orangemarker.png;limit=9999
+
    |[[Category:People]][[Role type::User]];?Geoloc;icon=Greenmarker.png;limit=9999
+
    |format=googlemaps3|height=275|zoom=1|type=hybrid|markercluster=yes}}
+
See our full-size [[Usermap]] and find out how to become part of the Funtoo Universe!
+
</div>
+
<div class="boxy">
+
== Join the User Community ==
+
  
Funtoo Linux is focused on the needs of our users. Here's how to get involved:
+
<pre>/dev/sda1
;wiki: Help us maintain content on this wiki. Add yourself to the Funtoo [[Usermap]].
+
/dev/sda2
;bugs: Our [http://bugs.funtoo.org bug tracker] is used to track all ongoing development work in Funtoo Linux. If you find a bug in Funtoo Linux, report it here. Also used for enhancement requests.
+
dd if=/dev/zero of=/dev/sda2 bs=100M
;IRC: Join us in the <tt>#funtoo</tt> IRC channel on <tt>irc.freenode.net</tt>.
+
dd if=/dev/urandom of=/dev/sda2 bs=100M</pre>
;mailing list: The [https://groups.google.com/forum/#!forum/funtoo-dev funtoo-dev mailing list] is used for development discussion.
+
dd part is optional, only for security reason by overwriting the lingering data on the device with random data. It takes around 6 hours to complete for a 200GB drive.
;forums: [http://forums.funtoo.org Funtoo Forums] are available for forum-style Funtoo discussion.
+
;blogs: [http://larrythecow.org LarryTheCow.org] is a blog aggregation service for Gentoo ecosystem developers and users.
+
;rss/atom: [[Funtoo RSS and Atom Feeds]] displays the latest posts on the Forums and Planet Larry.
+
</div>
+
</div>
+
  
= Welcome to the Funtoo Wiki! =
+
Note that you will get a message about reaching the end of the device. That's intentional and desired in this case so that this command works without knowing the size of your device.
  
[[Funtoo Linux]] is a Linux-based operating system created by [[user:Drobbins|Daniel Robbins]], the creator and former Chief Architect of Gentoo Linux. Funtoo Linux is a Free software, or "Open Source" operating system. All distribution source code is freely available, and it can be used and distributed free of charge.
+
= Encrypting the drive =
  
Who develops and improves Funtoo Linux? '''You do.''' We are a completely open meta-distribution that is run by our users and a small group of support staff. Our development centers around the needs of our users. Any user can contribute code and help improve Funtoo Linux functionality on our [http://bugs.funtoo.org bug tracker].
+
<console>
 +
##r### ##b##cryptsetup -c aes-xts-plain64 luksFormat /dev/sda2
 +
##r### ##b##cryptsetup luksOpen /dev/sda2 dmcrypt_root
 +
</console>
  
== Featured Video ==
+
There you'll be prompted to enter your password phrase for encrypted drive, type your paranoid password there.
  
In this video, Jonathan Vasquez ([[User:Fearedbliss|fearedbliss]]) walks you through the process of installing Funtoo Linux with ZFS. See the [[ZFS Install Guide]] for detailed instructions.
+
= Create logical volumes =
 +
<console>
 +
##r## ##b##pvcreate /dev/mapper/dmcrypt_root
 +
##r## ##b##vgcreate vg /dev/mapper/dmcrypt_root
 +
##r## ##b##lvcreate -L10G --name root vg         
 +
##r## ##b##lvcreate -L2G --name swap vg
 +
##r## ##b##lvcreate -L5G --name portage vg
 +
##r## ##b##lvcreate -l 100%FREE -nhome vg
 +
</console>
 +
Feel free to specify your desired size by altering the numbers after the -L flag. For example, to make your portage dataset 20GB's, use the flag -L20G instead of -L5G.
  
{{#widget:YouTube|id=kxEdSXwU0ZI|width=640|height=360}}
+
= Create a filesystem on volumes =
 +
<pre>mkfs.ext2 /dev/sda1
 +
mkswap /dev/mapper/vg-swap
 +
mkfs.ext4 /dev/mapper/vg-root
 +
mkreiserfs /dev/mapper/vg-portage
 +
mkfs.xfs /dev/mapper/vg-home</pre>
  
== Meta-Distribution, Optimized ==
+
= Basic system setup =
 +
<pre>swapon /dev/mapper/vg-swap
 +
mount /dev/mapper/vg-root /mnt/funtoo
 +
mkdir /mnt/funtoo/boot
 +
mount /dev/sda1 /mnt/funtoo/boot</pre>
 +
Now perform all the steps required for basic system install, please follow [http://docs.funtoo.org/wiki/Funtoo_Linux_Installation]
 +
don't forget to emerge next packages:
  
Funtoo Linux is also a ''meta''-distribution, which means that it is built automatically from source code and is customized with the functionality that ''you'' want it to have, and ''without'' the unnecessary features and "bloat" that you want to avoid.
+
<pre># emerge cryptsetup lvm2 grub foo-sources</pre>
  
In addition, a Funtoo Linux system is [[Download|optimized for your CPU]], and we offer optimized versions for ''Intel Core i7'', ''Intel Atom'', ''AMD Opteron'', and other processors and architectures.
+
Re-emerge sys-apps/busybox and sys-fs/cryptsetup with the "static" USE flag
  
These combination of factors work together to create an extremely high-performance and flexible computing platform -- a platform where ''you'' are in control, and your system performs optimally. We believe that Funtoo Linux is the most ideal expression of how operating system technology "should" work, and we continually strive to make it better.
+
= Kernel options =
 +
Important, do not miss this part.
 +
Under General setup --->
 +
<pre>[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support</pre>
  
== The Gentoo Ecosystem ==
+
Under Device Drivers --->
 +
<pre>Generic Driver Options  --->
 +
  [*] Maintain a devtmpfs filesystem to mount at /dev
 +
[*] Multiple devices driver support  --->
 +
  <*>Device Mapper Support
 +
  <*> Crypt target support
 +
</pre>
  
We are committed to maintaining high-levels of compatibility and collaboration with the Gentoo Linux project, and challenge ourselves to innovate while providing new approaches that can be easily leveraged by the Gentoo Community. We appreciate the support we receive from members of the Gentoo Community and strive to contribute back to the larger [[Gentoo Ecosystem]].
+
Under Cryptographic API --->
 +
<pre>-*-AES cipher algorithms
  
== Ultimate Flexibility for Developers ==
+
<*> XTS support (EXPERIMENTAL)</pre>
  
Does your Linux distribution allow multiple versions of <tt>php</tt>, <tt>[[python]]</tt> or <tt>ruby</tt> installed happily alongside each other? Funtoo Linux does. Are you tired of hand-building key packages from source to configure them exactly the way you want? Funtoo Linux allows you to tweak the build-time features of packages using handy things called USE variables. Other distributions are forced to either leave stuff out that you want, or include stuff you don't want.
 
  
== Virtualization ==
+
= Initramfs setup and configuration =
 +
Build your initramfs with [https://bitbucket.org/piotrkarbowski/better-initramfs better-initramfs] project.
  
We support the [[OpenVZ]] project and build up-to-date Funtoo Linux OpenVZ containers that you can [[Download|download]]. Also see [[VagrantUp]] for a nice way to deploy VirtualBox-based Funtoo Linux systems. [[Metro]], our automated distro build tool, is capable of building OpenVZ, Linux VServer and [[Linux Containers]] (LXC) images. Funtoo Linux also makes an excellent virtualization host system for [[Xen]].
+
{{fancynote|better-initramfs supports neither dynamic modules nor udev, so you should compile your kernel with built-in support for your block devices.}}
  
== Features ==
+
<pre># git clone git@bitbucket.org:piotrkarbowski/better-initramfs.git
 +
# cd better-initramfs
 +
# less README.rst
 +
# bootstrap/bootstrap-all
 +
# make prepare
 +
# make image
 +
</pre>
  
[[Funtoo Linux]] features native [[wikipedia:UTF-8|UTF-8]] support enabled by default, a [[wikipedia:Git (software)|git]]-based, [[Portage Tree|distributed Portage Tree]] and funtoo overlay, an enhanced [[Portage]] with more compact mini-manifest tree, automated imports of new [http://www.gentoo.org Gentoo] changes every 12 hours, [[GUID Booting Guide|GPT/GUID boot support]] and [[Boot-Update|streamlined boot configuration]], [[Funtoo Linux Networking|enhanced network configuration]], up-to-date [http://ftp.osuosl.org/pub/funtoo/funtoo-stable/ stable] and [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ current] Funtoo [[Stage Tarball|stages]], all built using Funtoo's [[Metro]] build tool. We also offer Ubuntu Server, Debian, RHEL and Fedora-based [[Funtoo Linux Kernels|kernels]].
+
Copy resulting <code>initramfs.cpio.gz</code> to <code>/boot</code>.
 +
<pre># cp output/initramfs.cpio.gz /boot
 +
</pre>
 +
Alternatively pre-compiled binary initramfs available at https://bitbucket.org/piotrkarbowski/better-initramfs/downloads
 +
<pre># wget https://bitbucket.org/piotrkarbowski/better-initramfs/downloads/release-x86_64-v0.7.2.tar.bz2
 +
# tar xf release-x86_64-v0.5.tar.bz2
 +
# cd release*
 +
# gzip initramfs.cpio
 +
# cp initramfs.cpio.gz /boot</pre>
  
Funtoo is currently supported on the following processor families :
+
Remember, better-initramfs project is a work in progress, so you need to update from time to time. It can be done easily with <code>git</code>. Go to the better-initramfs source dir and follow:
* PC-compatible, both 32 and 64-bit (''x86-32bit'', ''x86-64bit'')
+
<pre># git pull
 +
# less ChangeLog
 +
</pre>
 +
Please, read the ChangeLog carefuly and do necessary updates, to <code>/etc/boot.conf</code>, the example config below. Please, backup working <code>initramfs.cpio.gz</code> and <code>/etc/boot.conf</code> before updating initramfs.
  
== Resources ==
+
= Genkernel approach =
 +
Funtoo's genkernel capable to create initramfs for encrypted drive. Compile and install kernel and initramfs of your favorite kernel sources:
 +
<pre>genkernel --kernel-config=/path/to/your/custom-kernel-config --no-mrproper --makeopts=-j5 --install --lvm --luks all</pre>
 +
Configure the bootloader as described above, with correct kernel and initramfs images names. An example for genkernel and grub2:
  
* Learn more about [[Funtoo Linux]].
+
{{code|/etc/boot.conf|<pre>
* Why you should [[Choose Funtoo]]: ...and how it is different from other distros.
+
boot {
* Visit [[:Category:Projects|Funtoo Linux Projects]] and also look at the stuff online for [[Metro]].
+
  generate grub
* Learn [[:Category:Linux Core Concepts| Core Linux concepts]] from articles originally written by Daniel Robbins.
+
  default "Funtoo Linux"
* [[Funtoo Linux Installation|Install Funtoo Linux]]
+
  timeout 3
 +
}
 +
"Funtoo Linux" {
 +
  kernel kernel-genkernel-x86_64-2.6.39
 +
  initrd initramfs-genkernel-x86_64-2.6.39
 +
  params += crypt_root=/dev/sda2 dolvm real_root=/dev/mapper/vg-root  rootfstype=ext4 resume=swap:/dev/mapper/vg-swap quiet
 +
}</pre>}}
  
 +
= Grub2 configuration =
 +
An example of <code>/etc/boot.conf</code> for better-initramfs
 +
{{code|/etc/boot.conf|<pre>
 +
boot {
 +
  generate grub
 +
  default "Funtoo Linux"
 +
  timeout 3
 +
}
 +
"Funtoo Linux" {
 +
  kernel bzImage[-v]
 +
  initrd /initramfs.cpio.gz
 +
  params += enc_root=/dev/sda2 lvm luks root=/dev/mapper/vg-root  rootfstype=ext4 resume=swap:/dev/mapper/vg-swap quiet
 +
}</pre>}}
  
__NOTOC__
+
{{code|/etc/fstab|
__NOTITLE__
+
<pre>
__NOEDITSECTION__
+
# <fs>                  <mountpoint>  <type>    <opts>                          <dump/pass>
 +
/dev/sda1              /boot        ext2      noauto,noatime                  1 2
 +
/dev/mapper/vg-swap    none          swap      sw                              0 0
 +
/dev/mapper/vg-root    /            ext4      noatime,nodiratime,defaults    0 1
 +
/dev/sr0                /mnt/cdrom    auto      noauto,ro                      0 0
 +
/dev/mapper/vg-portage  /usr/portage  reiserfs  noatime,nodiratime              0 0
 +
/dev/mapper/vg-home    /home        xfs      noatime,nodiratime,osyncisdsync 0 0</pre>}}
  
[[Category:Funtoo|*]]
+
= Lilo configuration =
 +
For oldschool geeks, an example for lilo bootloader. Emerge lilo with device-mapper support
 +
<pre>
 +
# echo 'sys-boot/lilo device-mapper' >> /etc/portage/package.use/lilo
 +
# emerge lilo</pre>
 +
 
 +
{{code|/etc/lilo.conf|<pre>append="init=/linuxrc dolvm crypt_root=/dev/sda2 real_root=/dev/mapper/vg-root"
 +
boot=/dev/sda
 +
compact
 +
default=funtoo
 +
lba32
 +
prompt
 +
read-only
 +
timeout=50
 +
image=/boot/kernel-genkernel-x86_64-2.6.39
 +
initrd=/boot/initramfs-genkernel-x86_64-2.6.39
 +
label=funtoo
 +
</pre>}}
 +
= Syslinux bootloader setup =
 +
Syslinux is another advanced bootloader which you can find on all live CD's.
 +
<pre>
 +
# emerge syslinux
 +
# mkdir /boot/extlinux
 +
# extlinux --install /boot/extlinux
 +
# dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/mbr.bin of=/dev/sda
 +
- or -
 +
# sgdisk /dev/sda --attributes=1:set:2
 +
# dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/gptmbr.bin of=/dev/sda, for GPT partition</pre>
 +
{{code|/boot/extlinux/extlinux.conf|<pre>LABEL kernel1_bzImage-3.2.1
 +
MENU LABEL Funtoo Linux bzImage-3.2.1
 +
LINUX /bzImage-3.2.1
 +
INITRD /initramfs.cpio.gz
 +
APPEND rootfstype=ext4 luks enc_root=/dev/sda2 lvm root=/dev/mapper/vg-root
 +
</pre>}}
 +
 
 +
= Final steps =
 +
Umount everything, close encrypted drive and reboot
 +
<pre>umount /mnt/funtoo/proc (/dev, /home, /usr/portage, /boot)
 +
vgchange -a n
 +
cryptsetup luksClose /dev/sda2 dmcrypt_root</pre>
 +
After reboot you will get the following:
 +
<pre>>>> better-initramfs started. Kernel version 2.6.35-gentoo-r10
 +
>>> Create all the symlinks to /bin/busybox.
 +
>>> Initiating /dev/dir
 +
>>> Getting LVM volumes up (if any)
 +
Reding all physical volumes. This make take awhile...
 +
No volume group found
 +
No volume group found
 +
>>> Opening encrypted partition and mapping to /dev/mapper/dmcrypt_root
 +
Enter passphrase fore /dev/sda2:</pre>
 +
Type your password
 +
 
 +
<pre>>>> Again, getting LVM volumes up (if any, after map dmcrypt).
 +
  Reading all physical volumes.  This may take a while...
 +
  Found volume group "vg" using metadata type lvm2
 +
  4 logical volume(s) in volume group "vg" now active
 +
>>> Mounting rootfs to /newroot
 +
>>> Umounting /sys and /proc.
 +
>>> Switching root to /newroot and executing /sbin/init.
 +
INIT: version 2.88 booting
 +
Loading /libexec/rc/console/keymap
 +
  OpenRC 0.6.1 is starting up Funtoo Linux (x86_64)
 +
...boot messages omitted for clarity
 +
 
 +
orion login: oleg
 +
Password:
 +
Last login: Thu Oct 14 20:49:21 EEST 2010 on tty1
 +
oleg@orion ~ %</pre>
 +
 
 +
= Additional links =
 +
* [[gentoo-wiki:Root filesystem over LVM2, DM-Crypt and RAID|Root filesystem over LVM2, DM-Crypt, and RAID]]
 +
* [http://wiki.archlinux.org/index.php/System_Encryption_with_LUKS_for_dm-crypt System Encryption with LUKS for dm-crypt]
 +
 
 +
[[Category:HOWTO]]

Revision as of 22:47, 6 December 2013

This howto describes how to setup LVM and rootfs with cryptoLUKS-encrypted drive

Contents

Prepare the hard drive and partitions

This is an example partition scheme, you may want to choose differently. /dev/sda1 used as /boot. /dev/sda2 will be encrypted drive with LVM.

/dev/sda1 
/dev/sda2
dd if=/dev/zero of=/dev/sda2 bs=100M 
dd if=/dev/urandom of=/dev/sda2 bs=100M

dd part is optional, only for security reason by overwriting the lingering data on the device with random data. It takes around 6 hours to complete for a 200GB drive.

Note that you will get a message about reaching the end of the device. That's intentional and desired in this case so that this command works without knowing the size of your device.

Encrypting the drive

# cryptsetup -c aes-xts-plain64 luksFormat /dev/sda2
# cryptsetup luksOpen /dev/sda2 dmcrypt_root

There you'll be prompted to enter your password phrase for encrypted drive, type your paranoid password there.

Create logical volumes

 pvcreate /dev/mapper/dmcrypt_root
 vgcreate vg /dev/mapper/dmcrypt_root
 lvcreate -L10G --name root vg           
 lvcreate -L2G --name swap vg
 lvcreate -L5G --name portage vg
 lvcreate -l 100%FREE -nhome vg

Feel free to specify your desired size by altering the numbers after the -L flag. For example, to make your portage dataset 20GB's, use the flag -L20G instead of -L5G.

Create a filesystem on volumes

mkfs.ext2 /dev/sda1
mkswap /dev/mapper/vg-swap
mkfs.ext4 /dev/mapper/vg-root
mkreiserfs /dev/mapper/vg-portage
mkfs.xfs /dev/mapper/vg-home

Basic system setup

swapon /dev/mapper/vg-swap
mount /dev/mapper/vg-root /mnt/funtoo
mkdir /mnt/funtoo/boot
mount /dev/sda1 /mnt/funtoo/boot

Now perform all the steps required for basic system install, please follow [1] don't forget to emerge next packages:

# emerge cryptsetup lvm2 grub foo-sources

Re-emerge sys-apps/busybox and sys-fs/cryptsetup with the "static" USE flag

Kernel options

Important, do not miss this part. Under General setup --->

[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support

Under Device Drivers --->

Generic Driver Options  --->
   [*] Maintain a devtmpfs filesystem to mount at /dev
[*] Multiple devices driver support  --->
   <*>Device Mapper Support
   <*> Crypt target support

Under Cryptographic API --->

-*-AES cipher algorithms

<*> XTS support (EXPERIMENTAL)


Initramfs setup and configuration

Build your initramfs with better-initramfs project.

Note: better-initramfs supports neither dynamic modules nor udev, so you should compile your kernel with built-in support for your block devices.
# git clone git@bitbucket.org:piotrkarbowski/better-initramfs.git
# cd better-initramfs
# less README.rst
# bootstrap/bootstrap-all
# make prepare
# make image

Copy resulting initramfs.cpio.gz to /boot.

# cp output/initramfs.cpio.gz /boot

Alternatively pre-compiled binary initramfs available at https://bitbucket.org/piotrkarbowski/better-initramfs/downloads

# wget https://bitbucket.org/piotrkarbowski/better-initramfs/downloads/release-x86_64-v0.7.2.tar.bz2
# tar xf release-x86_64-v0.5.tar.bz2
# cd release*
# gzip initramfs.cpio
# cp initramfs.cpio.gz /boot

Remember, better-initramfs project is a work in progress, so you need to update from time to time. It can be done easily with git. Go to the better-initramfs source dir and follow:

# git pull
# less ChangeLog

Please, read the ChangeLog carefuly and do necessary updates, to /etc/boot.conf, the example config below. Please, backup working initramfs.cpio.gz and /etc/boot.conf before updating initramfs.

Genkernel approach

Funtoo's genkernel capable to create initramfs for encrypted drive. Compile and install kernel and initramfs of your favorite kernel sources:

genkernel --kernel-config=/path/to/your/custom-kernel-config --no-mrproper --makeopts=-j5 --install --lvm --luks all

Configure the bootloader as described above, with correct kernel and initramfs images names. An example for genkernel and grub2:

Code: /etc/boot.conf
boot {
  generate grub
  default "Funtoo Linux"
  timeout 3
}
"Funtoo Linux" {
  kernel kernel-genkernel-x86_64-2.6.39
  initrd initramfs-genkernel-x86_64-2.6.39
  params += crypt_root=/dev/sda2 dolvm real_root=/dev/mapper/vg-root  rootfstype=ext4 resume=swap:/dev/mapper/vg-swap quiet
}

Grub2 configuration

An example of /etc/boot.conf for better-initramfs

Code: /etc/boot.conf
boot {
  generate grub
  default "Funtoo Linux"
  timeout 3
}
"Funtoo Linux" {
  kernel bzImage[-v]
  initrd /initramfs.cpio.gz
  params += enc_root=/dev/sda2 lvm luks root=/dev/mapper/vg-root  rootfstype=ext4 resume=swap:/dev/mapper/vg-swap quiet
}
Code: /etc/fstab
# <fs>                  <mountpoint>  <type>    <opts>                          <dump/pass>
/dev/sda1               /boot         ext2      noauto,noatime                  1 2
/dev/mapper/vg-swap     none          swap      sw                              0 0
/dev/mapper/vg-root     /             ext4      noatime,nodiratime,defaults     0 1
/dev/sr0                /mnt/cdrom    auto      noauto,ro                       0 0
/dev/mapper/vg-portage  /usr/portage  reiserfs  noatime,nodiratime              0 0
/dev/mapper/vg-home     /home         xfs       noatime,nodiratime,osyncisdsync 0 0

Lilo configuration

For oldschool geeks, an example for lilo bootloader. Emerge lilo with device-mapper support

# echo 'sys-boot/lilo device-mapper' >> /etc/portage/package.use/lilo
# emerge lilo
Code: /etc/lilo.conf
append="init=/linuxrc dolvm crypt_root=/dev/sda2 real_root=/dev/mapper/vg-root"
boot=/dev/sda
compact
default=funtoo
lba32
prompt
read-only
timeout=50
image=/boot/kernel-genkernel-x86_64-2.6.39
initrd=/boot/initramfs-genkernel-x86_64-2.6.39
label=funtoo

Syslinux bootloader setup

Syslinux is another advanced bootloader which you can find on all live CD's.

# emerge syslinux
# mkdir /boot/extlinux
# extlinux --install /boot/extlinux
# dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/mbr.bin of=/dev/sda
- or -
# sgdisk /dev/sda --attributes=1:set:2
# dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/gptmbr.bin of=/dev/sda, for GPT partition
Code: /boot/extlinux/extlinux.conf
LABEL kernel1_bzImage-3.2.1
MENU LABEL Funtoo Linux bzImage-3.2.1
LINUX /bzImage-3.2.1
INITRD /initramfs.cpio.gz
APPEND rootfstype=ext4 luks enc_root=/dev/sda2 lvm root=/dev/mapper/vg-root

Final steps

Umount everything, close encrypted drive and reboot

umount /mnt/funtoo/proc (/dev, /home, /usr/portage, /boot) 
vgchange -a n
cryptsetup luksClose /dev/sda2 dmcrypt_root

After reboot you will get the following:

>>> better-initramfs started. Kernel version 2.6.35-gentoo-r10
>>> Create all the symlinks to /bin/busybox.
>>> Initiating /dev/dir
>>> Getting LVM volumes up (if any)
Reding all physical volumes. This make take awhile...
No volume group found
No volume group found
>>> Opening encrypted partition and mapping to /dev/mapper/dmcrypt_root
Enter passphrase fore /dev/sda2:

Type your password

>>> Again, getting LVM volumes up (if any, after map dmcrypt).
  Reading all physical volumes.  This may take a while...
  Found volume group "vg" using metadata type lvm2
  4 logical volume(s) in volume group "vg" now active
>>> Mounting rootfs to /newroot
>>> Umounting /sys and /proc.
>>> Switching root to /newroot and executing /sbin/init.
INIT: version 2.88 booting
Loading /libexec/rc/console/keymap
  OpenRC 0.6.1 is starting up Funtoo Linux (x86_64)
...boot messages omitted for clarity
   
orion login: oleg
Password:
Last login: Thu Oct 14 20:49:21 EEST 2010 on tty1
oleg@orion ~ %

Additional links