Find the answer to your Linux question:
Results 1 to 5 of 5
I'm trying to install Slackware 10.2 on an LVM partition but am a bit stuck. I know that Slackware has LVM support, as when I boot the install CD, the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2005
    Location
    127.0.0.1
    Posts
    1

    Installing Slackware 10.2 on an LVM Partition


    I'm trying to install Slackware 10.2 on an LVM partition but am a bit stuck. I know that Slackware has LVM support, as when I boot the install CD, the LVM line scolls by. Can ayone give a walkthrough or link me to one that can help? Thanks for any help.

    Note: I can't use Partition Magic because Windows isn't on the computer.

  2. #2
    Just Joined!
    Join Date
    Mar 2006
    Posts
    11
    Here's a quick HOW-TO:

    -boot test26.s ( I like 2.6 series)

    -use fdisk to create partitions, make atleast one lvm partition (type 8e)

    -create and mount a temporary ram-disk and move some stuff in there
    Code:
    mkdir /ram
    mount -t tmpfs none /ram
    mv /sbin /ram
    mv /bin /ram
    mv /lib/modules /ram
    /ram/bin/ln -s /ram/sbin /
    /ram/bin/ln -s /ram/bin /
    /ram/bin/ln -s /ram/modules /lib
    -Install device-mapper, lvm2, kernel-modules-2.6 and modules-tools packages.

    -Create the necessary files so you can load the correct modules
    Code:
    echo "/lib/modules/2.6.13/kernel/drivers/md/dm-mod.ko" > /lib/modules/2.6.13/modules.dep
    - Load the dm-mod module
    Code:
    insmod /lib/modules/2.6.13/kernel/drivers/md/dm-mod.ko
    - Start setup and follow it until you've mounted the root file system and then switch to another console.

    - Create the LVM thingys

    Code:
    vgscan
    pvcreate /dev/sda3
    vgcreate /dev/sda3 vg
    lvcreate -L1G -nusr vg
    lvcreate -L1G -nhome vg
    mkreiserfs /dev/vg/usr
    mkreiserfs /dev/vg/home
    - Mount the lvm-partitions

    Code:
    cd /mnt
    mkdir home usr
    mount /dev/vg/usr usr
    mount /dev/vg/home home
    - Continue installation until the end

    After installation don't reboot.

    - Chroot to new slack installation
    Code:
    chroot /mnt
    source /etc/profile
    - Mount the cdrom and install device-mapper, lvm2 and kernel-modules-2.6 again.

    - Run 'vgscan'

    -Configure fstab for the lvm-partitions

    - Install / Configure Grub / LILO if necessary

    Note that if you use lvm on your root partition you need to have initrd which will enable lvm during boot.


    Hope this helps

  3. #3
    Just Joined!
    Join Date
    Mar 2006
    Posts
    11
    Heh, just noticed the year of the original posting
    Well, better late than never...

  4. #4
    Just Joined!
    Join Date
    Oct 2006
    Posts
    1

    initrd lvm help

    zmyrgel

    Hey, I was looking around for slackware on lvm how to, found your reply. I figured out that far myself, up installation, etc. Can you tell me how to build the initrd with lvm support. I am booting of an IDE.

    Thanks.

  5. #5
    Just Joined!
    Join Date
    Mar 2006
    Posts
    11
    Quote Originally Posted by cathal
    zmyrgel

    Hey, I was looking around for slackware on lvm how to, found your reply. I figured out that far myself, up installation, etc. Can you tell me how to build the initrd with lvm support. I am booting of an IDE.

    Thanks.
    I usually leave the root device outside of LVM so the system will boot nicely. I recall the lvm-package had a lvm-makeinitrd script which could be usefull.

    Basic need in the initrd is to have the 'lvm' program (cp 'which lvm' /boot/initrd-tree/sbin) in there with it's depencecies (ldd /sbin/lvm) and then copy those to /boot/initrd-tree/lib. Then modify the linuxrc / init file.

    Add the lines to:
    lvm vgscan --ignorelockingfailure --mknodes
    lvm vgchange -a y --ignorelockingfailure
    mount the root device then

    As I said I haven't used lvm on root device with Slack. Debian and Arch have nice utilities which make the process easy (yaird, mkinitcpio).
    Google a bit for the init file. Here's one made for Debian
    lvm2create_initrd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •