Mint 13 Xfce: Multi-Drive LVM Workstation Install

These are Rough Notes for how I installed Linux Mint 13 Xfce on an old IBM P4 server using 3 10K RPM SCSI hard drives. As I continue to Install Mint 13 using LVM, the information in these notes will continue to expanded and evolve.

References:

Notes: If you are installing this on a newer computer system, then set the BIOS to boot using MBR – do not use the UEFI boot option. (These notes do not handle using UEFI.)

Please Note: This document uses both the Command Shell and the Root Command Shell. That is why when Terminal Commands are given below, the command prompt that is expected (ending either in $ or #) is at the beginning of each line − so do not copy & paste that 1st character.

To create the LVM partitions then install Mint, use the Mint 13 Xfce live boot (Just let the Mint 13 DVD or USB boot to the desktop.)

Install LVM Support for the Live Boot

  • Settings » Software Sources » Other Software
    • Remove the packages.medibuntu.org software source (that repository no longer exists on the Internet)
$ sudo apt-get update
$ sudo apt-get install lvm2

Only if you are doing a Reinstall of the OS that was loaded using these instructions:
Run the following 3 commands …

$ sudo vgchange -a y
$ sudo umount /dev/mapper/lm13-root
$ sudo umount /dev/mapper/lm13-home

… then skip down to Run the Linux Mint 13 Installer

Manually Create the LVM Volumes

$ sudo fdisk -l    # ensure the 3 drives are sda, sdb & sdc

Doing the below will erase all data on the physical drives that GParted is used to setup! This should be done only once, when first loading Linux Mint 13 – as any reload would use the existing LVM volumes, with the option to not Format/Erase the lm13-home (/home) Logical Volume.

GParted → to create the /boot & Physical LVM partitions

IF Linux was already installed on a “to be repurposed” hard drive, stop using the swap partition so the drive can be repartitioned. (Select the swap partition → Partition » Swap off)

  • Drive sda (/dev/sda)
    • Device » Create Partition Table (This will cause all data on the HDD to be lost.)
    • Create a 512MiB ext2 Primary Partition (to be used by /boot … “bootlvm” is the suggested Label)
    • Create an unformatted partition using the remainder of the drive space. (suggested Label pv01)

If Installing using a Single Hard Drive
Then just skip the below partitioning of the other 2 Hard Drives.

  • Drives sdb (/dev/sda) & sdc (/dev/sdc)
    • Device » Create Partition Table (This will cause all data on the HDD to be lost.)
    • Create a 512MiB unformatted Primary Partition (empty space, so all lvm pv are the same)
    • Create an unformatted partition using the remainder of the drive space. (suggested Labels pv02 & pv03)

Terminal Commands → to create the LVM volumes

The below is assuming that at least three 73GB hard drives are used for this. Also, with how LVM works, leaving the remaining space unused – to permit resizing (enlarging) LVM Volumes as needed, creating other “purpose specific” Logical Volumes, etc.– is very desirable.

$ sudo -i
# fdisk -l     # confirm to use /dev/sda2 /dev/sdb2 /dev/sdc2
# vgcreate lm13 /dev/sda2 /dev/sdb2 /dev/sdc2
# lvcreate -i3 -I4  -L32G -n root lm13    # 3 drive, 4k stipe, 32GB
# lvcreate -i3 -I4  -L8G -n swap lm13    # 3 drive, 4k stipe, 8GB
# lvcreate -i3 -I4  -L100G -n home lm13    # 3 drive, 4k stipe, 100GB

If Installing using a Single Hard Drive
Replace the above commands to create the Logical Volumes with the following:.

$ sudo -i
# fdisk -l     # confirm to use /dev/sda2
# vgcreate lm13 /dev/sda2
# lvcreate -L 32G -n root lm13
# lvcreate -L 8G -n swap lm13
# lvcreate -L 100G -n home lm13

# ls /dev/mapper    # should output the below
control  lm13-home  lm13-root  lm13-swap
# mkfs -t ext4 /dev/mapper/lm13-root
# mkfs -t ext4 /dev/mapper/lm13-home
# mkswap /dev/mapper/lm13-swap
# exit
$ exit

Run the Linux Mint 13 Installer

  • Run the “Install Linux Mint” application on the desktop
  • Select language, then ensure drive space & Internet OK
  • Installation Type → select Something Else
    • /dev/sda1 → Ext2 … /boot
    • /dev/mapper/lm13-root → Ext4 … /
    • /dev/mapper/lm13-swap → swap area
    • /dev/mapper/lm13-home → Ext4 … /home
    • “Device for boot loader installation:” → /dev/sda

IF you are doing a reinstall on the same LVM volumes, and there is data on the LVM /home volume from the previous install, make certain that the '“Format” box for lm13-home is UNCHECKED to preserve the user files– including any per-user system/program configuration files– during the reinstall.

  • Select the correct Time Zone, then the correct Keyboard Layout
  • Enter the appropriate information for Your Name, Your Computer's Name, etc.

When the installer finishes, DO NOT REBOOT! The newly installed Linux Mint OS does not have support for LVM installed yet. The below terminal commands still need to be run, so that this new Mint install will boot.

If you have been at it tooooo long, and do hit the Reboot button, then go though these instructions again, this time doing things as a reinstall of this OS.

Finish Installing Mint 13 Using LVM

$ sudo -i

Mount then change to the OS that was just installed onto the 3 drives.

# mount /dev/mapper/lm13-root /mnt
# mount /dev/mapper/lm13-home /mnt/home
# mount /dev/sda1 /mnt/boot
# mount --bind /dev /mnt/dev
# chroot /mnt
# mount -t sysfs none /sys
# mount -t proc none /proc
# mount -t devpts none /dev/pts

The just installed OS again has the medibuntu repository … just ignore the errors about packages.medibuntu.org

# apt-get update

Now install LVM support in the newly installed OS.
This command should update grub and the initram file - look at the output messages!
you should see something like: update-initramfs: Generating /boot/initrd.img-3.2.0-23-generic

# apt-get install lvm2
# blkid    # check the new (LVM) filesystem

Now unmount the installed OS and change back to the Live Boot.

# umount /dev/pts
# umount /proc
# umount /sys
# exit    # exits chroot
# umount /mnt/dev
# umount /mnt/home
# umount /mnt/boot
# umount /mnt
# sync    # write all changes to disk (just to be safe)

And finally the moment of truth … reboot the system