LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 04-08-2010, 05:47 AM   #1
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 208

Rep: Reputation: 27
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
 
Old 04-08-2010, 05:53 AM   #2
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,390

Rep: Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090
Are you sure that /boot/vmliuz be a symlink to your generic kernel ?

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

Last edited by Didier Spaier; 04-08-2010 at 05:54 AM.
 
Old 04-08-2010, 06:13 AM   #3
gegechris99
Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 14.1 64bit
Posts: 728
Blog Entries: 3

Rep: Reputation: 77
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
 
Old 04-08-2010, 08:01 AM   #4
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 208

Original Poster
Rep: Reputation: 27
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
 
Old 04-08-2010, 09:05 AM   #5
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,390

Rep: Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090
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.
 
Old 04-08-2010, 09:11 AM   #6
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware 14.1
Posts: 467

Rep: Reputation: 89
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
 
Old 04-08-2010, 09:37 AM   #7
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 208

Original Poster
Rep: Reputation: 27
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 ...
 
Old 04-08-2010, 09:53 AM   #8
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,529

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Quote:
Originally Posted by rpedrica View Post

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.)
 
Old 04-08-2010, 10:01 AM   #9
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware 14.1
Posts: 467

Rep: Reputation: 89
What does /usr/share/mkinitrd/mkinitrd*.sh tell you?
 
Old 04-08-2010, 10:19 AM   #10
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,465

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
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

Last edited by allend; 04-08-2010 at 10:24 AM.
 
Old 04-08-2010, 11:14 AM   #11
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 208

Original Poster
Rep: Reputation: 27
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 ...
 
Old 04-08-2010, 11:47 AM   #12
slkrover
Member
 
Registered: Mar 2010
Distribution: Slackware 14.1
Posts: 68

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

Last edited by slkrover; 04-08-2010 at 11:49 AM.
 
Old 06-22-2010, 10:17 AM   #13
whutchis
LQ Newbie
 
Registered: Aug 2004
Posts: 1

Rep: Reputation: 0
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
 
  


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
what are initrd.img-2.6.28-11-generic and vmlinuz-2.6.28-11-generic? karuna-bdc Linux - Newbie 11 07-17-2009 05:00 AM
Generic SMP kernel with no initrd? songangel Slackware 8 03-26-2009 06:12 PM
DMA not working slackware 12.1 Generic Stock SMP kernel duryodhan Slackware 8 09-18-2008 12:54 PM
slack 12, switch to generic kernel from huge kernel, using grub? jaguarrh Slackware 8 09-19-2007 06:29 AM
a generic 3 buttons serial mouse not working siuwai Fedora - Installation 1 01-05-2005 06:58 PM


All times are GMT -5. The time now is 03:07 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration