LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   mkinitrd question (https://www.linuxquestions.org/questions/slackware-14/mkinitrd-question-569161/)

granth 07-13-2007 04:46 PM

mkinitrd question
 
I'm trying to get Slackware 12 running on my HP server.

It is an older P3 model DL 380 with a Smart Array 5i controller. I have 6 disks total, containing two RAID 5 arrays.

# cat /etc/fstab

/dev/cciss/c0d0p3 swap swap defaults 0 0
/dev/cciss/c0d0p2 / reiserfs defaults 1 1
/dev/cciss/c0d0p1 /boot ext3 defaults 1 2
/dev/cciss/c0d1p1 /home reiserfs defaults 1 2
/dev/cciss/c0d1p2 /var reiserfs 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


Everything is installed, and I am trying to use generic kernel instead of huge.

I ran the following mkinitrd command:

# mkinitrd -c -k 2.6.21.5-smp -m reiserfs:ext3:cciss -f reiserfs -r /dev/cciss/c0d0p2

I reboot and get a kernel panic stating the root partition failed to mount and that /sbin/init could not be found on rootdev. What gives? Am I forgetting to include a scsi module? Is module raid_class required? PCI chipset for motherboard?

# lspci

00:00.0 Host bridge: Broadcom CNB20HE Host Bridge (rev 23)
00:00.1 Host bridge: Broadcom CNB20HE Host Bridge (rev 01)
00:00.2 Host bridge: Broadcom CNB20HE Host Bridge (rev 01)
00:00.3 Host bridge: Broadcom CNB20HE Host Bridge (rev 01)
00:01.0 RAID bus controller: Compaq Computer Corporation Smart Array 5i/532 (rev 01)
00:02.0 Ethernet controller: Intel Corporation 82557/8/9 Ethernet Pro 100 (rev 08)
00:04.0 Ethernet controller: Intel Corporation 82557/8/9 Ethernet Pro 100 (rev 08)
00:05.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27)
00:06.0 System peripheral: Compaq Computer Corporation Advanced System Management Controller
00:0f.0 ISA bridge: Broadcom OSB4 South Bridge (rev 51)
00:0f.1 IDE interface: Broadcom OSB4 IDE Controller
00:0f.2 USB Controller: Broadcom OSB4/CSB5 OHCI USB Controller (rev 04)
07:04.0 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)
07:04.3 USB Controller: ALi Corporation USB 2.0 Controller (rev 01)
07:07.0 PCI Hot-plug controller: Compaq Computer Corporation PCI Hotplug Controller (rev 12)

erklaerbaer 07-13-2007 04:56 PM

hmm..

first things first. did you install the initrd ( mkinitrd again,modifying lilo.conf and rerunnung lilo).

mkinitrd is supposed to insert the dependencies of a module as well (like modprobe). so if cciss needs a scsi module it would have been included..
what modules are loaded, when you boot with the -huge kernel?

granth 07-13-2007 06:22 PM

Quote:

