Ubuntu x64 on a Dell Inspiron 1525, not sure what to do, cannot login as guest or the one profile i created, even using the tty1-6. i've run boot repair and i've done a couple of the boot recovery solutions to no avail. i read many similar threads and posts from all over (re: nvidia cards, .Xauthority edits, reinstalling Unity, creating new user profiles, changing passwords, etc.) and i'm not sure how to accomplish some of the things people are suggesting. i can boot from liveusb, and see the hard drive, but i'm also trying to get some files from there, everything is backed up already from a couple of days ago, i just need maybe a handful of new ones. any suggestions on how to start trying to fix this? (note: i accessed & copied my new files via puppy linux, still wasn't able to copy from live usb, though)
4 Answers
Getting into recovery mode
Essentially the steps are the same as described in this answer
- Boot the computer
- On the
grubmenu selectAdvanced options for Ubuntu. - Select any entry that says recovery.Image
- Select
root shell. Image
Working around root shell
Once in the root shell, you can view the logs and attempt to gain a slight idea of what the issue might be. Logs are located in /var/log directory. The logs that you might consult are dmesg.0, kern.log, kern.log.1, syslog.
Here you can attempt to reset your own password, as well as create new user, in case your current username still fails to log in. That implies making chances to the system. However, initially root shell starts with your hard drive mounted in read-only mode. To allow changes to your system, do mount -o remount,rw /.
Changing your own password
That is fairly simple. Run passwd yourusername . You will get a prompt that asks to enter new Unix password and confirm.
Creating new user
- Run
useradd -m -G sudo newusername, where newusername is the new username that you want to have for new account. This command also adds the user tosudogroup, so that you have admin privileges on that account. - Run
passwd newusernameto create password for that user - Confirm that the new username works properly by runnning
su newusername
Regaining files with the new account
You can do this either from root shell or attempt to login graphically with new username first. My preference would be second choice.
- change ownership of the previous home directory with
sudo chown -R newuser:newuser /home/oldusername. - At this point you can either leave the directory untouched (suggested) or move files to your new directory. If you choose to move the files, continue reading. In your new directory create new directory called
oldstuff. You can usemkdir ~/oldstufffor that. - You can approach this from couple different angles. If you only want stuff in the default directories, like Pictures,Downloads, and Videos, you could run something like this :
find /home/olduser/Documents/ /home/olduser/Videos/ /home/olduser/Pictures /home/olduser/Desktop -type f -print0 | xargs -0 mv -t ~/oldfstuff. Beware that this command takes all the files from all those directories and stuffs them into one, thus if there's any duplicate names , they might not be moved over. Now, better way is to usersync SOURCE DEST, for instancersync -r /home/olduser ~/oldstuff.
LiveCD Recovery
As an alternative to the root shell recovery from grub, you can try LiveCD recovery. Basic idea is to take live media, such as installation USB or CD, mount your hard drive, bind certain folders,change root directory of the live media to the one on your hard drive, and change password or create users as described above. The process is well described on the Ubuntu documentation page.
- Boot the Ubuntu Live CD.
- Press Ctrl-Alt-F1
sudo mount /dev/sda1 /mnt(note sda1 is just example, you have to find which one is your Ubuntu partition withlsblkorsudo blkid. For instance , I know/dev/sda5is my Ubuntu partition because it isTYPE="ext4")sudo mount --bind /dev /mnt/devsudo mount --bind /proc /mnt/procsudo mount --bind /sys /mnt/syssudo chroot /mntsudo passwd yourusernamesudo useradd -m -G sudo newusernamesudo passwd newusername- When everything is done,
sudo shutdown -r nowto reboot back to your laptop's hard drive.
- 107,582
When you boot from the live USB, can you access or copy the files on your hard drive? If so, boot into the live USB, and find the files you want to retrieve. Plug in another USB drive, and try copying the files to it. If it doesn't copy, run nautilus as a superuser (gksudo nautilus) it might work then. If you can copy what files you need to save, you have more options to fix your system's problem. I don't have a solution to the login loop, you may be best off just doing a clean reinstall, as long as everything you need off of the drive is saved somewhere.
- 336
- 3
- 8
I had the same problem but was not able to solve it with your solutions.
My solution was to reinstall the proprietary driver of my graphic card (it was an nVidia). To do so :
- boot a previous Ubuntu kernel (at grub time, go down one line and select the previous kernel to boot using arrow keys)
- download the appropriate driver installer from nVidia site
- give it execution rights (
sudo chmod a+x ./NVIDIA-Linux-x86_64-346.72.run) - restart your machine and boot the new kernel
- go to console mode (Ctrl+Alt+F1)
- stop the x server (
sudo /etc/init.d/lightdm stop) - run the driver installer (
sudo ./NVIDIA-Linux-x86_64-346.72.run) - reboot your computer
Have you try this:
gsetting x.session Ubuntu
and then this:
sudo apt-get install liux-efi-amd64_ linux-efi
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -f install
sudo aptitude linux-efi
sudo apt-get install --reinstall ubuntu-desktop
and it might work fine this way.
- 2,597