LinuxQuestions.org
Help answer threads with 0 replies.
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 02-04-2013, 06:24 PM   #1
club slacker
LQ Newbie
 
Registered: Feb 2013
Posts: 4

Rep: Reputation: Disabled
trouble switching to generic kernel


i am following the guide on this page: http://docs.slackware.com/slackware:beginners_guide

first i ran this:
Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh
then i ran this:
Code:
bash-4.2# /usr/share/mkinitrd/mkinitrd_command_generator.sh
#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:

mkinitrd -c -k 3.2.29-smp -f ext2 -r /dev/sda1 -m mbcache:ext2 -u -o /boot/initrd.gz
then i did the this from the recommended above:
Quote:
mkinitrd -c -k 3.2.29-smp -f ext2 -r /dev/sda1 -m mbcache:ext2 -u -o /boot/initrd.gz
bash-4.2# mkinitrd -c -k 3.2.29-smp -f ext2 -r /dev/sda1 -m mbcache:ext2 -u -o /boot/initrd.gz
OK: /lib/modules/3.2.29-smp/kernel/fs/mbcache.ko added.
OK: /lib/modules/3.2.29-smp/kernel/fs/mbcache.ko added.
OK: /lib/modules/3.2.29-smp/kernel/fs/ext2/ext2.ko added.
16523 blocks
/boot/initrd.gz created.
Be sure to run lilo again if you use it.
bash-4.2#
then i run this:
Quote:
bash-4.2# /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-3.2.29
# Linux bootable partition config begins
# initrd created with 'mkinitrd -c -k 3.2.29 -f ext2 -r /dev/sda1 -m mbcache:ext2 -u -o /boot/initrd.gz'
image = /boot/vmlinuz-generic-3.2.29
initrd = /boot/initrd.gz
root = /dev/sda1
label = 3.2.29
read-only
# Linux bootable partition config ends
bash-4.2#
then i edited /etc/lilo.conf to look like this:
Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/sda
#compact        # faster, but won't work on all systems.
# Standard menu.
message = /boot/boot_message.txt

# Append any additional kernel parameters:
append=" vt.default_utf8=0"
#prompt
#timeout = 5
# Normal VGA console
vga = normal
# Ask for video mode at boot (time out to normal in 30s)
#vga = ask
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# ramdisk = 0     # paranoia setting
# End LILO global section
# Linux bootable partition config begins
####image = /boot/vmlinuz
####  root = /dev/sda1
####  label = 
####  read-only  # Partitions should be mounted read-only for checking
# Linux bootable partition config ends

image = /boot/vmlinuz-generic-3.2.29
	initrd = /boot/initrd.gz
	root = /dev/sda1
	label = 3.2.29
	read-only
lastly, i ran lilo -v:
Code:
Warning: LBA32 addressing assumed
Reading boot sector from /dev/sda
Using MENU secondary loader
Calling map_insert_data
Mapping message file /boot/boot_message.txt
Calling map_insert_file

Boot image: /boot/vmlinuz-generic-3.2.29
Mapping RAM disk /boot/initrd.gz
The initial RAM disk will be loaded in the high memory above 16M.
Added 3.2.29  +  *

Writing boot sector.
/boot/boot.0800 exists - no boot sector backup copy made.
One warning was issued.
i restart computer and get kernel panic. right now i am booted off the CD.

Last edited by club slacker; 02-04-2013 at 07:11 PM.
 
Old 02-04-2013, 07:12 PM   #2
club slacker
LQ Newbie
 
Registered: Feb 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
edit: updated OP with exact details of all the changes i did
 
Old 02-04-2013, 07:20 PM   #3
clubslacker
LQ Newbie
 
Registered: Feb 2013
Posts: 19

Rep: Reputation: Disabled
this is the error that i get on startup:
Quote:
no kernel modules found for linux 3.2.29
mount: mounting /dev/sda1 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 things are done.
and so i type 'exit' and then see a bunch of other stuff, looks like modules or stuff, is missing... then it continues to say it is "closing initrd.gz"

a bunch of other stuff happens

then keyboard starts blinking, cannot do anything...
 
Old 02-04-2013, 07:31 PM   #4
jamesf
Member
 
