LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-22-2008, 05:42 PM   #1
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Rep: Reputation: 234Reputation: 234Reputation: 234
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
 
Old 12-22-2008, 05:48 PM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
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.

Last edited by brianL; 12-22-2008 at 05:52 PM.
 
Old 12-22-2008, 05:59 PM   #3
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
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.
 
Old 12-22-2008, 06:00 PM   #4
jannekrille
Member
 
Registered: Jul 2005
Location: Dalsland, Sweden
Distribution: Slackware 13.0 and 13.1
Posts: 75

Rep: Reputation: 22
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.
 
Old 12-22-2008, 06:27 PM   #5
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
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...

Last edited by w1k0; 12-22-2008 at 07:07 PM.
 
Old 12-22-2008, 06:46 PM   #6
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
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.)

Last edited by w1k0; 12-22-2008 at 07:09 PM.
 
Old 12-22-2008, 07:39 PM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
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.
 
Old 12-22-2008, 08:29 PM   #8
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
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.
 
Old 12-23-2008, 11:04 AM   #9
jannekrille
Member
 
Registered: Jul 2005
Location: Dalsland, Sweden
Distribution: Slackware 13.0 and 13.1
Posts: 75

Rep: Reputation: 22
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
 
Old 12-23-2008, 01:06 PM   #10
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
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
 
Old 12-23-2008, 02:01 PM   #11
jannekrille
Member
 
Registered: Jul 2005
Location: Dalsland, Sweden
Distribution: Slackware 13.0 and 13.1
Posts: 75

Rep: Reputation: 22
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.

Merry X-mas, by the way.

Jan-C
 
Old 12-23-2008, 02:24 PM   #12
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
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.

Last edited by brianL; 12-23-2008 at 02:27 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fatal error attempting to install /var/log/mount/slackware/a/kernel-modules-smp-2.6.2 v@ny@ Slackware - Installation 10 05-19-2010 01:40 AM
Slamd64. No kernel modules found arubin Slackware 1 03-06-2008 03:09 PM
kernel compiled, but modules not found? mikedeatworld Slackware 2 11-29-2006 06:54 PM
No kernel modules found davidsrsb Slackware 3 05-17-2006 05:55 AM
Compiled Kernel -- Modules can't be Found... joeyjwc Linux - Newbie 2 08-07-2005 05:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration