Gentoo: LVM on a root partition
Start the install as normal
use fdisk/cfdisk to create a small /boot partition, the rest can be an LVM partion.
pvcreate /dev/sda2
vgcreate vg /dev/sda2
lvcreate -n swap -L 256M vg
lvcreate -n root -L 2G vg
Continue normally using /dev/vg/swap and /dev/vg/root for device nodes.
At kernel configure.
Install genkernel and lvm tools “emerge genkernel lvm2″
sensible default config
zcat /proc/config.gz > /usr/share/genkernel/x86/kernel-config-2.6
genkernel --lvm2 --menuconfig all
Continue normally
At Configuring the boot loader.
The grub menu entry may look like this:
title Gentoo LVM
root (hd0,0)
kernel /kernel-genkernel-x86-2.6.19-gentoo-r5 udev dolvm2 root=/dev/ram0 real_root=/dev/vg/root init=/linuxrc
initrd /initramfs-genkernel-x86-2.6.19-gentoo-r5
Continue normally
Posted: April 16th, 2007.
Tags: Linux/BSD