Reconfigured Kernel - without filesystem information
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.
Reconfigured Kernel - without filesystem information
Oops, made a "blue". Stupid me, I've reconfigured the kernel and ignored all the correct procedures. This means that I got the barebones configuration without using my old config as a base.
Now I can't boot into my beloved Slackware 12 (typing this in Windoze) because the system doesn't know how to mount root.
I would be very grateful for some advice as to the best way to go about correcting this, preferably without having to reinstall all of my fruit. Can a sort it out with a live distro like DSL or Knoppix?
I don't know whether Slackware users generally boot off initrd, but I recommend ALWAYS using initrd to boot your system, because it can load the necessary modules off the kernel on boot.
Without initrd, you'll need to compile in (not as <M>) not ONLY all the required filesystem information but also the IDE/SATA/PATA/SCSI/RAID/whatever chip-set drivers to recognize the hard drive device and the partition information.
The chances of a kernel panic without initrd are much greater. Sometimes even missing one small config can lead to a kernel panic. initrd will at least give you a booting system even if you miss some functionality which you can always add later.
Avoid the trouble of an unbootable system. Keep an existing working kernel in hand always. Compile everything as modules in your custom kernel as in the pristine kernel from kernel.org and use initrd (mkinitrd) http://linuxcommand.org/man_pages/mkinitrd8.html
initrd saves you having to find out all this information.
Last edited by vharishankar; 07-02-2009 at 10:39 PM.
FWIW, I have NEVER used an initrd. The odd time I haven't been able to boot due to human error I just use my CD or DVD, and chose the huge26 kernel. Once booted, I fix the screwup and reboot normally.
Handy rule: Never leave yourself with only ONE (or NONE) kernel images to choose from. ALways keep an old one or two or 1/2 dozen around in your bootloader. Then this doesn't happen
FWIW, I have NEVER used an initrd. The odd time I haven't been able to boot due to human error I just use my CD or DVD, and chose the huge26 kernel. Once booted, I fix the screwup and reboot normally.
Handy rule: Never leave yourself with only ONE (or NONE) kernel images to choose from. ALways keep an old one or two or 1/2 dozen around in your bootloader. Then this doesn't happen
Sasha
Personally I always use a stock kernel or a distribution-supplied kernel as backup. That's another issue as well.
Even I never used it before on my custom compiled kernels. But after a few successive frustrations of kernel panic on the custom kernel and having no idea what config I missed (I had compiled in everything required, including Filesystem and SATA drivers etc.), I realized it was more trouble than worth it to find out EXACTLY which kernel option was leading to this and went with initrd.
Sometimes even something as simple as lack of memory to load the kernel's modules can lead to a kernel panic. Or maybe some particular drivers need to be loaded as modules rather than as built-in. I don't know exactly why this should be so, but it does happen in my experience.
You can still get everything you need without initrd, but I now realize how much of a boon it is.
Anyway it's just one additional step in the kernel compilation process and is useful.
Last edited by vharishankar; 07-02-2009 at 10:52 PM.
Reason: Z
Thank you all very much for your fast reponses. I bring the disc in tomorrow and go for it - and I will always keep a clean Kernel as backup from now on.
Thank you all very much for your fast reponses. I bring the disc in tomorrow and go for it - and I will always keep a clean Kernel as backup from now on.
If your existing kernel is still in /boot/ but you simply didn't have an entry in LILO or whatever, you can just use a GRUB rescue disk to boot that kernel (provided you know it's name and path etc.)
Thank you all very much for your fast reponses. I bring the disc in tomorrow and go for it - and I will always keep a clean Kernel as backup from now on.
when you do a backup, don't forget the modules,
e.g., before you install a new kernel:
cd /lib/modules
mkdir -p backup
mv $(uname -r) backup
then, if anything goes wrong, boot with a live system,
mount the partition and move back the backup
(and recreate the symbolic links
ln -sf vmlinuz-previous_version vmlinuz
etc, assuming you're using the name vmlinuz in your
boot loader (that's what I do) and not
vmlinuz-some_version)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.