Jump to content

recoverring from kernel recompile


Guest Brit
 Share

Recommended Posts

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

Link to comment
Share on other sites

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 :D

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 :lol: ...until I googled :lol:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!!!

Link to comment
Share on other sites

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>)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...