From Wiki-UX.info

Wiki-UX / Logical Volume Manager / Installing Slackware Linux on LVM root and swap
Jump to: navigation, search

Installing Slackware Linux on LVM root and swap

Abstract

As LVM is becoming more and more popular, most Linux distributions start to support "all-LVM" boot disks where you can define root and swap partitions as LVM logical volumes. As some distros work with LVM only if /boot is defined as separate partition, Slackware 13.1 allows to have all boot structures defined as logical volumes of boot LVM volume group.

Contents


Slackware installation interface does not allow the usage of LVM directly, so it must be done from the command line before installation starts.

1. Use cfdisk command to create the disk partition for LVM:

  • Type cfdisk at the command prompt
  • Erase all the partitions defined, if any
  • Positioned on the free space, select "create", then "primary" and then accept the default size if you want to use the whole disk for LVM
  • Mark the "Boot" button to define the partition as bootable
  • Select "Type" and use "8E" to define the disk as "Linux LVM"
  • Select "Write" and type "yes" to write the changes to disk

2. Create bootable LVM Volume Group and Logical Volumes

- Initialize the Physical Volume:

# pvcreate /dev/sda1

- Suppose that the boot volume group will be called "vg00". Create the vg00 volume group using /dev/sda1 disk:

# vgcreate vg00 /dev/sda1

- Create root and swap logical volumes:

# lvcreate -L 1G -n swap /dev/vg00
# lvcreate -l 100%FREE -n root /dev/vg00

- Create the device files and activate the volume group:

# vgscan --mknodes
# vgchange -a y /dev/vg00

- Initialize the swap:

# mkswap /dev/vg00/swap

3. Setup the Slackware Linux on LVM:

  • Type "setup" at the command prompt
  • Select /dev/vg00/root for root and /dev/vg00/swap for swap
  • Proceed with the installation

Reference

  • [<URL> <Webpage Title>]

Authors

This page was last modified on 16 April 2011, at 23:45. This page has been accessed 2,458 times.