Registered: Dec 2004
Location: USA
Distribution: Slackware 12, Slackware64 14.2
Posts: 236
Blog Entries: 1

Rep: Reputation: 57
Note: I answered the wrong question, sorry.

Last edited by jamesf; 02-04-2013 at 07:34 PM.
 
Old 02-04-2013, 07:40 PM   #5
jamesf
Member
 
Registered: Dec 2004
Location: USA
Distribution: Slackware 12, Slackware64 14.2
Posts: 236
Blog Entries: 1

Rep: Reputation: 57
Before you exit you should try to edit /etc/lilo.conf and remove the comments you put in front of the huge kernel, the ####'s. You can have more than one kernel to choose from at the lilo prompt and this will allow you to experiment and recover easily.

If you can get the file edited then run lilo, type exit, (maybe reboot) and you ought to be back up. Be sure to pick the huge kernel to boot from instead of the broken configuration.

It also appears that you tried to set up the initrd.gz for a non-smp kernel. Unless you really, really want that and can modify the kernel sources to support it (in some cases), then you should really be using the smp kernel.

Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh --longhelp | more
has a lot of good information.

basically, you should:
Code:
root@tardis:~# /usr/share/mkinitrd/mkinitrd_command_generator.sh --lilo /boot/vmlinuz-generic-smp-3.2.29-smp >>/etc/lilo.conf

root@tardis:~# $( /usr/share/mkinitrd/mkinitrd_command_generator.sh --run /boot/vmlinuz-generic-smp-3.2.29-smp )

root@tardis:~# lilo

Last edited by jamesf; 02-04-2013 at 07:42 PM.
 
1 members found this post helpful.
Old 02-04-2013, 07:57 PM   #6
clubslacker
LQ Newbie
 
Registered: Feb 2013
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by jamesf View Post

basically, you should:
Code:
root@tardis:~# /usr/share/mkinitrd/mkinitrd_command_generator.sh --lilo /boot/vmlinuz-generic-smp-3.2.29-smp >>/etc/lilo.conf

root@tardis:~# $( /usr/share/mkinitrd/mkinitrd_command_generator.sh --run /boot/vmlinuz-generic-smp-3.2.29-smp )

root@tardis:~# lilo
ok, i am going to do this after dinner... As far as SMP i was unaware of any of this, as i was simply following the "beginners guide" to.the.letter.

i do not understand why following the beginners guide, as perfectly as i have done, has resulted in a broken mess. don't get me wrong, i'm not mad I am learning and trying to have fun, but... ::violin
 
Old 02-04-2013, 08:04 PM   #7
darkstar61
Member
 
Registered: Sep 2012
Distribution: agnOStic
Posts: 46

Rep: Reputation: 12
Quote:
Originally Posted by clubslacker View Post
i do not understand why following the beginners guide, as perfectly as i have done, has resulted in a broken mess. don't get me wrong, i'm not mad I am learning and trying to have fun, but... ::violin
from the beginners guide:

Code:
Note that it is recommended to add a new section instead of editing the existing kernel image section. Assign a unique label to your new section. After reboot, LILO will give you two options: to boot into your freshly added generic kernel, or to boot into the failsafe huge kernel (of which you are certain that it will work).

Last edited by darkstar61; 02-04-2013 at 08:07 PM.
 
Old 02-04-2013, 08:17 PM   #8
clubslacker
LQ Newbie
 
Registered: Feb 2013
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by darkstar61 View Post
from the beginners guide:

Code:
Note that it is recommended to add a new section instead of editing the existing kernel image section. Assign a unique label to your new section. After reboot, LILO will give you two options: to boot into your freshly added generic kernel, or to boot into the failsafe huge kernel (of which you are certain that it will work).
ok ya i get that but its no big deal i can just edit quickly a new section in lilo.conf when booted from my cd. then i can reboot and choose the huge kernel. but still, i followed beginners guide and it no worky
 
Old 02-04-2013, 08:49 PM   #9
club slacker
LQ Newbie
 
Registered: Feb 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jamesf View Post
Before you exit you should try to edit /etc/lilo.conf and remove the comments you put in front of the huge kernel, the ####'s. You can have more than one kernel to choose from at the lilo prompt and this will allow you to experiment and recover easily.

