LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-14-2009, 11:59 PM   #1
wgato
Member
 
Registered: Jun 2006
Distribution: ubuntu slax dsl
Posts: 40

Rep: Reputation: 15
crash and kernel reinstall?


i think i need to reinstall my kernel.

i rebooted my machine yesterday and it wouldnt start back up. It hung on the ubuntu splash screen. I tried a few more times and then booted in recovery mode and saw that it was getting stuck at:
Init: Error parsing configuration: No such file or directory
Kernel panic - not syncing: Attempting to kill init!

I have 3 other kernels to choose from, I tried all 3 and all 3 hung at the same spot. Googling seems to imply reinstalling the kernel...? Does that sound right?
How would I go about that without a livecd? I dont have a cdrom drive but I do have another os on a usb thumb drive I can boot from. (btw, i can boot from this drive and see my other drive that ubuntu is on and all the directories and folders seem to be there.)
If I reinstall the kernel will I lose the configuration files and such I have on there now?
 
Old 04-15-2009, 02:02 AM   #2
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by wgato View Post
i think i need to reinstall my kernel.
i rebooted my machine yesterday and it wouldnt start back up. It hung on the ubuntu splash screen. I tried a few more times and then booted in recovery mode and saw that it was getting stuck at:
Init: Error parsing configuration: No such file or directory
Kernel panic - not syncing: Attempting to kill init!
I have 3 other kernels to choose from, I tried all 3 and all 3 hung at the same spot.
It seems unlikely that all of your kernels would become corrupted at the same time. To reinstall your kernel, boot to recovery mode and run:
Code:
sudo apt-get --reinstall install linux-image-$(uname -r)
If that does not help, then boot to recovery mode and try rebuilding the initramfs. See this:
https://help.ubuntu.com/community/Up...0the%20Ramdisk
That command can also be run like this:
Quote:
sudo update-initramfs -u -v -k $(uname -r)

Last edited by tommcd; 04-15-2009 at 02:04 AM.
 
Old 04-15-2009, 04:26 PM   #3
wgato
Member
 
Registered: Jun 2006
Distribution: ubuntu slax dsl
Posts: 40

Original Poster
Rep: Reputation: 15
unfortunately, i am unable to boot in recovery mode. it stops at
Init: Error parsing configuration: No such file or directory
Kernel panic - not syncing: Attempting to kill init!
and i cannot type anything. i can get a command prompt in grub but it did not recognize either command.
 
Old 04-16-2009, 02:16 AM   #4
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by wgato View Post
unfortunately, i am unable to boot in recovery mode. it stops at
Init: Error parsing configuration: No such file or directory
Kernel panic - not syncing: Attempting to kill init!
Boot from the Ubuntu live CD. Open a terminal and run:
Code:
sudo mount /dev/sdXY /mnt
sudo chroot /mnt
sudo update-initramfs -u -v -k `uname -r`
sudo reboot
Replace XY with your Ubuntu root partition.
 
Old 04-16-2009, 07:38 AM   #5
wgato
Member
 
Registered: Jun 2006
Distribution: ubuntu slax dsl
Posts: 40

Original Poster
Rep: Reputation: 15
i dont have a working cd drive. i have a usb drive with backtrack on it i can boot from but it doesnt have apt-get. but this does give me something to work on. thanks!

Last edited by wgato; 04-16-2009 at 08:01 AM.
 
Old 04-16-2009, 05:26 PM   #6
wgato
Member
 
Registered: Jun 2006
Distribution: ubuntu slax dsl
Posts: 40

Original Poster
Rep: Reputation: 15
ok, my neighbor hates me but i have a cdrom drive now.
i booted the live cd and in terminal tried running those commands, but
sudo chroot /mnt
cannot run /bin/bash: permission denied.

i tried sudo su and then running the command as root but got the same error.
 
Old 04-16-2009, 09:15 PM   #7
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by wgato View Post
i booted the live cd and in terminal tried running those commands, but
sudo chroot /mnt
cannot run /bin/bash: permission denied.
i tried sudo su and then running the command as root but got the same error.
Did you mount your Ubuntu install from the live CD first before attempting to chroot? It should work. Try mounting and chroot-ing into your Ubuntu install as per the proceedure described here:
http://www.ubuntugeek.com/how-to-fix...isty-fawn.html
Then run this to reinstall the kernel:
Code:
sudo apt-get --reinstall install linux-image-$(uname -r)
Then reboot. If that does not fix it, then bot thelive CD again, mount and chroot into your Ubuntu install, and run:
Code:
sudo update-initramfs -u -v -k $(uname -r)
You can leave out the sudo if you chroot-ed with:
Code:
sudo chroot /media/feisty su
 
Old 04-18-2009, 04:45 PM   #8
wgato
Member
 
Registered: Jun 2006
Distribution: ubuntu slax dsl
Posts: 40

Original Poster
Rep: Reputation: 15
i followed those instructions exactly but seem to be having the same problem:

sudo mkdir /media/dice
sudo mount /dev/sda1 /media/drive
sudo chroot /media/drive su
chroot: cannot run command 'su': permission denied

i rebooted, changed to root user (sudo su) and tried the commands again (without sudo at the beginning) and got the exact same error.
i also tried leaving out the last 'su' which gives the error:
chroot: cannot run command '/bin/bash': permission denied

Last edited by wgato; 04-18-2009 at 04:47 PM.
 
Old 04-18-2009, 06:12 PM   #9
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
I don't know why you can not chroot into your Ubuntu install from the live CD. All I can suggest is to try it from another live CD like Knoppix. Or use DSL or what ever else you have handy.

It sounds like your Ubuntu install is really borked. If all else fails, consider doing a clean install of the new Ubuntu Jaunty RC CD. It is quite good.

Last edited by tommcd; 04-19-2009 at 12:10 AM.
 
Old 04-18-2009, 07:42 PM   #10
wgato
Member
 
Registered: Jun 2006
Distribution: ubuntu slax dsl
Posts: 40

Original Poster
Rep: Reputation: 15


i do have a 256mg thumb drive with DSL on it... somewhere. i'll look in that.
and ask nicely to get sent a new ubuntu cd. that'll be a long time for my server to be down though. at least its in my price range.

thanks for all the suggestions, i really appreciate it.

wg (also from philly)
 
  


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
reinstall ndiswrapper after every kernel update? jacksmash Fedora 4 03-03-2007 05:15 PM
LXer: Smart way to reinstall Linux software after crash LXer Syndicated Linux News 0 08-24-2006 05:54 AM
Do I need to reinstall all drives after I upgrade my kernel babyboss Slackware 4 08-15-2005 07:41 AM
reinstall secure-kernel after deinstallation t2000 Mandriva 7 01-14-2005 02:48 PM
can't reinstall soundcard after customizing kernel LeechBot Linux - Hardware 11 09-08-2003 07:53 PM

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

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