LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Botched kernel compile, recover from CD? (https://www.linuxquestions.org/questions/slackware-14/botched-kernel-compile-recover-from-cd-86799/)

Zb7 08-28-2003 08:30 PM

Botched kernel compile, recover from CD?
 
Well the short of it is that I messed up my kernel compile, and I REALLY need to get it back (for obvious reasons) back to the way I had it. Network and sound don't work on it. And I really don't have the knowledge or the time to find what i did wrong to the old kernel. My vmlinuz.old somehow got transformed into a copy of my new kernel. I don't want to recompile a new kernel if I don't have to.

Is there anyway I can use the kernel install from the CD without installing the whole system over again? I selected bare.i and it recognized all of my hardware beautifully. I looked around the slack CD but I don't know what I can use. Any help on how to recover it from the Slack CD or some other source (NOT RECOMPILING) is greatly appreciated.

LSD 08-28-2003 11:23 PM

Just boot the Slackware CD, set up your source and target partitions (but *don't* format the latter ;)), skip the package selection and go straight to the configuration section., You should be able to skip everything except the kernel installation bit. One of the options you're given is to use a kernel from the installation CDROM. Select that and from the list provided, find and select bare.i. Skip the rest of the sections until you're back at the main Slackware installation menu then exit and reboot. With any luck bare.i should be reinstalled and your system should boot properly.

Zb7 08-29-2003 11:06 AM

You had the right idea. Slackware install won't let me skip right down to the configuration, so what I did was to do the install with only the base system changing. Slackware even offered to keep my old configuration files, how nice of it. So now everyone knows: If you mess up your kernel compile just install but only select the kernel packages from the list.

LSD 08-29-2003 11:58 AM

Actually, the procedure as I outlined it should have worked, it's exactly the same procedure I used to install the scsi.s kernel on a Slackware VM that I accidentally installed bare.i on rendering it unbootable....

lt1derful 08-29-2003 12:01 PM

Quote:

Originally posted by Zb7
Slackware even offered to keep my old configuration files, how nice of it. So now everyone knows: If you mess up your kernel compile just install but only select the kernel packages from the list.
Slackware is great...so far, I've yet to find a distro that even came close to my liking. JAMD is neat...but Slack is tha shiznit.

I always recompile; it doesn't take long if you know what areas you are having problems in. No sound? make xconfig and go to the sound section...check settings, make changes. save, exit...make bzImage and so on.

But, the Slack setup CD is a great recovery tool as well. Glad it helped save the day for you.

LSD 08-29-2003 11:19 PM

It's hard to recompile when you can't even boot after a botched compile ;)

Seriously though, another good troubleshooting aid is a basic Gentoo LiveCD. I've used mine to rescue not only my own Gentoo system but also a Debian box suffering a severe case of "crappyinstalleritis".

eric.r.turner 08-31-2003 05:12 PM

I like to add a Linux_safe LILO boot option before I start playing around with kernel compiles. Simply copy a good vmlinuz to vmlinuz.safe, then make the necessary entry in /etc/lilo.conf (dont for get to run lilo!) That way if a newly-compiled kernel panics, you can choose Linux_safe to boot and fix the problem. ;)

lt1derful 08-31-2003 11:41 PM

Quote:

Originally posted by eric.r.turner
I like to add a Linux_safe LILO boot option before I start playing around with kernel compiles. Simply copy a good vmlinuz to vmlinuz.safe, then make the necessary entry in /etc/lilo.conf (dont for get to run lilo!) That way if a newly-compiled kernel panics, you can choose Linux_safe to boot and fix the problem. ;)
Me too...well, mine is vmlinuz.stable I think, but same thing. Always good to have backup.

srenar 09-01-2003 03:29 PM

this is what i do to recover from my blunder's

Recovering Linux
insert the slackware cd and boot the computer

login as root
then "mount /dev/hda1 /mnt"
then "chroot /mnt"
then "cd to /mnt/usr/src/linux"
then "make menuconfig" and recompile the Linux kernel.

Rodrin 09-02-2003 09:32 PM

It is always good to have a backup or safe option in lilo when you are compiling kernels. You can also use the Slack CD for a more straightforward approach to saving yourself. You can boot from it, login, but instead of running setup simply mount your file systems and copy the bare.i kernel (or whatever kernel you need) over to your installation, changing the name to vmlinuz or whatever name you have lilo pointing to.


All times are GMT -5. The time now is 12:12 AM.