This concept and these notes are entirely obsoleted by dm-crypt, if you want a complete encryption solution.
These notes were made from instructions from Slackware as of Slackware 14.2 64bit.
It's remarkably simple.
-
Logical Volume Management
Thanks to http://ftp.slackware.com/pub/slackware/slackware-current/README_LVM.TXT
Partitioning ∞
fdisk
or cfdisk are available on Slackware's install media.
-
Create a large partition which will become your LVM Volume Group. Perhaps you will use one big partition that takes up a whole disk.
- See Partition Alignment for the advanced user, although as of this writing (2016-11-04) things seem to either be automatic or "good enough" for an everyday user.
- Set this partition's type to
8e
(Linux LVM).
LVM setup ∞
Here is a suggested layout:
physical_volume=/dev/sdx1 volume_group=myvg pvcreate $physical_volume vgcreate $volume_group $physical_volume lvcreate -L 15G -n root $volume_group lvcreate -L 4G -n home $volume_group lvcreate -L 4G -n swap $volume_group lvcreate -L 100%FREE -n data $volume_group mkswap /dev/$volume_group/swap
More advanced users might make targets for /usr
, /etc
and perhaps /var
.
Slackware's setup
∞
- Run Slackware's
setup
-
Select your various LVM targets
root
for/
home
for/home
swap
for your swapdata
mounted perhaps at/data
-
Proceed with configuring your LILO as usual, and select
/dev/myvg/root
as your root filesystem to boot.- If LILO generates warnings or errors, ignore them in this step.
-
Complete your use of Slackware's
setup
, but do not reboot yet!
mkinitrd ∞
-
First enter a chroot:
chroot /mnt
-
The next step can be done the easy way with:
/usr/share/mkinitrd/mkinitrd_command_generator.sh -r
.. if it looks good, you can execute it like:
$( /usr/share/mkinitrd/mkinitrd_command_generator.sh -r )
Configure LILO ∞
(LILO)
-
Edit
/etc/lilo.conf
-
Look for "Linux bootable partition config"
- Add a line for the initrd.
- Change the filename of the kernel to be used. We will need to use a generic kernel.
It should look somewhat like this:
image = /boot/vmlinuz-generic-smp-4.4.14-smp initrd = /boot/initrd.gz root = /dev/myvg/root label = linux read-only
- When satisfied, save the changes to this file.
-
Run
lilo
while still in the chroot.- Lilo will issue a couple of warnings concerning a difference in what /proc/partitions reports and what lilo thinks are available partitions, but it is safe to ignore these.
-
Exit the chroot:
exit
-
Reboot
You are done!
RAID with LVM ∞
(RAID)
(No notes have been taken.)
ported