1

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)

donniebaseball
  • 21
  • 1
  • 1
  • 3

4 Answers4

1

Getting into recovery mode

Essentially the steps are the same as described in this answer

  1. Boot the computer
  2. On the grub menu select Advanced options for Ubuntu.
  3. Select any entry that says recovery.Image
  4. 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

  1. 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 to sudo group, so that you have admin privileges on that account.
  2. Run passwd newusername to create password for that user
  3. 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.

  1. change ownership of the previous home directory with sudo chown -R newuser:newuser /home/oldusername.
  2. 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 use mkdir ~/oldstuff for that.
  3. 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 use rsync SOURCE DEST, for instance rsync -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.

  1. Boot the Ubuntu Live CD.
  2. Press Ctrl-Alt-F1
  3. sudo mount /dev/sda1 /mnt (note sda1 is just example, you have to find which one is your Ubuntu partition with lsblk or sudo blkid. For instance , I know /dev/sda5 is my Ubuntu partition because it is TYPE="ext4")
  4. sudo mount --bind /dev /mnt/dev
  5. sudo mount --bind /proc /mnt/proc
  6. sudo mount --bind /sys /mnt/sys
  7. sudo chroot /mnt
  8. sudo passwd yourusername
  9. sudo useradd -m -G sudo newusername
  10. sudo passwd newusername
  11. When everything is done, sudo shutdown -r now to reboot back to your laptop's hard drive.
0

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.

Newt L
  • 336
  • 3
  • 8
0

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
hg8
  • 13,582
-1

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.

Michael
  • 2,597