Edgy to Feisty upgrade failed - system unbootable

Asked by Mick Kielhauser

Last Sunday I ran the update from Edgy to Feisty via upgrade manager. I made sure everything was up to date before starting. The upgrade ran fine until the end when I ran into Bug # 95631 and the upgrade aborted.

The system now hangs on boot w/o any error message. I browsed the answers and tried the following:

1. Boot from Edgy CD, fsck /dev/sda1 -> no errors present (same for fsck.ext3), CTRL + ALT + F1, sudo init 1, mkdir /media/sda1, mount -t ext3 /dev/sda1 /media/sda1, mount --bind /proc /media/sda1/proc, mount --bind /dev /media/sda1/dev, chroot /media/sda1 /bin/bash

Here's now a difference to what is described in the other answer, instead of getting "root@ubuntu" I get "I have no name !@ubuntu" which seems to be a problem, because every command (except bash internal ones) causes a segmentation fault.

2. Tried the same steps when booted from the Feisty CD -> same result

3. Tried to do an upgrade from the Feisty CD (ALT + F2, gksu "sh /cdrom/cdromupgrade"). Nothing happens.

If I mount sda1 in a terminal window I get access when using sudo, otherwise the OS complains about access rights. Am I right when I think that I somehow have no rights to access my hard drive?

Any advice would be really appreciated. While I have a backup of the vital data redoing all the customising would be a real pain.
By the way, I have extensively worked w/ Solaris, AIX and HP-UX but I'm a novice on Linux, so please be gentle should I have overlooked something basic. Many thanks,

Warm regards

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
Huygens (huygens-25) said :

Did you tried the workaround mentioned in the bug report? Here it is:
Workaround: comment lines "/etc/init.d/postfix stop" from /var/lib/dpkg/info/postfix.prerm
and execute "sudo apt-get -f install"

However, you would need access to your system... So when you boot your PC, there is a menu where you can choose Ubuntu, older kernel, recovery mode, Windows, etc. Could you choose the recovery mode? Can you manage to boot in this mode? If yes, could you perform the above workaround?

If this does not work, there is another solution, but I never done it, and only know the theory. I would boot with the Live CD, either Feisty or Edgy. Feisty would be recommended. Once the Live CD session is ready, you should try to mount your hard disk partition in a chroot environment. If you are very familiar with UNICES, then you maybe even know how to do it :-) should not be that different than on Solaris, AIX or HPUX. Maybe there are some nice howtos on internet about chroot, but I do not know any. When you have your chroot environment, try to perform the workaround.
I do not know how you have set-up your partitions, but you need to have at least (maybe more) /boot /usr /etc / and /var (the one that are of no use are: /media /mnt and /home) to be able to perform the workaround.

Revision history for this message
Mick Kielhauser (mick-kielhauser) said :

Hi Huygens,

Many thanks for your reply and your suggestions. That's what I have done:

I tried Recovery mode after pressing <ESC> in the GRUB menu. It did the same thing just hang w/o any error message (I waited for half an hour just to be sure).

Today I found this workaround"
1. Boot live CD (used Feisty)
2. Press CTRL-ALT-F1
3. sudo su -
4. mount /dev/sda1 /mnt
5. chroot /mnt
>>> And here I think where the problem is, my prompt changes to "I have no name!@ubuntu:/# ". Every command I run from there causes a segmentation fault.

I can mount the HD and w/ the above method get full access, but es soon as I use "chroot" it falls down. I checked for the file you mentioned (postfix.prerm) and it's not present in the directory (lots of other *.prerm are).

So it seem to boil down to the problem that I cannot chroot to my harddrive and restart the upgrade.

Any ideas? I'd really hate to wipe the disk. Many thanks for your help and patience,

Greetings Mick

Revision history for this message
Kjell Braden (afflux) said :

Segmentation Fault for any command you run? This sounds quite bad, your RAM could be corrupt. Do you have another (running!) system on the same computer? Did you try the memtest86+ option from the grub-bootloader?

Revision history for this message
Kjell Braden (afflux) said :

ignore this post please, I accidentally chose the wrong button for answering...

Revision history for this message
Mick Kielhauser (mick-kielhauser) said :

Hello Kjell,

Many thanks for your update. Well, I think my memory is fine as I can boot the Ubuntu CD, no problems and use all services (I write most of the updates that way). The segmentation fault *only* happens when I do the chroot to the hard drive.

One post in another thread mentioned that after chroot the prompt should change to something like "root@ubuntu#" but mine looks like "I have no name!@ubuntu:/# ". I have a feeling there is something w/ access rights but I'm not sure. I believe have seen a similar message on Solaris when the file system is corrupt but I have run fsck several times and it never reported any problems.

Has anyone ever seen that before?

Greetings Mick

Revision history for this message
Best Huygens (huygens-25) said :

I do agree too that the memory problem is not relevant here.

Searching a bit around on Internet, I have found that you might have 2 reasons why you get this "I have no name!" and segmentation fault:
  - the user id of the Live CD is not existing in your hard disk installation and bash cannot resolve the name
  - The C library (glibc) is not accessible inside your chrooted environment
Seeing that you have segmentation fault, I would think the second is the right one... But just in case, when creating the chrooted env, you should make sure you are root, perhaps in this case I would do (something that I tend to avoid...):
sudo -s
Then you are root. Perform the chroot command and at least bash should recognise you as root, or we are in the second case.
Try to go under /lib and see if you have a libc.so*
Then try ldd on a command like:
ldd /bin/tar
Does it find the necessary library to be executed?
If not, then you could try to tweak your LD_LIBRARY_PATH, I guess you now that one from the other UNIX systems ;-)

Revision history for this message
Mick Kielhauser (mick-kielhauser) said :

Thanks Huygens, that solved my question.

Revision history for this message
Mick Kielhauser (mick-kielhauser) said :

Hi Huygens,

You're a star, this was exactly the information I needed (I know, I also have Google available. Is it a good escuse to say I had some really busy [=bad] days in the office?). As far as I can tell, it wasn't just libraries missing but the executables were already updated and the libraries were not.
I had two options either copy over the /lib directory or link it into the HD. I chose the second option and I leave the commands below in case they might help somebody else:

sudo su -
mount /dev/sda1 /mnt (your actual device might be different)
mkdir /mnt/altlib
mount --bind /lib /mnt/altlib
export LD_LIBRARY_PATH=/altlib:/lib
chroot /mnt

And, Hey presto, it worked! Of course, life being what it is, it still won't boot but I get a decent error message now (glibc not found) and I remember I have seen a message here that an upgrade sometimes screws up the lib path on boot. I'm going to unearth that and then I should be on my way.
So thanks again for you patient support and also my thanks to Kjell for his response. Hope you'll have a good day,

Greetings Mick