1

Trying to install Slackware 13.1 on a Dell 2950. I have a Perc5 RAID card and my kernel sees it as /dev/sda for the raw device.

I've created 3 partitions:

/dev/sda1 -- /boot partition type=82
/dev/sda2 -- swap partition  type=83
/dev/sda3 -- my LVM partition type=82

Here are the steps I've been using:

1.  pvcreate /dev/sda3 (is this necessary since the partition already exists from fdisk?)
2.  vgcreate vg00 /dev/sda3
3.  lvcreate -L 20G -n root vg00
4.  vgscan --mknodes
5.  vgchange -ay

I then install Slackware 13.1 as usual, picking /dev/vg00/root for root (/) and /dev/sda1 for (/boot) and /dev/sda2 for the swap.... All goes well.

After the install I then run these commands to make my initrd image.

chroot /mnt

mkinitrd -c -k 2.6.33.4 \
-m jfs:uhci_hcd:ehci_hcd:usbhid:hid:megaraid_sas:bnx2 \
-f jfs \
-r /dev/vg00/root \ (also tried /dev/mapper/vg00-root)
-L

This command runs without any errors and I do get an initrd.gz and initrd-tree in /boot

The relevant parts of my /etc/lilo.conf looks as follows:

boot=/dev/sda

image = /boot/vmlinuz-generic-2.6.33.4
  initrd = /boot/vg00/root
  label = linux
  read-only

When I reboot the computer, I get the LILO boot manager. Kernel loads but it appears that the LVMs never come up. I get an error that there is no /root partition and that device /dev/vg00/root could not be found.

I've been using Linux for many years but I've never dealt with mkinitrd so I'm a bit unfamiliar with process and how the drivers are extracted. I do see the lvm binaries in the /boot/initrd-tree/sbin directory. (dmsetup, lvm, vgchange, vgscan; the latter two are sym linked to lvm)

I also tried to unzip and mount the initrd to have a look-see but could not figure that out either using mount -o loop -t ramfs /dev/boot/initrd /tmp

any help or suggestions greatly appreciated.

Kilo
  • 1,564
  • 13
  • 21

3 Answers3

1

RESOLVED...

The problem had to do with PROC... When I was running mkinitrd, I did not have a valid representation of my /proc/partitions after doing a chroot mnt. Here are the steps I used to finally get it working...

Boot with the Slackware DVD (using 13.1 64bit kernel)

1.  vgscan --mknodes
2.  vgchange -ay

(note, since I booted with a rescue disk and already did the install per my original post, no need to reinstall).

The above two commands make my logical volumes active and them to show up in /proc/partitions.

3.  mount /dev/vg00/root /mnt
4.  mount /dev/sda1 /boot
5.  mount -t proc proc /mnt/proc (this was the magic step)
6.  chroot mnt (note, don't chroot /mnt just mnt)

re-ran same mkinitrd script as shown in my original post. This time I got a warring about /dev/vg00/root renamed to /dev/dm-0

Ran lilo, same config as my original post.

Reboot and viola it worked.

One word of caution is that my ethernet driver (bnx2) needs external firmware which I didn't include in my initrd and that caused a long boot process to happen as the bnx driver was timing out looking for this firmware....

Hope this helps someone else..

Kilo
  • 1,564
  • 13
  • 21
1

by the way.. to look at an initrd.img file created by mkinitrd, here are the steps.

mkdir myrd
cd myrd
cp /mnt/boot/initrd.gz .
gunzip initrd.gz
cpio -i -d < initrd

These steps I found on IBM site. http://www.ibm.com/developerworks/linux/library/l-initrd.html

Kilo
  • 1,564
  • 13
  • 21
0

Partition values are wrong:

/dev/sda1 -- /boot partition type=82<BR>
/dev/sda2 -- swap partition  type=83<BR>
/dev/sda3 -- my LVM partition type=82<BR>

Should be:

/dev/sda1 -- /boot partition type=83<BR>
/dev/sda2 -- swap partition  type=82<BR>
/dev/sda3 -- my LVM partition type=8e<BR>


82 = Linux swap<BR>
83 = Linux Partition<BR>
8e = LVM partition<BR>

http://www.win.tue.nl/~aeb/partitions/partition_types-1.html

Itai Ganot
  • 10,644
  • 29
  • 93
  • 146