LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   No kernel modules found for Linux 2.6.27.7-smp. (http://www.linuxquestions.org/questions/slackware-14/no-kernel-modules-found-for-linux-2-6-27-7-smp-692332/)

w1k0 12-22-2008 05:42 PM

No kernel modules found for Linux 2.6.27.7-smp.
 
I try to configure Slackware 12.2 with original kernel 2.6.27.7-smp but for some reason I can't boot the system using generic kernel and initrd.

First I build in /boot directory initrd with the command:

Code:

mkinitrd -c -k vmlinuz-generic-smp-2.6.27.7-smp -m reiserfs
Next I put in /etc/lilo.conf the section:

Code:

image = /boot/vmlinuz-generic-smp-2.6.27.7-smp
  initrd = /boot/initrd.gz
  root = /dev/sda1
  label = linux.generic
  read-only

Then I reload lilo.

Everything seems to be good. I did full installation of Slackware 12.2 including kernel sources and modules. New system is on /dev/sda1 device and uses ReiserFS. I prepared appropriate intrd and LILO configuration.

After reboot I select linux.generic kernel and boot procedures stop at the message:

Code:

Freeing unused kernel memory: 328k freed
No kernel modules found for Linux 2.6.27.7-smp.
Trying to resume from /dev/sda8
PM: Starting manual resume from disk
mount: mounting /dev/root on /mnt failed: No such device
ERROR: No /sbin/init found on rootdev (or not mounted).  Trouble ahead.
      You can try to fix it. Type 'exit' when thing are done.

/bin/sh: can't access tty; job control turned off
/ $

I suppose I overlooked some trivial step but I can't figure what's this. In Slackware 12.1 I prepared generic kernel with initrd without problems. In Slackware 12.2 I'm unable to do it.

Any help will be appreciated.

***

Just in case I attach a few additional information...

$ ls -l /boot/
Code:

total 19333
lrwxrwxrwx  1 root root      37 2008-12-17 22:49 README.initrd -> /usr/doc/mkinitrd-1.3.2/README.initrd
lrwxrwxrwx  1 root root      32 2008-12-17 23:09 System.map -> System.map-huge-smp-2.6.27.7-smp
-rw-r--r--  1 root root  927553 2008-11-21 06:01 System.map-generic-2.6.27.7
-rw-r--r--  1 root root  965704 2008-11-21 05:20 System.map-generic-smp-2.6.27.7-smp
-rw-r--r--  1 root root 1393024 2008-11-21 06:20 System.map-huge-2.6.27.7
-rw-r--r--  1 root root 1432921 2008-11-21 05:33 System.map-huge-smp-2.6.27.7-smp
-rw-r--r--  1 root root    512 2008-12-17 23:11 boot.0801
-rw-r--r--  1 root root    137 2008-12-17 23:09 boot_message.txt
lrwxrwxrwx  1 root root      28 2008-12-17 23:09 config -> config-huge-smp-2.6.27.7-smp
-rw-r--r--  1 root root  89202 2008-11-21 06:01 config-generic-2.6.27.7
-rw-r--r--  1 root root  89505 2008-11-21 05:20 config-generic-smp-2.6.27.7-smp
-rw-r--r--  1 root root  89081 2008-11-21 06:20 config-huge-2.6.27.7
-rw-r--r--  1 root root  89384 2008-11-21 05:33 config-huge-smp-2.6.27.7-smp
-rw-r--r--  1 root root    5040 2008-11-29 19:43 diag1.img
drwxr-xr-x 10 root root    496 2008-12-22 23:07 initrd-tree
-rw-r--r--  1 root root  789560 2008-12-22 23:07 initrd.gz
-rw-------  1 root root  19968 2008-12-22 23:13 map
-rw-r--r--  1 root root  15754 2008-02-22 01:08 slack.bmp
lrwxrwxrwx  1 root root      29 2008-12-17 23:09 vmlinuz -> vmlinuz-huge-smp-2.6.27.7-smp
-rw-r--r--  1 root root 2220880 2008-11-21 06:01 vmlinuz-generic-2.6.27.7
-rw-r--r--  1 root root 2347888 2008-11-21 05:20 vmlinuz-generic-smp-2.6.27.7-smp
-rw-r--r--  1 root root 4540208 2008-11-21 06:20 vmlinuz-huge-2.6.27.7
-rw-r--r--  1 root root 4727664 2008-11-21 05:33 vmlinuz-huge-smp-2.6.27.7-smp

$ cat /etc/lilo.conf
Code:

boot = /dev/sda1
compact        # faster, but won't work on all systems.
append=" vt.default_utf8=0 resume=/dev/sda8 acpi_sleep=s3_bios,s3_mode libata.atapi_enabled=1 combined_mode=libata"
prompt
timeout = 50
vga = 791
image = /boot/vmlinuz-generic-smp-2.6.27.7-smp
  initrd = /boot/initrd.gz
  root = /dev/sda1
  label = linux.generic
  read-only
image = /boot/vmlinuz-huge-smp-2.6.27.7-smp
  root = /dev/sda1
  label = linux.huge
  read-only  # Partitions should be mounted read-only for checking
other = /dev/sda2
  label = linux.old

$ cat /etc/fstab
Code:

/dev/sda8        swap            swap        defaults        0  0
/dev/sda1        /                reiserfs    defaults        1  1
/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
/dev/sr0        /mnt/dvdrw      iso9660 ro,user,noauto        0      0
/dev/sda1      /mnt/sda1        reiserfs user,noauto          0      0
/dev/sda2      /mnt/sda2        reiserfs user,noauto          0      0
/dev/sda3      /mnt/sda3        reiserfs defaults            1      2
/dev/sda5      /mnt/sda5        reiserfs defaults            1      2
/dev/sda6      /mnt/sda6        reiserfs defaults            1      2
/dev/sda7      /mnt/sda7        reiserfs defaults            1      2
/dev/sda1      /mnt/sda1        reiserfs defaults            0      0
/dev/sda1      /mnt/usb        vfat    user,noauto,umask=000    0  0
/dev/sdb1      /mnt/sdb1        reiserfs user,noauto            0      0
/dev/sdc1      /mnt/sdc1        reiserfs user,noauto            0      0
/dev/sdd1      /mnt/sdd1        reiserfs user,noauto            0      0
/dev/sdb1      /mnt/usb-cf      vfat    user,noauto,umask=000    0  0
/dev/sdc1      /mnt/usb-ms      vfat    user,noauto,umask=000    0  0
/dev/sdd1      /mnt/usb-sd      vfat    user,noauto,umask=000    0  0
/dev/sde1      /mnt/usb-xd      vfat    user,noauto,umask=000    0  0
/dev/hde1      /mnt/pcmcia      vfat    user,noauto,umask=000    0  0
/dev/loop0      /mnt/loop        iso9660 user,noauto,rw,loop  0  0

$ ls /lib/modules/
Code:

2.6.27.7  2.6.27.7-smp
$ ls -l /usr/src/
Code:

total 1
lrwxrwxrwx  1 root root  14 2008-12-17 22:59 linux -> linux-2.6.27.7
drwxr-xr-x 23 root root 904 2008-11-21 05:12 linux-2.6.27.7
drwxr-xr-x  7 root root 168 2008-10-23 00:02 rpm


brianL 12-22-2008 05:48 PM

The only thing I can think of is that mkinitrd command, you only need 2.6.27.7-smp, without the vmlinuz-generic-smp part.
Code:

mkinitrd -c -k 2.6.27.7-smp -m reiserfs -r /dev/sda1
possibly.

sahko 12-22-2008 05:59 PM

The 12.1 README.mkinitrd file was much better than the current one regarding the initrd examples.
The example given on the 12.2 one never worked for me.

jannekrille 12-22-2008 06:00 PM

w1k0,

I fiddled a bit with the same issue, and what I think fixed it was editing the file "/boot/initrd-tree/rootdev", changing the text to (in my case) "/dev/hda1", then run the command "mkinitrd" (without anything else) and finally re-run lilo.

There is also an upgraded package of mkinitrd available since some days back. You might want to upgrade and try all over again.

w1k0 12-22-2008 06:27 PM

I started from the beginning and I shortened mkinitrd command:

Code:

mkinitrd -c -k 2.6.27.7-smp -m reiserfs
Boot procedure looks now better but there is the problem with /dev/root:

Code:

Freeing unused kernel memory: 328k freed
initrd.gz:  Loading kernel modules from initrd image:
Using /lib/modules/2.6.27.7-smp/kernel/fs/reiserfs/reiserfs.ko
mount: mounting /dev/root on /mnt failed: No such file or directory
ERROR: No /sbin/init found on rootdev (or not mounted).  Trouble ahead.
      You can try to fix it. Type 'exit' when thing are done.

/bin/sh: can't access tty; job control turned off
/ $

***

I suppose jannekrille has right. In rootdev file there is inscription:

Code:

/dev/root
so I need change it to:

Code:

/dev/sda1
***

I write now from Slackware 12.1. I can't chroot to /mnt/sda1 directory.

# chroot /mnt/sda1
Code:

chroot: cannot run command `/bin/bash': Permission denied
Maybe it isn't a reason to start new thread so I ask why chroot displays such message and doesn't change the shell?

Other commands produce similar messages:

# chroot /mnt/sda1 /bin/pwd
Code:

chroot: cannot run command `/bin/pwd': Permission denied
***

And now I go to Slackware 12.2 to check jannekrille's hint...

w1k0 12-22-2008 06:46 PM

Thank you, jannekrille. Handshake if you're boy or kiss if you're girl. Your choice...

***

So I ask once again my second question: why the command chroot /mnt/sda1 produces message:

Code:

chroot: cannot run command `/bin/bash': Permission denied
and don't change the shell.

(I'm trying to chroot from Slackware 12.1 to Slackware 12.2.)

Didier Spaier 12-22-2008 07:39 PM

FYI, problems with mkinitrd initially shipped with 12.2 release are now fixed, see:
http://slackware.com/changelog/stable.php?cpu=i386
so install the new version and you'll be happy.

w1k0 12-22-2008 08:29 PM

When I install and configure new system I don't establish Internet connections from it. At the end of the configuration I backup the system and then connect to Internet for the first time to check if there are some new patches. I want to be completely sure that my backup isn't compromised. It's my paranoid method of installing and configuring the system.

It's nice that mkinitrd was patched so fast but it's nice also to know that hack with rootdev invented by jannekrille.

jannekrille 12-23-2008 11:04 AM

Quote:

Thank you, jannekrille. Handshake if you're boy or kiss if you're girl. Your choice...
I think I go for the handshake :)
That /dev/root- stuff was just a lucky shot I got when I had the same problem as you. You know, every dog has it's day...
About your /bin/bash-issue, did you set up a login shell for your user? It's easy to forget, but easy to fix in "KUser".

Jan-C

samac 12-23-2008 01:06 PM

Quote:

I started from the beginning and I shortened mkinitrd command:

Code:

mkinitrd -c -k 2.6.27.7-smp -m reiserfs

This is easy to fix, just as brianl has already said, run the command above but add -r /dev/xxx substituting your root device e.g.
Code:

mkinitrd -c -k 2.6.27.7-smp -m reiserfs -r /dev/hda1
, then remember to run lilo.

This fixed the problem for me, once you are up and running you will be able to update your system.

samac

jannekrille 12-23-2008 02:01 PM

Quote:

This is easy to fix, just as brianl has already said, run the command above but add -r /dev/xxx substituting your root device e.g. mkinitrd -c -k 2.6.27.7-smp -m reiserfs -r /dev/hda1
Yeah, this must make my editing obsolete. This seems faster than the way I did it. I guess w1k0 will have to shake some more hands today.:D

Merry X-mas, by the way.

Jan-C

brianL 12-23-2008 02:24 PM

This script by Eric is useful for finding the right command to enter to create an initrd:
http://www.slackware.com/~alien/tool...d_generator.sh

Yeah, Merry Christmas to Slackers everywhere.


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