If you can get the file edited then run lilo, type exit, (maybe reboot) and you ought to be back up. Be sure to pick the huge kernel to boot from instead of the broken configuration.

It also appears that you tried to set up the initrd.gz for a non-smp kernel. Unless you really, really want that and can modify the kernel sources to support it (in some cases), then you should really be using the smp kernel.

Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh --longhelp | more
has a lot of good information.

basically, you should:
Code:
root@tardis:~# /usr/share/mkinitrd/mkinitrd_command_generator.sh --lilo /boot/vmlinuz-generic-smp-3.2.29-smp >>/etc/lilo.conf

root@tardis:~# $( /usr/share/mkinitrd/mkinitrd_command_generator.sh --run /boot/vmlinuz-generic-smp-3.2.29-smp )

root@tardis:~# lilo
ok. first i restored to my original lilo.conf and loaded into the huge kernel. then i followed your 3 steps:
Code:
bash-4.2# /usr/share/mkinitrd/mkinitrd_command_generator.sh --lilo /boot/vmlinuz-generic-smp-3.2.29-smp >>/etc/lilo.conf
bash-4.2# $( /usr/share/mkinitrd/mkinitrd_command_generator.sh --run /boot/vmlinuz-generic-smp-3.2.29-smp )
OK: /lib/modules/3.2.29-smp/kernel/fs/mbcache.ko added.
OK: /lib/modules/3.2.29-smp/kernel/fs/mbcache.ko added.
OK: /lib/modules/3.2.29-smp/kernel/fs/ext2/ext2.ko added.
16523 blocks
/boot/initrd.gz created.
Be sure to run lilo again if you use it.
bash-4.2# lilo
Warning: LBA32 addressing assumed
Added read-only  *
Added 3.2.29-smp  +
One warning was issued.
now rebooting computer. will let u know how it goes.
 
Old 02-04-2013, 08:50 PM   #10
darkstar61
Member
 
Registered: Sep 2012
Distribution: agnOStic
Posts: 46

Rep: Reputation: 12
Quote:
Originally Posted by clubslacker View Post
ok ya i get that but its no big deal i can just edit quickly a new section in lilo.conf when booted from my cd. then i can reboot and choose the huge kernel. but still, i followed beginners guide and it no worky
did you do a full install?

can you post the results of ls -hal /boot

here 's mine

Code:
le@darkstar:~$ ls -hal /boot
total 19M
drwxr-xr-x  3 root root 4.0K Feb  5 03:30 ./
drwxr-xr-x 23 root root 4.0K Feb  4 18:01 ../
lrwxrwxrwx  1 root root   37 Jan 31 18:43 README.initrd -> /usr/doc/mkinitrd-1.4.7/README.initrd
lrwxrwxrwx  1 root root   22 Jan 31 18:56 System.map -> System.map-huge-3.2.29
-rw-r--r--  1 root root 1.9M Sep 17 20:38 System.map-generic-3.2.29
-rw-r--r--  1 root root 3.1M Sep 17 21:19 System.map-huge-3.2.29
-rw-r--r--  1 root root  512 Jan 31 18:58 boot.0800
-rw-r--r--  1 root root  209 Jan 31 18:58 boot_message.txt
lrwxrwxrwx  1 root root   18 Jan 31 18:56 config -> config-huge-3.2.29
-rw-r--r--  1 root root 119K Sep 17 20:38 config-generic-3.2.29
-rw-r--r--  1 root root 119K Sep 17 21:19 config-huge-3.2.29
drwxr-xr-x 14 root root 4.0K Feb  2 13:16 initrd-tree/
-rw-r--r--  1 root root 4.4M Feb  2 13:16 initrd.gz
-rw-r--r--  1 root root  23K Aug 18 01:37 inside.bmp
-rw-------  1 root root 170K Feb  5 03:30 map
-rw-r--r--  1 root root 6.8K Aug 18 01:37 onlyblue.bmp
-rw-r--r--  1 root root  16K Mar 27  2011 slack.bmp
-rw-r--r--  1 root root  33K Aug 18 01:37 tuxlogo.bmp
lrwxrwxrwx  1 root root   19 Jan 31 18:56 vmlinuz -> vmlinuz-huge-3.2.29
-rw-r--r--  1 root root 3.1M Sep 17 20:38 vmlinuz-generic-3.2.29
-rw-r--r--  1 root root 6.0M Sep 17 21:19 vmlinuz-huge-3.2.29
and of the linux part of your lilo.conf