did you install the initrd ( mkinitrd again,modifying lilo.conf and rerunnung lilo
Yes I ran
Code:

mkinitrd
first, then
Code:

/sbin/lilo
.

Code:

# Linux bootable partition config begins
image = /boot/vmlinuz
initrd = /boot/initrd.gz
root = /dev/cciss/c0d0p2
label = Linux
read-only
# Linux bootable partition config ends
# Failsafe config begins
image = /boot/vmlinuz-huge-smp-2.6.21.5-smp
root = /dev/cciss/c0d0p2
label = Failsafe
read-only
# Failsafe config ends

Quote:

mkinitrd is supposed to insert the dependencies of a module as well (like modprobe). so if cciss needs a scsi module it would have been included..
It appears that all the proper modules are installed to /boot/initrd-tree.

Code:

cat /boot/initrd-tree/load_kernel_modules
# This is a script used to load the kernel modules.
# To use it, chmod it 755, and then add the insmod
# lines needed to load your modules, like this:

insmod -v /lib/modules/$(uname -r)/kernel/drivers/block/cciss.ko
insmod -v /lib/modules/$(uname -r)/kernel/fs/mbcache.ko
insmod -v /lib/modules/$(uname -r)/kernel/fs/jbd/jbd.ko
insmod -v /lib/modules/$(uname -r)/kernel/fs/ext3/ext3.ko
insmod -v /lib/modules/$(uname -r)/kernel/fs/reiserfs/reiserfs.ko

I don't think I really need the ext3 modules, but I included them since my /boot partition is ext3.

Code:

# lsmod

Module                  Size  Used by
ipv6                  254496  18
capability              7304  0
commoncap              9344  1 capability
lp                    13736  0
parport_pc            27812  0
parport                34760  2 lp,parport_pc
pcspkr                  6528  0
psmouse                39048  0
serio_raw              9220  0
eepro100              30608  0
mii                    8576  1 eepro100
cpqphp                63888  0
i2c_piix4              11276  0
pata_serverworks      11656  0
ata_generic            9220  0
sworks_agp            11424  0
agpgart                31432  1 sworks_agp
evdev                  11904  1


rworkman 07-14-2007 01:19 AM

I had a similar issue on a DL360 right about the time 12.0 released, and I've not had time to get all the kinks worked out of it. Try this patch to mkinitrd (credit goes to Eric Hameleers, not me, for this one) - it solves at least one of the problems that you're having (but probably didn't notice yet) :-)
Code:

--- mkinitrd.orig      2007-07-14 01:15:21.415210095 -0500
+++ mkinitrd    2007-07-14 01:16:22.918345919 -0500
@@ -83,7 +83,7 @@
  SLOPPY_DEV_LIST=$(cat /proc/partitions)
  for device in $SLOPPY_DEV_LIST ; do
    if [ ! -r $SOURCE_TREE/dev/$device -a -b /dev/$device ]; then
-      cp -a /dev/$device $SOURCE_TREE/dev
+      cp -a --parents /dev/$device $SOURCE_TREE
    fi
  done
  # Make sure a kernel module directory exists:
@@ -101,7 +101,7 @@
  SLOPPY_DEV_LIST=$(cat /proc/partitions)
  for device in $SLOPPY_DEV_LIST ; do
    if [ ! -r $SOURCE_TREE/dev/$device -a -b /dev/$device ]; then
-      cp -a /dev/$device $SOURCE_TREE/dev
+      cp -a --parents /dev/$device $SOURCE_TREE
    fi
  done
  # Wrap the initrd as an initramfs image and move it into place:


granth 07-16-2007 08:57 AM

All I get from the kernel panic is the following:

Code:

mount: mounting /dev/cciss/c0d0p2 on /mnt failed.
ERROR: No /sbin/init found on rootdev.

Is there a command I can pass to specify more verbose kernel messages?

Rob, thanks for the patch. I'll give it a shot this morning.

granth 07-16-2007 10:02 AM

Big thanks for the patch. Everything worked this time.


All I had to do was:

Code:

# cp /sbin/mkinitrd /root/mkinitrd.old

# patch /sbin/mkinitrd < ./mkinitrd.patch

# mkinitrd -c -f reiserfs -k 2.6.21.5-smp -m cciss:reiserfs -r /dev/cciss/c0d0p2

# /sbin/lilo -v

# reboot


Rob, has this fix been submitted to Pat V.?

rworkman 07-16-2007 11:04 AM

Quote:

Originally Posted by granth
Big thanks for the patch. Everything worked this time.


All I had to do was:

Code:

# cp /sbin/mkinitrd /root/mkinitrd.old

# patch /sbin/mkinitrd < ./mkinitrd.patch

# mkinitrd -c -f reiserfs -k 2.6.21.5-smp -m cciss:reiserfs -r /dev/cciss/c0d0p2

# /sbin/lilo -v

# reboot


Rob, has this fix been submitted to Pat V.?

Well, sorta... As I said earlier, I ran into this issue on a DL360 right about the time 12.0 was getting close to release. Eric and I figured out what was going wrong in the initrd creation, and the patch followed. However, I didn't (and still don't) have time to really do any testing with it, and since nobody else had notified Pat of any problems with mkinitrd, there was no justification to throw untested code into the release.

Anyway, good to hear that this worked for you. I'll make Pat aware of it, but I can't even speculate on whether he'll patch it post-release.

granth 07-22-2007 11:35 PM

Now I'm having the same issue on a different machine. mkinitrd 1.1.3 didn't work as expected.

Code:

mkinitrd -c -f reiserfs -k 2.6.22.1 -m reiserfs -r /dev/sda3

The machine is a AMD X2, NV NF4 mobo, and a WD SATA.

/boot = ext3
/ = reiserfs

rworkman 07-23-2007 12:30 AM

Quote:

Originally Posted by granth
Now I'm having the same issue on a different machine. mkinitrd 1.1.3 didn't work as expected.

Code:

mkinitrd -c -f reiserfs -k 2.6.22.1 -m reiserfs -r /dev/sda3

The machine is a AMD X2, NV NF4 mobo, and a WD SATA.

/boot = ext3
/ = reiserfs


If you've got a custom kernel (2.6.22.x), then why even bother with an initrd? Since you're having to compile the kernel anyway, go ahead and put reiserfs support in it.

granth 07-23-2007 10:38 AM

I guess you're right. KISS, right?

(SATA drivers also help)


I'm not complaining, but they did a sloppy job with mkinitrd 1.1.3 as they only applied a quarter of the patch above, and they didn't even change the version numbers in the script.

So mkinitrd 1.1.3 doesn't fix the problem, but the patch above does.

I'm sending an email to info@slackware.com.

:study:


All times are GMT -5. The time now is 04:01 PM.