LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 10-25-2011, 04:12 AM   #16
wootletootle
Member
 
Registered: Jul 2002
Location: New Zealand
Distribution: slackware
Posts: 81

Original Poster
Rep: Reputation: 15

Not yet resolved, however I followed queasd's prescription (slightly emended).
LOCAL_VERSION is set with extension=25.10.11.
make; make modules; make modules_install; kinstall [queasd]
This resulted in the creation of:

/boot/vmlinuz-2.6.29.6-smp-25.10.11
/boot/System.map-2.6.29.6-smp-25.10.11
/boot/initrd-2.6.29.6-smp-25.10.11
/lib/modules/2.6.29.6-smp-25.10.11/

and the lilo stanza is

# Linux bootable partition config begins
image = /boot/vmlinuz-2.6.29.6-smp-25.10.11
initrd = /boot/initrd-2.6.29.6-smp-25.10.11
root = /dev/sda5
label = Slackware
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends

However on booting to this kernel errors are received as follows

.....
initrd-2.6.29.6-smp-25.10.11: Loading kernel modules from initrd image
Using /lib/modules/2.6.29.6/kernel/fs/mbcache.ko
mbcache: version magic '2.6.29.6 mod_unload 486'
should be '2.6.29.6-smp-25.10.11 SMP mod_unload CORE2'
insmod: cannot insert '/lib/modules/2.6.29.6/kernel/fs/mbcache.ko'
Using /lib/modules/2.6.29.6/kernel/fs/jbd/jbd.ko
jbd: version magic '2.6.29.6 mod_unload 486'
should be '2.6.29.6-smp-25.10.11 SMP mod_unload CORE2'
insmod: cannot insert '/lib/modules/2.6.29.6/kernel/fs/jbd/jbd.ko'
Using /lib/modules/2.6.29.6/kernel/fs/ext3/ext3.ko
ext3: version magic '2.6.29.6 mod_unload 486'
should be '2.6.29.6-smp-25.10.11 SMP mod_unload CORE2'
insmod: cannot insert '/lib/modules/2.6.29.6/kernel/fs/ext3/ext3.ko'
mdev: /sys/class/scsi_host/host4: No such file or directory
mdev: /sys/class/scsi_host/host5: No such file or directory
Trying to resume from /dev/sda6
PM: Starting manual resume from disk
mount: mounting /dev/sda5 on /mnt failed: No such device
ERROR: No /sbin/init found on rootdev (or not mounted)
Trouble ahead. You can try and fix it. Type 'exit'
when things are done.
/bin/sh: Can't access tty: job control turned off.
#

and the console is frozen. For some reason the loader is trying to access
the module tree 2.6.29.6 (which does exist) instead of 2.6.29.6-smp-25.10.11
There may be other errors.

I feel I'm almost there (encore un effort) but need a final illumination
 
Old 10-25-2011, 05:51 AM   #17
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Looks like you didn't build an initrd for the new kernel/modules and it's using the old one.
 
Old 10-25-2011, 07:05 AM   #18
wootletootle
Member
 
Registered: Jul 2002
Location: New Zealand
Distribution: slackware
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dive View Post
Looks like you didn't build an initrd for the new kernel/modules and it's using the old one.
Well, I believe I did:

LINUX_SOURCE_PATH=/usr/src/linux
IMAGE_PATH=arch/x86/boot/bzImage
INSTALL_PATH=/boot
cd $LINUX_SOURCE_PATH
KERNEL_RELEASE=$(cat include/config/kernel.release)
# Install modules and the image, build initrd.
make modules_install
cp -v $IMAGE_PATH $INSTALL_PATH/vmlinuz-"$KERNEL_RELEASE"
cp -v System.map $INSTALL_PATH/System.map-"$KERNEL_RELEASE"
cd $INSTALL_PATH
mkinitrd -o initrd-"$KERNEL_RELEASE" -k "$KERNEL_RELEASE"

-rw-r--r-- 1 root root 915614 2011-10-25 21:07 initrd-2.6.29.6-smp-25.10.11

Last edited by wootletootle; 10-25-2011 at 07:11 AM.
 
Old 10-25-2011, 10:17 AM   #19
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Add the -c option to clear out the old initrd
mkinitrd -c -o initrd-"$KERNEL_RELEASE" -k "$KERNEL_RELEASE"
 
Old 10-25-2011, 10:26 AM   #20
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
You didn't add necessary modules to the initrd, it seems. That is the whole point of it, putting the drivers in it that are not compiled into the kernel but necessary to access the disk(s), like file-system drivers or drivers for your disk-controllers. Or mdadm if you want to start a system that is residing on a RAID.

Last edited by TobiSGD; 10-25-2011 at 10:37 AM.
 
Old 10-25-2011, 11:38 AM   #21
wootletootle
Member
 
Registered: Jul 2002
Location: New Zealand
Distribution: slackware
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by colorpurple21859 View Post
Add the -c option to clear out the old initrd
mkinitrd -c -o initrd-"$KERNEL_RELEASE" -k "$KERNEL_RELEASE"
That removed the insmod errors during boot, thanks colorpurple
Now I am left with:

mdev: /sys/class/scsi_host/host4: No such file or directory
mdev: /sys/class/scsi_host/host5: No such file or directory
Trying to resume from /dev/sda6
PM: Starting manual resume from disk
mount: mounting /dev/sda5 on /mnt failed: No such device
ERROR: No /sbin/init found on rootdev (or not mounted)
Trouble ahead. You can try and fix it. Type 'exit'
when things are done.
/bin/sh: Can't access tty: job control turned off.
#

after which the console freezes. I googled the mdev error but with no success.
sda5 is the boot partition. Any further suggestions? Must be close now
 
Old 10-25-2011, 11:48 AM   #22
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
It seems that it is lacking a driver for your harddisk-controller.
 
Old 10-25-2011, 11:56 AM   #23
wootletootle
Member
 
Registered: Jul 2002
Location: New Zealand
Distribution: slackware
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by TobiSGD View Post
It seems that it is lacking a driver for your harddisk-controller.
Where do I look in the kernel configuration?
 
Old 10-25-2011, 11:58 AM   #24
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
in a terminal run /usr/share/mkinitrd/mkinitrd_command_generator.sh to figure out what modules need to be loaded into your initrd.
 
Old 10-25-2011, 12:11 PM   #25
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by wootletootle View Post
Where do I look in the kernel configuration?
There are two possibilities:
1. You haven't compiled a driver for your hardware at all, change that in your kernel configuration. i don't know which driver you have to activate, since I know nothing about your hardware.
2. The needed driver is compiled as module and has to be integrated into the initrd. Again, that is the whole point of an initrd, besides from some exotic uses for it.
Try the command suggested by colorpurple21859 and look if that helps.
 
Old 10-25-2011, 12:34 PM   #26
wootletootle
Member
 
Registered: Jul 2002
Location: New Zealand
Distribution: slackware
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by colorpurple21859 View Post
in a terminal run /usr/share/mkinitrd/mkinitrd_command_generator.sh to figure out what modules need to be loaded into your initrd.
The result was:

mkinitrd -c -k 2.6.29.6-smp -f ext3 -r /dev/sda5 -m usbhid:ehci-hcd:mbcache:jbd:ext3 -o /boot/initrd.gz

The only module missing is usbhid, and it's true that I disabled HID in the kernel configuration
since I was not familiar with it from previous installations. I'm recompiling now and hope for
a good result...
 
Old 10-25-2011, 12:50 PM   #27
qweasd
Member
 
Registered: May 2010
Posts: 621

Rep: Reputation: Disabled
I am learning quite a bit from this thread, and I have a few questions of my own.

When exactly is it a good idea to clear the initrd tree with -c? I've never done this before, but everything seems to work just fine.

Is there a point in using initrd if I don't add any modules to it with -m?
 
Old 10-25-2011, 01:06 PM   #28
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
If you have all your needed modules to access your hard drives and file system compiled into your kernel instead of as a module then you don't need a initrd. I usually compile the drivers I need into my kernel so I won't have to be bothered with generating an initrd. You need to know your hardware to know what drivers are needed. I believe you need to clear the initrd tree whenever the kernel version changes.
 
Old 10-25-2011, 01:41 PM   #29
wootletootle
Member
 
Registered: Jul 2002
Location: New Zealand
Distribution: slackware
Posts: 81

Original Poster
Rep: Reputation: 15
Custom kernel install [SOLVED]

The Kernel God be praised. It worked

That is, after executing

mkinitrd -c -o initrd-"$KERNEL_RELEASE" -k "$KERNEL_RELEASE" -r /dev/sda5 -m usbhid:ehci-hcd:mbcache:jbd:ext3

I was able to boot to the new kernel (there is still a minor issue with the nvidia modules).
I'd like to offer my sincere thanks to all who have helped resolve this problem, and especially
qweasd for kinstall, colorpurple and TobiSGD.

What is particularly pleasing is that my original question is also answered: with this setup
I am now able to boot alternative kernels from the same partition simply by selecting the
appropriate one in the boot menu. No need to adjust symlinks etc prior to rebooting.

I take your point, colorpurple, about compiling drivers for the file system and hard drives
into the kernel, thus obviating the need for initrd. That will be my next step.
 
Old 10-25-2011, 01:52 PM   #30
qweasd
Member
 
Registered: May 2010
Posts: 621

Rep: Reputation: Disabled
Quote:
Originally Posted by wootletootle View Post
It worked
Praise "Bob".
 
  


Reply



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
how do you install a custom kernel in debian baronobeefdip Debian 9 08-21-2011 02:37 AM
Custom Install Kernel? ericbobbitt SUSE / openSUSE 2 04-06-2006 10:28 AM
How can I Install Modules for Custom Kernel dauphinfay Linux - General 3 03-19-2006 09:48 AM
Custom kernel for Fedora 3 install godhugh Fedora - Installation 0 01-13-2005 02:32 PM
Custom install with newer kernel bones996 Red Hat 3 11-12-2003 04:06 AM

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

All times are GMT -5. The time now is 02:09 AM.

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