Ubuntu 10.10 doesn't boot after crashing during update.

Asked by Javier Ivona

I'm using Ubuntu 10.10. It's the only OS I have on my laptop. I hadn't updated it for over two months, and one day I started the update. It downloaded about 300 MB of updates and then started installing. While it was doing its job applying all the updates it had downloaded I had some 2 or 3 PDF files open, Amarok and a folder. Suddenly the computer crashed; mouse was dead, so was the keyboard. The computer stopped completely; I wasn't able to reboot it even with "sys rq + R + E + I + S + U + B", to give an idea. I had to kill the power to shut the PC down. But then, when I tried to turn it back on, it started booting up and then the following text showed up (shown in-between quotes):

"
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[ 2.663902] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... done.
[ 2.916522] EXT4-fs error (device sda1): ext4_ext_check_inode: inode #262245: (comm init) bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)
[ 2.916683] EXT4-fs error (device sda1): ext4_ext_check_inode: inode #262245: (comm init) bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)
[ 2.916857] Kernel panic - not syncing: Attempted to kill init!
[ 2.916887] Pid: 1, comm: init Not tainted 2.6.35-24-generic #42-Ubuntu
[ 2.916918] Call Trace:
[ 2.916937] [<ffffffff81587061>] panic+0x90/0x111
[ 2.916965] [<ffffffff8106388d>] forget_original_parent+0x33d/0x350
[ 2.916995] [<ffffffff81062cb4>] ? put_files_struct+0xc4/0xf0
[ 2.917023] [<ffffffff810638bb>] exit_notify+0x1b/0x190
[ 2.917050] [<ffffffff810652f5>] do_exit+0x1c5/0x3f0
[ 2.917074] [<ffffffff81065575>] do_group_exit+0x55/0xd0
[ 2.917101] [<ffffffff81065607>] sys_exit_group+0x17/0x20
[ 2.917129] [<ffffffff8100a0f2>] system_call_fastpath+0x16/0x1b
[ 2.917209] panic occurred, switching back to text console
"

All I need is the log-on screen back on; there's a great deal of valuable information in the computer. Please, if there's somebody out there who can help me, I'd really be thankful.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Solved by:
Sam_
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Sam_ (and-sam) said :
#1

> [ 2.917209] panic occurred, switching back to text console

Is there a tty (virtual console) which allows to type commands?

Could it be disk space is running out due to 300 MB update?

Is there a chance to get into recovery mode via boot menu, [Shift] key after boot.

Repair attempts.
Try to switch either to tty: ctrl+alt+f1
Or try recovery mode and drop to root shell.
Or boot from LiveCD and chroot into installed system.

Then try to complete the update.
apt-get update
apt-get upgrade
apt-get -f install

Clean-up package cache.
apt-get clean
apt-get autoclean
apt-get autoremove

https://help.ubuntu.com/community/LiveCdRecovery

Revision history for this message
Javier Ivona (javier-ivona) said :
#2

I already tried to chroot into Ubuntu with the Ubuntu 10.10 Live CD, but when I mount the home partition and run "sudo chroot /media/Ubuntu", a message shows up that reads: "chroot: failed to run command `/bin/bash': Exec format error"

Any idea why I can't get it to work?

Revision history for this message
Sam_ (and-sam) said :
#3

> /bin/bash': Exec format error

Is architecture from LiveCD the same as installed system? e.g. 64bit=64bit, 32bit=32bit

After drive is mounted try
sudo chroot /media/<xyz> /bin/bash

Revision history for this message
Javier Ivona (javier-ivona) said :
#4

I'm using the 64-bit version. As I was trying to chroot into my 64-bit Ubuntu with one of those CDs they send you for free from their site (32-bit ones), the architecture from the LiveCD wasn't the same as the one in my laptop. That turned out to be the reason I wasn't being able to successfully chroot into Ubuntu. I then downloaded the 64-bit disc from the Ubuntu site, burnt it on a disc and repeated the process. This time I was able to chroot into Ubuntu, and I performed all six steps you proposed earlier:

apg-get update
apg-get upgrade
apg-get -f install
apg-get clean
apg-get autoclean
apg-get autoremove

Everything was carried out by the system, as evidenced by the positive messages that came up on the console. Nevertheless, this seems not to be the problem, for when I finally rebooted and tried to enter Ubuntu the usual way I didn't get the log-on screen, but the same error banner detailed in my first post.

I seem to be running out of alternatives here, I'm sort of worried. Please send more suggestions...
Thanks Sam_ for all the help you are providing me with.

P.D. To answer one of your earlier queries, I let you know that I am not running out of disk space; that is certainly not an issue.

Revision history for this message
Best Sam_ (and-sam) said :
#5

> same error banner detailed in my first post.

Which was
> EXT4-fs error (device sda1): ext4_ext_check_inode: inode #262245: (comm init) bad
> header/extent: invalid magic - magic 0

and means to go deeper into repairing file system (fsck, testdisk) and hoping it isn't a hard drive failure.
https://help.ubuntu.com/community/SystemAdministration/Fsck
http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step
https://help.ubuntu.com/community/TestingStorageMedia

e.g.
via LiveCD (sda1 must not be mounted, since new LiveCDs mount automatically it must be unmounted), then try:
sudo fsck.ext3 -v -f /dev/sda1

If there are to many questions to answer you can stop with ctrl+C
and restart again with:
sudo fsck.ext3 -y /dev/sda1

Reference.
man fsck.ext3

Examples of repair attempts from other users.
https://answers.launchpad.net/ubuntu/+question/9120
https://answers.launchpad.net/ubuntu/+question/67354

Rescue CD.
http://www.sysresccd.org/Main_Page

Worse case scenario was new installation.
http://www.linuxquestions.org/questions/linux-hardware-18/ext4fs-error-occurs-periodically-800209/
http://ubuntuforums.org/showthread.php?t=1513152

Revision history for this message
Javier Ivona (javier-ivona) said :
#6

Unfortunately for me, there was no successful solution when trying to restore my 64-bit Ubuntu 10.10 to normal functionality. This means I'll have to reinstall Ubuntu. As my files are encrypted and I can't get access to them, I shall lose them all. I already attempted to access those files by booting up with the rescue disk you suggested, but chrooting into Ubuntu and using all the tools available through the ecryptfs-utils package in Ubuntu gave no positive results.

It's not been a happy ending for me this time; I hope this serves as a lesson and I'll try and backup my files with certain regularity to prevent future misfortunes from depriving me of access to my files.

Thanks again for all the help, Sam_
-Javier.

Revision history for this message
Javier Ivona (javier-ivona) said :
#7

Thanks Sam_, that solved my question.

Revision history for this message
Sam_ (and-sam) said :
#8
Revision history for this message
Javier Ivona (javier-ivona) said :
#9

I'll try your last suggestion...

Revision history for this message
Javier Ivona (javier-ivona) said :
#10

You wouldn't believe it, Sam_, but I tried that last method you proposed, and it WORKED!!! I couldn't believe it when I finally saw a message reading "Mounted eCryptfs". I went to the folder I had mounted my encrypted "home" on, and it was all there, 80+ GB of restored information. Again I thank you, now with a different excitement, for all the help you provided me with, Sam_.
It worked.

Revision history for this message
Javier Ivona (javier-ivona) said :
#11

Thanks Sam_, that solved my question.

Revision history for this message
Sam_ (and-sam) said :
#12

Congratulation, *you* have done a great job.