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 07-02-2009, 10:14 PM   #1
damienog
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Rep: Reputation: 0
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 know, I know, I was foolish...
 
Old 07-02-2009, 10:28 PM   #2
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Use the DVD or CD-1. Read the first page instructions carefully. You'll notice a line that begins, "In a pinch, you can boot your system. . . ."
 
Old 07-02-2009, 10:35 PM   #3
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
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.
 
Old 07-02-2009, 10:39 PM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
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
 
Old 07-02-2009, 10:43 PM   #5
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by GrapefruiTgirl View Post
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
 
Old 07-02-2009, 11:34 PM   #6
damienog
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thumbs up My Kernel Kockup

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.
 
Old 07-03-2009, 02:11 AM   #7
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by damienog View Post
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.)
 
Old 07-03-2009, 05:01 AM   #8
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 533

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by damienog View Post
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 /boot
mkdir backup
mv vmlinuz* \
config* \
System-map* \
backup

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)
 
  


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
Looking for information to create my own root filesystem webquinty Linux - Newbie 3 06-10-2009 08:31 AM
LiveCD of 4.1 with reconfigured kernel fails at desktop LinuxTexan Puppy 0 11-26-2008 08:24 AM
Some information for creating ext3 filesystem small_boy22 Slackware 2 02-01-2006 11:13 AM
my reconfigured kernel doesn't recognize /dev/scd0 doublefailure Linux - General 6 09-01-2002 05:13 AM
My reconfigured Kernel problems :( Hegemon Linux - General 1 07-27-2002 05:01 AM

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

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