SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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#
# 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.
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...
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
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
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.
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
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
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.
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
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
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.
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
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
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:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.