Help - Search - Members - Calendar
Full Version: recoverring from kernel recompile
MandrivaUsers.org > Advanced Topics > Command Line, Kernel and Programming
Brit
Hi guys

just a quick question, i tried to recompile my kernel, and made some mistakes. So when i boot i get the error message Kernel Painc: No Init found.

Can i just delete the new kernel i created and go back to the old one, or will that cause more problems.

Sue
bvc
Depends....
1. Did you do make install?...or edit the bootloader/make symlinks yourself?
2. Do you have an entry for the old kernel, and can you currently boot to it?

ls /boot
cat /etc/lilo.conf (for lilo)
cat /boot/grub/menu.lst (for grub)
phunni
oh dear - following my advice, and your system is broken. Sorry! oops.gif
bvc
nah...it can be fixed :wink:
ramfree17
QUOTE
oh dear - following my advice, and your system is broken.  Sorry!  :oops:


my off-topic reply. its about time i use that thread again. :#:

ciao!
Gowator
Well First things first, recovery of the status qou

Do you only have one entry in your lilo startup ???

I expect the old one(s) is/are there too.
If you can re-start but choose an older kernel that was working before. You did keep them ??

Try this and post back!!!
Worst case scenario is you burn a copy of Knoppix and then download the old kernel but I doubt it would come to this!!!

If you can't start a different kernel we'll try the rescue boot from Cd1 and fix lilo from there but if you can boot a different kernel lets try this way first.

Its easier fixing it once something is running biggrin.gif
Brit
Ok

Im not really sure what i did wrong when i was recompiling but i must of missed something.

lilo.conf:

image-/boot/vmlinuz-2.4.21-2.4.21-0.13NewKernel.19Oct2003
label=2421-2421
root=/dev/hdb1
read-only
optionla
append=" devfs=mount acpi=off"
initrd=/boot/initrd-2.4.21-2.4.21-0.13NewKernel.19Oct2003

He lilo boot screen gives me several options

linux
failsafe
windows
2421-2421

i tried linux, failsafe and the 2421-2421 and i get the same error message.

I did make copies of everything so can i just revert back to the original and delete the new one i created.

Sue
Gowator
First off don't take me seriously its 4AM and im just back from the pub....


But at first glance it doesn't look like you ran lilo after your kernel install...

BUT wait till someone responsible responds OR Im sober!!!!
bvc
the lilo boot screen wouldn't show '2421-2421' if lilo wasn'r run afterwards. Your initrd is not an image (.img) did you;

mkinitrd /boot/initrd-2.4.21-2.4.21-0.13NewKernel.19Oct2003.img 2.4.21-2.4.21-0.13

or what ever is shown in /lib/modules. No initrd image will cause a kernel panic everytime. I didn't mkinitrd on my first kernel compile and about freaked with a kernel panic laugh.gif ...until I googled laugh.gif
Brit
hi i dont think i did do the

mkinitrd /boot/initrd-2.4.21-2.4.21-0.13NewKernel.19Oct2003.img 2.4.21-2.4.21-0.1

I also have 3 things in lib/modules

2.4.21-0.13mdk
2.4.21-0custom
2.4.21-2.4.21-0.13NewKernel.19Oct2003

Sue
bvc
Since
vmlinuz-2.4.21-2.4.21-0.13NewKernel.19Oct2003
is in /boot and lilo.conf....I'd assume you should use
initrd-2.4.21-2.4.21-0.13NewKernel.19Oct2003.img

But only you know which was the kernel compile you want to boot. Take a look in
/usr/src/linux/Makefile
and see what the EXTRAVERSION=
says and use that one, IF, the last compile was the hopeful successful one.
Brit
hi

One last question (well probably not :wink: )

Seeing as i didnt do the mkinitrd command i thought i would do it and see if it changes anything.

Well at the CLI i type in

mkinitrd /boot/initrd-2.4.21-2.4.21-0.13NewKernel.19Oct2003.img 2.4.21-2.4.21-0.1

and i get command not found. Is that because i am running it from the rescue cd :?:

Sue
Gowator
chroot to /mnt (after mounting your partitons)

BUT...
Your lilo.conf is not used!!!!
IF it was you would get the options in lilo.conf...

This means either it wasn't run or it failed.
I think the latter becuase of the lack of making the initrd ....

IF you do run it (ie chroot to /mnt and then type lilo) you will only have the 2.4.21-2.4.21-0.13NewKernel!!!!!

You need to add your old entries first!!!!
Hopefully you have a copy (perhaps ebven an .prmsave) in /etc.....

Check it has the right kernel images and run this one....
i.e. get your old kernel activated and working....
Once it is and you can boot into linux you can fix the new install.
If your new kernel works then youll be OK, but if not ..... your back to rescue .... so I'd get it running angain first!!!
bvc
yes. From rescue mode you'll need to chose

'mount your partitions under /mnt'
go back to rescue gui and chose
'go to console'
then run
chroot /mnt
then the mkinitrd command. If still not found, try
/sbin/mkinitrd
if still not found do
which mkinitrd
and enter the path (ie... /usr/sbin/mkinitrd <command>)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.