LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (http://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Installing Slackware 10.2 on an LVM Partition (http://www.linuxquestions.org/questions/slackware-installation-40/installing-slackware-10-2-on-an-lvm-partition-370995/)

darkarcon2015 10-08-2005 02:01 PM

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.

XavierP 10-08-2005 02:21 PM

As requested, moved to Slackware-Installation.

gondoi 10-12-2005 06:02 PM

Hi, I want to do this too, and I am very close. I found this page that will help you, but my issue is I'm trying to use the 2.6 kernel. On boot it says "requires modules from /testing" but I can't find those modules. vgscan complains that the module isn't loaded. Anyone know how to load the 2.6 kernel modules from the install cds during install?

gbonvehi 10-13-2005 12:21 AM

You could umount the first CD, mount the one with testing/, install the modules (maybe installpkg works at that time, if not, just untar the file, maybe you've to run depmod), umount that cd, remount the first one and continue with install :)
If you want to install the modules to the LVM disk, do the same, if you're using installpkg, use -root option.

gondoi 10-13-2005 08:23 AM

Man, I am blind. I looked there, but I overlooked the kernel-modules package. I saw the lvm2 package and tried it, but no go... I'll try the kernel-modules today sometime.

Thanks for the help.

gondoi 10-13-2005 06:57 PM

ok, i don't get it...

I found the modules, I got them loaded, I found my LVM Structure.. but when I try to load the dm-mod module I get this error:

Code:

qm_modules: function not implemented
It looks like the 2.6 kernel doesn't have module support compiled in, which doesn't make sense cause the config claims that it does...

Code:

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y

Anyone have an idea? Without this, I can't mount my LVM partitions.. and without that... well i think you know.

mco 12-22-2005 07:25 AM

Hi.

I am installing Slackware 10.2 on LVM2 partitions right now. It's quite problematic, but possible.

You have to boot from test26.s kernel.

create your partitions with cfdisk (fdisk)

Install (from net, other cdrom or something) lvm2 and device-mapper package.

Copy dm-mod.ko from second cdrom from linux-2.6.13/kernel-modules package to /lib/modules/2.6.13/kernel/drivers/md/

Touch /lib/modules/2.6.13/modules.dep file and insert there one line:
/lib/modules/2.6.13/kernel/drivers/md/dm-mod.ko

make new ramdisk, copy /bin and /sbin there and make symlinks to them in /

then:
install a/modules-tools package from first cd
insmod /lib/modules/2.6.13/kernel/drivers/md/dm-mod.ko

start setup

create and mount your root partition with setup menus and then move to other console.

create directories under /mnt for your lvm2 volumes

do usual lvm2 stuff (create volme groups, logical volumes, filesystems and mount them)

go back to setup console and do the rest of install (in my installation setup has exited so i started it again from point where i have finished (source).

after install don't forget to chroot in your new system and install lvm2, device-mapper package, and kernel with lvm2 support (remember about dm-mod module) (i have installed test26.s kernel from setup cdrom and kernel-modules package from second cd, from linux-2.6.13 directory).

Edit /mnt/fstab to fit your new partition sheme.

Reconfigure and run lilo or install and configure grub...

And that's it.
Reboot.

You should now have a fully functional Slackware on LVM2 installation.

Good Luck ;)

darkarcon2015 12-22-2005 10:53 AM

Quote:

Originally Posted by mco
Hi.

I am installing Slackware 10.2 on LVM2 partitions right now. It's quite problematic, but possible.

You have to boot from test26.s kernel.

create your partitions with cfdisk (fdisk)

Install (from net, other cdrom or something) lvm2 and device-mapper package.

Copy dm-mod.ko from second cdrom from linux-2.6.13/kernel-modules package to /lib/modules/2.6.13/kernel/drivers/md/

Touch /lib/modules/2.6.13/modules.dep file and insert there one line:
/lib/modules/2.6.13/kernel/drivers/md/dm-mod.ko

make new ramdisk, copy /bin and /sbin there and make symlinks to them in /

then:
install a/modules-tools package from first cd
insmod /lib/modules/2.6.13/kernel/drivers/md/dm-mod.ko

start setup

create and mount your root partition with setup menus and then move to other console.

create directories under /mnt for your lvm2 volumes

do usual lvm2 stuff (create volme groups, logical volumes, filesystems and mount them)

go back to setup console and do the rest of install (in my installation setup has exited so i started it again from point where i have finished (source).

after install don't forget to chroot in your new system and install lvm2, device-mapper package, and kernel with lvm2 support (remember about dm-mod module) (i have installed test26.s kernel from setup cdrom and kernel-modules package from second cd, from linux-2.6.13 directory).

Edit /mnt/fstab to fit your new partition sheme.

Reconfigure and run lilo or install and configure grub...

And that's it.
Reboot.

You should now have a fully functional Slackware on LVM2 installation.

Good Luck ;)

Yeah, I have gotten that far, it's the configuring of GRUB hat i a pain in the butt. Since Slackware doesn't use an initrd script to boot, it is hard to get LVM2 started before the kernel loads. Did you figure this out, becauses that is where I stopped?

mco 12-23-2005 03:11 AM

You can use initrd in Slackware. From /boot/README.initrd:

Slackware initrd mini HOWTO
by Patrick Volkerding, volkerdi@slackware.com
Sat Sep 3 22:20:13 PDT 2005

This document describes how to create and install an initrd, which may be
required to use the 2.6 kernel. Also see "man mkinitrd".

1. What is an initrd?
2. Why to I need an initrd?
3. How do I build the initrd?
4. Now that I've built an initrd, how do I use it?


1. What is an initrd?

Initrd stands for "initial ramdisk". An initial ramdisk is a very small
Linux filesystem that is loaded into RAM and mounted as the kernel boots,
and before the main root filesystem is mounted.

2. Why do I need an initrd?

The usual reason to use an initrd is because you need to load kernel
modules before mounting the root partition. Usually these modules are
required to support the filesystem used by the root partition (ext3,
reiserfs, xfs), or perhaps the controller that the hard drive is attached
to (SCSI, RAID, etc). Essentially, there are so many different options
available in modern Linux kernels that it isn't practical to try to ship
many different kernels to try to cover everyone's needs. It's a lot more
flexible to ship a generic kernel and a set of kernel modules for it. The
generic 2.6 kernel in Slackware supports the ext2 filesystem (which is
used by the initrd), and also supports most IDE controllers (much like the
old bare.i kernel). So, if you have an IDE based system that uses the
ext2 filesystem, then you will not need to use an initrd to boot.
Otherwise, read on.

3. How do I build the initrd?

The easiest way to make the initrd is to use the mkinitrd script included
in Slackware's mkinitrd package. We'll walk through the process of
upgrading to the 2.6.13 Linux kernel using the packages found in
Slackware's testing/packages/linux-2.6.13/ directory.

First, make sure the kernel, kernel modules, and mkinitrd package are
installed (the current version numbers might be a little different, so
this is just an example):

installpkg kernel-generic-2.6.13-i486-1.tgz
installpkg kernel-modules-2.6.13-i486-1.tgz
installpkg mkinitrd-1.0.1-i486-1.tgz

Change into the /boot directory:

cd /boot

Now you'll want to run "mkinitrd". I'm using reiserfs for my root
filesystem, and since it's an IDE system the reiserfs module will be
the only one I need to load:

mkinitrd -c -k 2.6.13 -m reiserfs

This should do two things. First, it will create a directory
/boot/initrd-tree containing the initrd's filesystem. Then it will
create an initrd (/boot/initrd.gz) from this tree. If you wanted to,
you could make some additional changes in /boot/initrd-tree/ and
then run mkinitrd again without options to rebuild the image. That's
optional, though, and only advanced users will need to think about that.

Here's another example: Build an initrd image using Linux 2.6.13
kernel modules for a system with an ext3 root partition on /dev/hdb3.
Note that you need both the jbd and ext3 modules to use ext3:

mkinitrd -c -k 2.6.13 -m jbd:ext3 -f ext3 -r /dev/hdb3


4. Now that I've built an initrd, how do I use it?

Now that you've got an initrd (/boot/initrd.gz), you'll want to load
it along with the kernel at boot time. If you use LILO for your boot
loader you'll need to edit /etc/lilo.conf and add a line to load the
initrd. Here's an example section of lilo.conf showing how this is
done:

# Linux bootable partition config begins
image = /boot/vmlinuz-generic-2.6.13
initrd = /boot/initrd.gz
root = /dev/hda6
label = Lnx2613
read-only
# Linux bootable partition config ends

The initrd is loaded by the "initrd = /boot/initrd.gz" line.
Just add the line right below the line for the kernel image you use.
Save the file, and then run LILO again ('lilo' at the command line).
You'll need to run lilo every time you edit lilo.conf or rebuild the
initrd.

Other bootloaders such as syslinux also support the use of an initrd.
See the documentation for those programs for details on using an
initrd with them.


---------

Have fun!


And You really should NOT put /, /boot, /etc, /lib, /mnt, /proc, /sbin, /dev, and /root on LVM. Because, when something goes wrong, you slill can log into system and try to fix it. I usualy make 1G / partition with all this directories.

My Slackware part from Grub looks like this:

title Slackware GNU/Linux 1024x768
root (hd0,0)
kernel (hd0,0)/vmlinuz vga=0x317 root=/dev/hda3 ro

(i have /boot partition on /dev/hda1, and / at /dev/hda3)

Hope it helps.

darkarcon2015 01-04-2006 09:56 AM

II have done that before as well. I ran into a problem with the initrd; I wasn't sure how to get LVM to start in the initrd. Without the LVM binaries running, it's useless.

Also, I have a seperate boot partition that is not LVM formatted. But, everything else in on the LVM partition.

d0odman 02-07-2006 04:19 PM

You'll only have problems in Slackware if your root partition is in an LVM volume group. You'll have to move the section in the rc.S file in the /etc/rc.d directory that references LVM to before it does the filesystem check. This may help you to mount your volume groups automatically as listed in fstab.

This is also necessary to do if you (unwisely) decide to put your root partition in a volume group. BTDT. It works, but not without some tinkering with the initrd tree made by the mkinitrd script.


All times are GMT -5. The time now is 06:42 AM.