After installing 15.10 from 14.04 I am locked out

Asked by Ricardo Diamondo

Last night I decided to upgrade from 14.04 to 15.10, I was told this could take an hour. After 2 hours I went to bed as it was still running. This morning I cannot log-in as I just get a black screen with Username & Password requests. Have tried all the passwords that I know for Ubuntu (I wrote them down) but still cannot log-in. Help! I wiped Windows years ago so Linux is my only system now. I am currently booting from an old 12.04.4 CD but have lots of information that I want to retrieve from my old 14.04. Is this an Administrator problem? Can I change that and still recover my information? Please help, I need so many things that I did not back-up, as I did not think that upgrading would lock me out.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Ricardo Diamondo
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

How did you perform the upgrade?

Revision history for this message
Ricardo Diamondo (dick-diamond2000) said :
#2

I downloaded online with ethernet connection.

Revision history for this message
Ricardo Diamondo (dick-diamond2000) said :
#3

I did it from a link on my software updater.

Revision history for this message
Daniel Savi (gaess) said :
#4

Very hard to tell why the update went wrong with so few information. You may set a new password for your system after booting from your live cd.
This page may help you find your way around:
https://help.ubuntu.com/community/LiveCdRecovery

To save your data, you may also boot from cd and then mount your harddisk. Attach an USB-Drive, mount it too, and copy your data over there.

Revision history for this message
Ricardo Diamondo (dick-diamond2000) said :
#5

Hi, I tried your suggestions but when I enter the line "sudo mount /dev/sdal /mnt" I get the message that "dev/sdal" cannot be found! This seems to be required for both Password Recovery and to fix the upgrade. I am a bit of a novice being quite old and not very computer literate, but I find this "upgrade" most annoying! I wish I had never done it (not that I blame you).

Revision history for this message
Ricardo Diamondo (dick-diamond2000) said :
#6

Can I just download 14.04 again? Or will this wipe out the old information that I still need?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

Did you not run a last full backup before making such a huge change to your system?

Revision history for this message
Daniel Savi (gaess) said :
#8

Dear Ricardo
I can understand your frustration. A upgrade that went wrong usually is quite a mess. There's an error in the command you've posted. The last part in "/dev/sda1" is actually "sda" followed by a one. So the command qould be:
sudo mount /dev/sda1 /mnt

The you can do
ls /mnt
and should see many folders including "home", "bin", "usr" and many more. This is the data in your existing system.
Then change into your system on the harddisk like this:
sudo chroot /mnt
now, set your users password with this command:
passwd USERNAME
you will have to replace USERNAME in the line above with the username you are using for login (probably something like ricardo?)
Enter the new password twice as requested.
Restart the computer using these commands:
exit
sudo reboot
Restart the computer without CD and see if you can login with the same username and password you've used with the passwd command.
Now you should backup all your data to an external harddisk

Then you may try
apt-get update
and
apt-get upgrade

this may fix your system or give new errors.

Revision history for this message
Ricardo Diamondo (dick-diamond2000) said :
#9

Dear Daniel Savi,
Thanks for all the time you are taking on this. I feel a bit stupid for mistaking a 1 for an l,
But am still having problems:
After following the instructions whilst booting from DVD, I then opened without DVD (it always opens in Terminal). I logged on using username & password OK and got;

The last login date and time
Welcome to Ubuntu 15.10 (GNU/Linux 3.13. 0-80-generic i686)
*Documentation: https//help.ubuntu.com/
0 packages can be updated
0 packages are security updates

However, I cannot then exit the terminal. I have tried:
 Ctrl + Shift + Q
 Ctrl + d
 exit

All seem to just log me out rather than closing the terminal.

It seems to be stuck in "Terminal" mode only!

Please help with this part as I feel I'm close to retrieving my data now!

Thanks,
Ricardo

Revision history for this message
Daniel Savi (gaess) said :
#10

Very nice to hear that you can now login. The lines you've posted also confirm that you are on version 15.10.
You cannot leave the terminal, because you don't have a graphical desktop running. Obviously, the update of your desktop environment went wrong during the update. So your computer at the moment only provides a command line terminal. Your data most likely is still there on your hard disk. You can always check with the "ls" command to see all files in the current directory and the "cd" command to change directories. I would recommend to backup your data before trying to fix the system.

You could otherwise just go ahead with trying to install a desktop environment with this command:
sudo apt-get install ubuntu-desktop

And see what messages you will get. This command should install the default unity desktop. There is also other choices available. See this question for your options: http://askubuntu.com/questions/2093/how-to-install-gui-desktop-on-a-server

Try rebooting if the desktop installation went by without errors by typing "sudo reboot" on the command line.

Revision history for this message
Daniel Savi (gaess) said :
#11

Oh, you should also update your package lists before installing the desktop. So the commands would be:
sudo apt-get update
sudo apt-get install ubuntu-desktop

Don't hesitate to post if you get any errors.

Revision history for this message
Ricardo Diamondo (dick-diamond2000) said :
#12

Hi Daniel,
Thanks for all the advice, I think I am getting very close now to recovering my data.

After entering the "ls" command I do indeed get a list of all my old data, some highlighted in blue. However, being a novice at the terminal, I do not know how to access these items on the list in order to save them onto my external hard-drive.

Please can you explain how I can save them, either individually or in bulk?

Hopefully, after I have saved them, I can then install a desktop environment and be up and running again.

Your help is greatly appreciated.
Richard

Revision history for this message
Daniel Savi (gaess) said :
#13

Ok, let's have a little command line crash course. The blue files are actually directories. You can change to a directory by using the "cd" command followed by the directory name. For instance, if you have a directory called "documents", you would change into it with "cd documents". Upper and lower case matters! If you want to leave a directory (moving upwards in the directory tree), you can use "cd ..". If you want to know in which directory you currently are, use "pwd". Also handy is the tab key. it completes file names. So you could also write "cd d", hit tab and it will automatically complement the command to "cd documents". If you have more than one directory starting with d, this won't work, just hit tab twice to get a ist with all choices and write as much letters as needed to identify the name. This is a really neat trick worth getting used to. it will save you a lot of typing later. it also works for commands the same way.

For the following steps to work, you need to be in your home directory. So use "cd ~" oder "cd /home/USERNAME" to change to your home directory and check with "pwd" if you really are there.

To get your data on the external hard disk, you first need to mount it to a directory. I suppose you are using a USB-drive?
first of all, you need to know how your external device shows up on your system. It will be a file in the directory "/dev". But you will have to find out its name. I'm using a little trick for this if I don't know a devices name. First you should detach your USB-drive from the computer. Yes I mean unplug. Then you save all filenames in /dev to a text file like this:
ls /dev > dev_unplug.txt

now attach your USB drive and save alle filenames in /dev again to a different file:
ls /dev > dev_plugged.txt

then you can check for differences between the two files:
diff dev_plugged.txt dev_unplug.txt

you will get an output composed of lines with weird numbers and lines starting with <. forget about the numbers. The other lines should show you something like sdb, sdb1 or similar. the entry ending with a number would be your partition(s). if it's sdb1, your device path will be /dev/sdb1. We will mount this to the /mnt/mydisk directory. first create the mydisk folder like this:
sudo mkdir /mnt/mydisk

then mount it (replace sdb1 with the entry you've found before.
sudo mount /dev/sdb1 /mnt/mydisk

get write access to your newly mounted device:
sudo chmod o+w /mnt/mydisk

you can check with "ls /mnt/mydisk" if the content of the drive looks familiar. If so, create a backup folder in it and copy your data to it:
sudo mkdir /mnt/mydisk/backup
sudo cp -R * /mnt/mydisk/backup

For the sake of simpicity, I'm telling you here to copy all files with sudo. These may be dangerous, if you make a mistake and copy your files to the wrong place. So double check this line before hitting enter! Like this, you will have copied all your files from your home folder to the external disk. You can now clean up:
sudo umount /mnt/mydisk
sudo rmdir /mnt/mydisk

Hope you stayed with me up to here. Command line can be quite time consuming if you're new to it.

Revision history for this message
Daniel Savi (gaess) said :
#14

Forget about the lines
get write access to your newly mounted device:
sudo chmod o+w /mnt/mydisk

you don't need that.

Revision history for this message
Ricardo Diamondo (dick-diamond2000) said :
#15

Hi Daniel, Thank you for your comprehensive answer. It sounds quite complicated but I'll have a go later today when I have time.
It's quite hard for a pensioner who went to school with a slide-rule, but I'll give it a try!
Thanks for all the time that this is taking you.

Revision history for this message
Ricardo Diamondo (dick-diamond2000) said :
#16

Hi Daniel,
I have retrieved all my old data!
I have reverted to the old 14.04 version as the 15.10 said that it had an interrupted download.
I may try it again in the future or just wait for the next version as there does not seem to be many new features worth doing it again for.
If I do then I will be sure to download all my files first!
At least I have my files back thanks to you.
Thank you for all you help.
Richard

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#17

I suggest you look into a backup regime. A 1Tb USB drive copied to once a week is probably sufficient.

What is the drive motor or IDE fails? Where is your data then?

USB drives are super cheap and give reliability of data rather than all this messing around. You could have simply wiped the OS, reinstalled then restored from the backup..... easier, quicker and reliable.