Upgrade to 11.10 stopped and cannot boot anymore

Asked by Enrique on 2011-10-20

Upgrade to 11.10 stopped and cannot boot anymore on either generic or recovery in any past version
Can I restart the upgrade? How can I save the info? I have a lot of stuff I don't want to lose...
Any help would be great.

Question information

English Edit question
Ubuntu linux Edit question
No assignee Edit question
Last query:
Last reply:
Alessandro Menti (elgaton) said : #1

I think the best way is to save your files and reinstall Ubuntu from scratch.

First of all, I need to know where your files can be backed up - have you got another computer, a CD/DVD burner or an external hard drive handy?

Enrique (enriquesegni) said : #2

External hard drive available, also installed 9.10 side by side and have access to the hard drive containing the remains of 11.04

Alessandro Menti (elgaton) said : #3

The first step, since you said that you cannot boot either version, is to create an Ubuntu 11.10 CD/USB key if you don't have one. If you don't and have the CD/boot media for the 9.10 version, just boot from there, download the Ubuntu 11.10 ISO from the Internet and create a boot USB key using the USB Disk Creator program (it can be found in the Applications menu). Otherwise, ask a friend to create it.

Second, boot Ubuntu 11.10 from the CD/key you've just created. Do not choose to install Ubuntu yet, select to try it from the CD if asked.
Connect your external hard drive, Ubuntu should mount it automatically. The Nautilus window detailing its contents should open, if not do it manually. Using Nautilus, mount the internal drive as well (the one that contains the "remains" of the 11.04 installation).

Take note of the paths where the drives have been mounted: in the following, I will assume they are respectively "/media/olddrive" and "/media/newdrive".

Open a Terminal window and issue the following commands, replacing "<your user name>" with your user name:
cd /media/olddrive/home/<your user name>
tar czvf /media/newdrive/my_data.tar.gz .
then close the Terminal window. This will create a tar.gz compressed archive of your home directory, where your files and preferences are stored. (I have decided to create a tar.gz archive so that permissions will be preserved during the copy). During the creation, tar will output the name of all the files that have been included into the archive. Make sure your most important files are listed in there; if not, do not proceed and double-check the commands you entered.

If you have stored other data, such as configuration files in /etc, databases in /var..., copy them to the external drive as well.

Unmount the external and internal hard drives (disconnect the external hard drive after unmounting it, just for safety's sake), then double-click on the "Install" icon on the desktop. Proceed through the installation, choosing to format the old Ubuntu partition and to install Ubuntu 11.10 from scratch.

After you have rebooted at the end of the installation, when the GRUB menu is shown choose to boot Ubuntu in rescue mode. When prompted, choose to enter a shell with root privileges.
Connect the external hard drive, then, after five or ten seconds, type "dmesg". The last lines should be similar to these:
[ 2.360308] sd 4:0:0:0: Attached scsi generic sg2 type 0
[ 2.361015] sd 4:0:0:0: [sdb] 7856127 512-byte logical blocks: (4.02 GB/3.74 GiB)
[ 2.361511] sd 4:0:0:0: [sdb] Write Protect is off
[ 2.361516] sd 4:0:0:0: [sdb] Mode Sense: 45 00 00 08
[ 2.362011] sd 4:0:0:0: [sdb] No Caching mode page present
[ 2.362014] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 2.364014] sd 4:0:0:0: [sdb] No Caching mode page present
[ 2.364018] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 2.365520] sdb:
[ 2.367633] sd 4:0:0:0: [sdb] No Caching mode page present
[ 2.367637] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 2.367640] sd 4:0:0:0: [sdb] Attached SCSI removable disk
[ 2.548025] usb 4-2: new full speed USB device number 2 using uhci_hcd
In this case, the "sdb" between square brackets tells you that the device corresponding to your external hard drive is "/dev/sdb" (yours will be probably different, e.g. "sdc", "sdb1"...). We can now mount the external hard drive again and restore the files using these commands (replace "<your user name>" with the user name you chose during installation and "sdx" with the device name found through dmesg, and do not type lines starting with "#", I have added them as a comment only):
# Create the mount point
mkdir /media/exthd
# Mount the external hard drive to /media/exthd
mount -o ro -t auto /dev/sdx /media/exthd
# Make sure that the drive has been mounted correctly
ls /media/exthd
# The command above should output a list of all the files stored on
# the external drive. If the listing is not correct, you've probably
# mounted the wrong device - just type "umount /media/exthd"
# and redo the mounting, choosing the right device name.
# Expand the files
cd /home/<your user name>
tar xzf /media/exthd/my_data.tar.gz

# If you need to restore additional files you copied before reinstalling Ubuntu,
# do it now. The syntax for the commands you'll need to use is:
# mkdir dir = create the directory "dir"
# cp /old/path /new/path = copy a file from /old/path to /new/path, wildcards
# (such as *, ?...) are allowed

# Unmount the external drive
umount /media/exthd
rmdir /media/exthd
# Fix the permissions so that the files copied from the old home directory
# belong to the new user you created during installation
chown -R <your user name>:<your user name> .
# Switch to graphical login, closing the rescue shell
telinit 2

Some of your global preferences (system login theme...) will be lost, and you'll have to reinstall all programs, but your personal data and preferences will be there.

After you are *absolutely sure* that all your data has been restored, delete the "my_data.tar.gz" file on the external drive if you want to free space.

If you need further clarifications, just let me know.

Can you help with this problem?

Provide an answer of your own, or ask Enrique for more information if necessary.

To post a message you must log in.