LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices



Reply
 
Search this Thread
Old 10-08-2005, 03:01 PM   #1
darkarcon2015
Member
 
Registered: Jun 2004
Location: Potsdam, NY
Distribution: Fedora Core 6
Posts: 201

Rep: Reputation: 30
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.
 
Old 10-08-2005, 03:21 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
As requested, moved to Slackware-Installation.
 
Old 10-12-2005, 07:02 PM   #3
gondoi
LQ Newbie
 
Registered: Jun 2004
Distribution: gentoo
Posts: 6

Rep: Reputation: 0
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?
 
Old 10-13-2005, 01:21 AM   #4
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
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.
 
Old 10-13-2005, 09:23 AM   #5
gondoi
LQ Newbie
 
Registered: Jun 2004
Distribution: gentoo
Posts: 6

Rep: Reputation: 0
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.
 
Old 10-13-2005, 07:57 PM   #6
gondoi
LQ Newbie
 
Registered: Jun 2004
Distribution: gentoo
Posts: 6

Rep: Reputation: 0
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.
 
Old 12-22-2005, 08:25 AM   #7
mco
LQ Newbie
 
Registered: Dec 2005
Location: Poland
Distribution: Slackware GNU/Linux
Posts: 2

Rep: Reputation: 0
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
 
Old 12-22-2005, 11:53 AM   #8
darkarcon2015
Member
 
Registered: Jun 2004
Location: Potsdam, NY
Distribution: Fedora Core 6
Posts: 201

Original Poster
Rep: Reputation: 30
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?
 
Old 12-23-2005, 04:11 AM   #9
mco
LQ Newbie
 
Registered: Dec 2005
Location: Poland
Distribution: Slackware GNU/Linux
Posts: 2

Rep: Reputation: 0
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.

Last edited by mco; 12-23-2005 at 04:17 AM.
 
Old 01-04-2006, 10:56 AM   #10
darkarcon2015
Member
 
Registered: Jun 2004
Location: Potsdam, NY
Distribution: Fedora Core 6
Posts: 201

Original Poster
Rep: Reputation: 30
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.
 
Old 02-07-2006, 05:19 PM   #11
d0odman
Member
 
Registered: Sep 2004
Location: CA, USA
Distribution: Slackware 10.2
Posts: 132

Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extend LVM partition rconan Linux - Software 5 08-31-2010 03:32 AM
installing Slackware 10.2 w/ Kernel 2.6 and LVM alphahawk Slackware 4 12-05-2005 02:49 PM
solution for partition for installing Slackware ICO Slackware 9 12-23-2003 05:53 PM
installing slackware on an ataraid with more than one partition supermatt Slackware 0 11-14-2003 10:58 PM
installing slackware onto a vm [no target partition] blackphire05 Slackware 10 10-02-2003 09:42 AM


All times are GMT -5. The time now is 12:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration