LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (http://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Installing Slackware entirely on LVM (http://www.linuxquestions.org/questions/slackware-installation-40/installing-slackware-entirely-on-lvm-926314/)

astanton 01-29-2012 08:55 AM

Installing Slackware entirely on LVM
 
I followed Eric's guide on the Slackware DVD, with deviations for my particular machine.

I'm concerned that the machine is booting very slowly. I thought that it should boot much faster w/an initrd, so before I start building things on this box I want to make sure I don't need to start all over again.

Below are the steps I followed for my particular installation:

1.) Boot Slackware DVD and login as root.

2.) Run fdisk

Code:

# fdisk /dev/sda
I created one big primary partition of 200 GBytes

'a' to toggle the bootable flag on partition 1 (did I need to do this? I assume so, although there was no mention of this in Eric's guide).

't' to change the partition type on partition 1 to that of '8e' (Linux LVM).

2.) Create the volumes

Code:


# pvcreate /dev/sda1

# vgcreate myvg /dev/sda1

# lvcreate -L 1G -n boot myvg

# lvcreate -L 4G -n swap myvg

# lvcreate -L 40G -n root myvg

# lvcreate -l 100%FREE -n home myvg

# mkswap /dev/myvg/swap

# setup

Here's the mount points and filesystem choices I used:
Code:

        /dev/myvg/root        /        xfs
        /dev/myvg/boot        /boot        ext3
        /dev/myvg/swap        swap        swap
        /dev/myvg/home        /home        xfs

I installed lilo on the MBR (I never understood why I would want to install the MBR to root anyway, maybe someone could explain how/when/why one would?).

After exiting setup, I did the following:

Code:


# chroot /mnt

# /usr/share/mkinitrd/mkinitrd_command_generator.sh

# mkinitrd -c -k 2.6.38.7 -f xfs -r /dev/myvg/root -m mptbase:mptscsih:mptspi:exportfs:xfs:ext3 -L -u -o /boot/initrd.gz

The only difference between what the script generated and what I used was the addition of the "ext3 module, which I figured I would need since /boot is on an Extended 3 filesystem.

Was I correct in thinking that? Might there have been a better way to construct the mkinitrd invocation?



I changed /etc/lilo.conf from:

Code:


image = /boot/vmlinuz
        root = /dev/myvg/root
        label = Linux
        read-only

To:

Code:


image = /boot/vmlinuz-generic-2.6.38.7
        initrd = /boot/initrd.gz
        root = /dev/myvg/root
        label = Linux
        read-only

And finally:

Code:


# lilo
# exit
# reboot

The system seems fine once it is running, but it takes a couple of minutes before it starts to boot after hitting enter at the boot prompt.

When using the 'huge' kernels, booting was really fast in the past with only a few 'dots' after "Linux....." before taking off into hyperspace.

I waited for a long time and then the system came up. I thought that initial key generation and such initial boot stuff was the reason but when I rebooted again... it took forever to boot again.

Yes, it is -current, but I don't think that shouldn't make a difference.

In case it helps, there's a paste up of my dmesg here, and my fstab is below:

/etc/fstab:

Code:


/dev/myvg/swap swap            swap        defaults        0  0
/dev/myvg/root /                xfs        defaults        1  1
/dev/myvg/boot /boot            ext3        defaults        1  2
/dev/myvg/home /home            xfs        defaults        1  2
#/dev/cdrom      /mnt/cdrom      auto        noauto,owner,ro  0  0
/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0
tmpfs            /dev/shm        tmpfs      defaults        0  0


sinuhe 01-29-2012 09:14 AM

Slow boot
 
You don't need /boot. However, what you described is fine.

I've also noticed slow boot times, even with -generic.

linus72 01-29-2012 09:26 AM

these may help

http://www.puresimplicity.net/~delah.../speeding.html

http://www.fprimex.com/linux/slackwa...booting-faster

http://n00bsys0p.wordpress.com/2009/...t-time-part-1/

astanton 01-29-2012 11:56 AM

Quote:

Originally Posted by sinuhe (Post 4587406)
You don't need /boot. However, what you described is fine.

I've also noticed slow boot times, even with -generic.

Hey thanks for the response!

I think I do need /boot. Perhaps not with LVM, but under regular circumstances because / is xfs. I'll try launching another machine and try it without a separate partition for /boot though.

Not that this machine is going to need to boot more than once or twice every year or two, but it boots so dang slow I can't help but think that there's something askew that will come back and bite me later.

STDOUBT 01-29-2012 02:15 PM

The info linus72 linked you to contained the info I think you need:

"As for LILO itself, you can specify "compact" at the top of your lilo.conf to tell LILO to enhance boot time..."

Let us know if adding "compact" to lilo.conf, running lilo, then rebooting solves the problem. It worked for me on some silly machine I can't remember now.


All times are GMT -5. The time now is 10:54 AM.