here's mine

Code:
le@darkstar:~$ less /etc/lilo.conf

# Linux bootable partition config begins
image = /boot/vmlinuz-generic-3.2.29
  initrd = /boot/initrd.gz # add this line so that lilo sees initrd.gz
  root = /dev/sda3
  label = Slackware
  read-only

image = /boot/vmlinuz
  root = /dev/sda3
  label = Linux
  read-only
# Linux bootable partition config ends
 
Old 02-04-2013, 09:24 PM   #11
club slacker
LQ Newbie
 
Registered: Feb 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
here you go dude, am i all set to go now?
Quote:
bash-4.2# ls -hal /boot
total 29M
drwxr-xr-x 3 root root 4.0K Feb 4 19:07 .
drwxr-xr-x 21 root root 4.0K Jan 31 15:45 ..
lrwxrwxrwx 1 root root 37 Jan 31 14:45 README.initrd -> /usr/doc/mkinitrd-1.4.7/README.initrd
lrwxrwxrwx 1 root root 30 Jan 31 14:43 System.map -> System.map-huge-smp-3.2.29-smp
-rw-r--r-- 1 root root 1.5M Sep 17 11:27 System.map-generic-3.2.29
-rw-r--r-- 1 root root 1.5M Sep 17 11:03 System.map-generic-smp-3.2.29-smp
-rw-r--r-- 1 root root 2.4M Sep 17 12:11 System.map-huge-3.2.29
-rw-r--r-- 1 root root 2.5M Sep 17 11:17 System.map-huge-smp-3.2.29-smp
-rw-r--r-- 1 root root 512 Jan 31 16:47 boot.0800
-rw-r--r-- 1 root root 512 Jan 31 16:04 boot.0801
-rw-r--r-- 1 root root 168 Jan 31 16:04 boot_message.txt
lrwxrwxrwx 1 root root 26 Jan 31 14:43 config -> config-huge-smp-3.2.29-smp
-rw-r--r-- 1 root root 123K Sep 17 11:27 config-generic-3.2.29
-rw-r--r-- 1 root root 124K Sep 17 11:03 config-generic-smp-3.2.29-smp
-rw-r--r-- 1 root root 123K Sep 17 12:11 config-huge-3.2.29
-rw-r--r-- 1 root root 124K Sep 17 11:17 config-huge-smp-3.2.29-smp
drwxr-xr-x 13 root root 4.0K Feb 4 18:47 initrd-tree
-rw-r--r-- 1 root root 3.4M Feb 4 18:47 initrd.gz
-rw-r--r-- 1 root root 23K Aug 20 12:13 inside.bmp
-rw------- 1 root root 78K Feb 4 19:07 map
-rw-r--r-- 1 root root 6.8K Aug 20 12:13 onlyblue.bmp
-rw-r--r-- 1 root root 14K Feb 14 2010 slack.bmp
-rw-r--r-- 1 root root 33K Aug 20 12:13 tuxlogo.bmp
lrwxrwxrwx 1 root root 27 Jan 31 14:43 vmlinuz -> vmlinuz-huge-smp-3.2.29-smp
-rw-r--r-- 1 root root 2.8M Sep 17 11:27 vmlinuz-generic-3.2.29
-rw-r--r-- 1 root root 2.9M Sep 17 11:03 vmlinuz-generic-smp-3.2.29-smp
-rw-r--r-- 1 root root 5.6M Sep 17 12:11 vmlinuz-huge-3.2.29
-rw-r--r-- 1 root root 5.8M Sep 17 11:17 vmlinuz-huge-smp-3.2.29-smp
bash-4.2#

here is how i have my lilo.conf set now:
Quote:
# Linux bootable partition config begins
#image = /boot/vmlinuz
# root = /dev/sda1
# label =
# read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
# Linux bootable partition config begins
# initrd created with 'mkinitrd -c -k 3.2.29-smp -f ext2 -r /dev/sda1 -m mbcache:ext2 -u -o /boot/initrd.gz'
image = /boot/vmlinuz-generic-smp-3.2.29-smp
initrd = /boot/initrd.gz
root = /dev/sda1
label = 3.2.29-smp
read-only
# Linux bootable partition config ends
 
