PDA

View Full Version : [ubuntu] 9.10: any way to restore unbootable system?



The Question
July 11th, 2010, 05:48 PM
Hello,

I updated 9.10 and system crashed during update and is now unbootable. It seems to freeze (or is just taking a really long time) at fsck. Is there any way to make my computer usable again without reinstalling the whole OS?

Naitsirhc Hsem
July 11th, 2010, 05:50 PM
You might be able to boot into the live cd and use gparted to check the disk

The Question
July 11th, 2010, 06:17 PM
Ok, I did this but gparted didn't find any errors and restarted into same problem. Any other ideas? Is there not simply some way to copy over the original system files from the live cd?

alexshr
July 11th, 2010, 09:30 PM
Since during system upgrade the filesystem is changed, so the system needs to fix all the references of the filesystem, that might be the reason why system is taking long time to recover.

How long the system is taking, if is less than half an hour that should be just fine. If you can opt to install the system and preserve your home folder then you can backup your home folder and re-install the system and later on replace your homefolder again.

ov3rcl0ck
July 11th, 2010, 09:42 PM
Its probably nothing to do with FS corruption, merely updating won't change your filesystem type, or do any low level or major changes to your FS.

Problem most likely is aptitude was cut short during installing something vital. Best thing to do is use apt/dpkg to remove unfinished package installs, and restart the upgrade. This will, of course, have to be done completely in command line(start in recovery mode and open a netshell, login as root) you may have to use an old kernel version if you didn't uninstall previous kernel versions.

You just have to do this in command line:


aptitude -f install
aptitude autoremove
aptitude autoclean


Then to upgrade and update:


aptitude update
do-release-upgrade
aptitude update
aptitude dist-upgrade

oldfred
July 11th, 2010, 11:23 PM
From liveCD so everything is unmounted and change partition sda1 to your install partition
sudo e2fsck -C0 -p -f -v /dev/sda1
if errors:
sudo e2fsck -f -y -v /dev/sda1

If you have to you can chroot into your system and run repairs.

kansasnoob- one line version using &
http://ubuntuforums.org/showpost.php?p=8068512&postcount=10
http://ubuntuforums.org/showthread.php?t=1470597

Once chrooted:
Commands once in chroot:
#houseclean
apt-get autoclean # only removes files that cannot be downloaded anymore (obsolete)
apt-get clean
#refresh
apt-get update #resync package index
apt-get upgrade #newest versions of all packages update must be run first
#would upgrade you to the latest kernel in the repositories
#dist-upgrade is also able to remove existing packages if required
apt-get dist-upgrade
apt-get -f install
dpkg --configure -a