LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Generic kernel + initrd not working (http://www.linuxquestions.org/questions/slackware-14/generic-kernel-initrd-not-working-800757/)

rpedrica 04-08-2010 05:47 AM

Generic kernel + initrd not working
 
I've changed for huge kernel to a generic+initrd setup per the instructions in the README.initrd file however my machine fails to boot using that method. I get the following errors:

Quote:

/boot/initrd.gz: Loading kernel modules from initrd image:
mount: mouting /dev/sda2 on /mnt failed: No such device
ERROR: No /sbin/init found on rootdev ( or not mounted )
1. I've created the initrd using the results from /usr/share/mkinitrd/mkinitrd_command_generator.sh
Quote:

mkinitrd -c -k 2.6.33.1 -f ext4 -r /dev/sda2 -m usbhid:ehci-hcd:ext4 -o /boot/initrd.gz
2. my root fs is ext4 on /dev/sda2
3. I've changed all necessary links in /boot
4. I've changed my /etc/lilo to:
Quote:

image = /boot/vmlinuz
initrd = /boot/initrd.gz
root = /dev/sda2
label = Linux-Generic
read-only
Not sure where I'm going wrong - any help appreciated.

Note: slack64 -current as of today

Regards, Robby

Didier Spaier 04-08-2010 05:53 AM

Are you sure that /boot/vmliuz be a symlink to your generic kernel ?

[EDIT] Sorry I didn't see that you checked that already.

gegechris99 04-08-2010 06:13 AM

Just to make sure: did you run lilo after editing /etc/lilo.conf?

Also, maybe you can post the content of /boot:

Code:

ls -l /boot

rpedrica 04-08-2010 08:01 AM

Yes I ran lilo ( sorry I forgot to mention that step ):

Quote:

ls -al /boot
total 14276
drwxr-xr-x 3 root root 4096 2010-04-08 12:17 ./
drwxr-xr-x 26 root root 4096 2010-04-08 12:09 ../
lrwxrwxrwx 1 root root 37 2010-03-03 16:58 README.initrd -> /usr/doc/mkinitrd-1.4.3/README.initrd
lrwxrwxrwx 1 root root 27 2010-04-07 17:20 System.map -> System.map-generic-2.6.33.1
-rw-r--r-- 1 root root 1512795 2010-03-26 06:55 System.map-generic-2.6.33.1
-rw-r--r-- 1 root root 2409492 2010-03-26 09:09 System.map-huge-2.6.33.1
-rw-r--r-- 1 root root 512 2009-09-13 12:08 boot.0800
-rw-r--r-- 1 root root 168 2009-09-13 12:08 boot_message.txt
lrwxrwxrwx 1 root root 23 2010-04-07 17:20 config -> config-generic-2.6.33.1
-rw-r--r-- 1 root root 101632 2010-03-26 06:55 config-generic-2.6.33.1
-rw-r--r-- 1 root root 101606 2010-03-26 09:09 config-huge-2.6.33.1
-rw-r--r-- 1 root root 5040 2010-02-15 04:09 diag1.img
-rw-r--r-- 1 root root 17932 2010-02-15 04:09 diag2.img
drwxr-xr-x 12 root root 4096 2010-04-08 12:17 initrd-tree/
-rw-r--r-- 1 root root 2776595 2010-04-08 12:17 initrd.gz
-rw------- 1 root root 135680 2010-04-08 12:17 map
-rw-r--r-- 1 root root 17318 2008-12-09 02:56 slack.bmp
lrwxrwxrwx 1 root root 24 2010-04-07 17:21 vmlinuz -> vmlinuz-generic-2.6.33.1
-rw-r--r-- 1 root root 2513424 2010-03-26 06:55 vmlinuz-generic-2.6.33.1
-rw-r--r-- 1 root root 4981744 2010-04-01 18:56 vmlinuz-huge-2.6.33.1
Regards, Robby

Didier Spaier 04-08-2010 09:05 AM

I don't see anything wrong.

What I would do is re-compile the -generic kernel with ext4 built-in anyhow.

So you won't need an initrd.

ChrisAbela 04-08-2010 09:11 AM

I don't run current so I cannot be sure.

Try

# depmod 2.6.33.1
or according to what you have in /lib/modules/

before running initrd.

Chris

rpedrica 04-08-2010 09:37 AM

As a once off solution, I can rebuild the kernel however I'd like to not do that otherwise it means I have to do it each time a new kernel is released. I'll try the depmod option ...

Richard Cranium 04-08-2010 09:53 AM

Quote:

Originally Posted by rpedrica (Post 3928395)

Quote:

/boot/initrd.gz: Loading kernel modules from initrd image:
mount: mouting /dev/sda2 on /mnt failed: No such device
ERROR: No /sbin/init found on rootdev ( or not mounted )

It's telling you that your initrd image does not have /dev/sda2 in it.

What does
Code:

ls -l /boot/initrd-tree/dev/
give you? (I am assuming that you left initrd-tree alone after building initrd.gz.)

ChrisAbela 04-08-2010 10:01 AM

What does /usr/share/mkinitrd/mkinitrd*.sh tell you?

allend 04-08-2010 10:19 AM

Quote:

mkinitrd -c -k 2.6.33.1 -f ext4 -r /dev/sda2 -m usbhid:ehci-hcd:ext4 -o /boot/initrd.gz
I think you are missing some modules. Try this:
Quote:

mkinitrd -c -k 2.6.33.1 -f ext4 -r /dev/sda2 -m usbhid:ehci-hcd:uhci-hcd:crc16:jbd2:mbcache:ext4 -o /boot/initrd.gz

rpedrica 04-08-2010 11:14 AM

ls -l /boot/initrd-tree/dev/
total 0
crw-r--r-- 1 root root 5, 1 1998-01-01 03:48 console
crw-r--r-- 1 root root 1, 3 1998-01-01 03:48 null
brw-r--r-- 1 root root 1, 1 1998-01-01 03:48 ram
brw-rw---- 1 root disk 8, 0 2010-04-08 16:37 sda
brw-rw---- 1 root disk 8, 1 2010-04-08 14:20 sda1
brw-rw---- 1 root disk 8, 2 2010-04-08 12:20 sda2
brw-rw---- 1 root disk 8, 3 2010-04-08 12:20 sda3
brw-rw---- 1 root disk 8, 16 2010-04-08 14:20 sdb
brw-rw---- 1 root disk 8, 17 2010-04-08 12:20 sdb1
crw-r--r-- 1 root root 4, 0 1998-01-01 03:48 systty
crw-r--r-- 1 root root 4, 1 1998-01-01 03:48 tty1
crw-r--r-- 1 root root 4, 1 1998-01-01 03:48 tty2
crw-r--r-- 1 root root 4, 1 1998-01-01 03:48 tty3
crw-r--r-- 1 root root 4, 1 1998-01-01 03:48 tty4

I'll try with the new initrd mods ...

slkrover 04-08-2010 11:47 AM

I had the same problem, never did fix it. I think there was a post about changing all the drives to sdx from hdx in /etc/fstab? to get them mounted? Libata switchover? In the end I just used alien BOBS other script to create a current boot cd set to get started. I think the huge-smp kernel would work if I had set the frame buffer to default on boot, that was my other problem, the screen would go blank when it did get the drive mounted.

whutchis 06-22-2010 10:17 AM

Got this to work on my system...
 
Using Generic 2.6.33-4-smp, I had to add modules for ext4, jdb2 and mbcache to the initrd. I think the problem is that if you're running with a kernel that has ext4 built in, the -m ext4 flag on mkinitrd doesn't actually load the module. I had to copy the ext4.ko over to the right location in the initrd-tree/lib/modules folder and add an insmod line to the load_kernel_modules file. Once ext4 _and it's dependencies_ were there, my system booted just fine. Btw, I had to go to a initrd boot because of my SATA RAID card that wasn't supported in the kernel. (Rocket Raid 2600x4).
-----wade


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