Old 02-04-2013, 10:20 PM   #12
darkstar61
Member
 
Registered: Sep 2012
Distribution: agnOStic
Posts: 46

Rep: Reputation: 12
Quote:
Originally Posted by club slacker View Post
here you go dude, am i all set to go now?
if you want the huge too you have to uncomment

Code:
#image = /boot/vmlinuz
# root = /dev/sda1
# label =
# read-only
and add a label, i guess, then run lilo that should add it

btw, can you now boot with the generic or you still have trouble?

Last edited by darkstar61; 02-04-2013 at 10:27 PM.
 
1 members found this post helpful.
Old 02-04-2013, 10:26 PM   #13
clubslacker
LQ Newbie
 
Registered: Feb 2013
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by darkstar61 View Post
if you want the huge too you have to uncomment

Code:
#image = /boot/vmlinuz
# root = /dev/sda1
# label =
# read-only
and add a label, i guess, then run lilo that should add it
Ok, thanks man. Excuse my ignorance, but a couple more quick questions...

The point of using a generic kernel is to optimize the pc, right? Is there another use to why I would want to use the huge kernel in the future?

I originally had both the kernels listed in my lilo.conf file, but i couldn't figure out which one was being run by computer at bootup so thats why i commented it out.
 
Old 02-04-2013, 10:35 PM   #14
darkstar61
Member
 
Registered: Sep 2012
Distribution: agnOStic
Posts: 46

Rep: Reputation: 12
Quote:
Originally Posted by clubslacker View Post
Ok, thanks man. Excuse my ignorance, but a couple more quick questions...

The point of using a generic kernel is to optimize the pc, right? Is there another use to why I would want to use the huge kernel in the future?

I originally had both the kernels listed in my lilo.conf file, but i couldn't figure out which one was being run by computer at bootup so thats why i commented it out.
the reason to keep the huge as an option is that if something goes wrong with the generic (eg. i had trouble after installing amd proprietary drivers) you can still boot into your box

i guess you have to label the huge to see it at boot time > eg. label = huge
 
Old 02-05-2013, 03:32 AM   #15
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
As others have said, if you instantly disable the huge kernel, you're just assuming the generic one will work. It's best to keep the huge kernel as a backup at least until you're sure the generic one boots.
Quote:
Originally Posted by clubslacker View Post
this is the error that i get on startup:
Code:
no kernel modules found for linux 3.2.29
 mount: mounting /dev/sda1 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 things are done.
It looks to me like you did not build in your file system to the initrd...? From your OP:
Quote:
Originally Posted by club slacker View Post
Code:
mkinitrd -c -k 3.2.29-smp -f ext2 -r /dev/sda1 -m mbcache:ext2 -u -o /boot/initrd.gz
You built in support for ext2? Are you using ext2? I ask this because clearly you are not using it for / and because most are using at least ext3 or more commonly ext4 nowadays.

This is how I build an initrd for the 3.2.29 generic kernel
Code:
# mkinitrd -c -k 3.2.29-smp -m ext4
Or you can grab the source for e.g. 3.2.37 and compile against the 3.2.29 generic config and build ext3/ext4/whatever fs into the kernel and avoid needing an initrd.

Last edited by cynwulf; 02-05-2013 at 08:24 AM.
 
  


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
[SOLVED] setting up initrd / generic kernel in Grub2...can't load generic Ubunoob001 Slackware 12 03-20-2015 07:32 AM
Kernel panic with generic kernel Slackware 13.1 goodadamgood Slackware 3 01-31-2011 04:57 PM
How to compile debian kernel source into a generic kernel? linus72 Debian 3 04-29-2010 08:50 PM
[generic] Ubuntu and Fedora - Switching numtre Linux - General 4 01-25-2009 11:46 AM
slack 12, switch to generic kernel from huge kernel, using grub? jaguarrh Slackware 8 09-19-2007 06:29 AM

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

All times are GMT -5. The time now is 08:22 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