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)

  • Just a thought but could it be that your keyboard layout changed ? Do you have different languages as input sources ? Sometimes that prevents from typing in correct password. Also, try booting into recovery mode, sudo mount / -o remount,rw , change your own password and create a new user with sudo privilleges. If your account still fails, log-in with the new sudo user, change ownership of the old directory and its files, and just use that new account from then on. Let me know if you want this in more detail – Sergiy Kolodyazhnyy Aug 10 '15 at 10:07
  • i'm almost sure that my keyboard layout has not changed, I don't use different languages as input sources.

    as for booting in recovery mode, and then sudo mount / -o remount, rw i'm not sure how how to get to a working terminal, i dropped to root shell prompt once before & no commands were working. are the commands you posted something that starts the process?

    and yes i suppose i would like this in more detail, i have read abt creating new user workaround, if you could instruct me on how to create new user & then change ownership of old directory & files it would be greatly appreciated.

    – donniebaseball Aug 10 '15 at 12:41
  • By recovery mode I meant the root shell. Why the mount command because with root shell your hard drive is mounted in read only mode, and changes to disk in any way won't work. To make changes you need to remount it in read-write mode . I'll post an answer later in the day with the detailed steps – Sergiy Kolodyazhnyy Aug 10 '15 at 19:17
  • thank you, i eagerly await your instruction. :)

    or anybody else in the community that wants to help serg out by guiding me past the remounting in read-write mode step in the process of changing my password and then creating a new user with sudo privileges, and if need be changing of the ownership of the old directory to the new user.

    – donniebaseball Aug 11 '15 at 12:52
  • posted an answer. Let me know what works and what doesn't and we'll go from there – Sergiy Kolodyazhnyy Aug 11 '15 at 18:19
  • That formatting though. Need to take notes because this question is soooo easy to read. – Florian Wendelborn Sep 01 '15 at 16:05

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.
Sergiy Kolodyazhnyy
  • 105,154
  • 20
  • 279
  • 497
  • You have a CRT monitor? – A.B. Aug 11 '15 at 18:23
  • @A.B. nope. I just pulled those images from other sources. :) – Sergiy Kolodyazhnyy Aug 11 '15 at 18:26
  • so i tried what you typed out, "mount / -o remount,rw" and nothing happened. just the same prompt. then i added a space after rw, and it said mount: you must specify the filesystem type. then i tried "mount -o remount, rw /" followed by passwd [uname] and got "segmentation fault" error. in fact, then i tried other combinations of the first command moving around the / and sometimes omitting it and i got "mount: can't find the rw in /etc/fstab or /etc/mtab" message. so i am unable to reset password or get past the mounting portion of these instructions, any suggestions? – donniebaseball Aug 12 '15 at 13:48
  • I apologize, mount -o remount, rw / is correct one. However, it's strange you got segmentation fault there. You could try doing a LiveCD recovery. I'll update my answer to include that – Sergiy Kolodyazhnyy Aug 12 '15 at 13:58
  • @donniebaseball answer edited ,added the part about live cd recovery. Please review – Sergiy Kolodyazhnyy Aug 12 '15 at 14:08
  • @Serg i entered all instructions, when i got to sudo passwd [oldname] i got the message:

    sudo: unable to resolve host ubuntu Segmentation fault (core dumped)

    i then tried to add another user sudo user add -m -G sudo donnie and it spit out the same exact message.

    – donniebaseball Aug 12 '15 at 16:05
  • @donniebaseball So looks like all the attempts at making system work are failing. You've got some serious issue there. Boot the computer, select memtest from the bootloader (should be bellow Advanced Options for Ubuntu). Let us know what it reports. Otherwise, if you don't want to try debugging the issue and want the system just work, then simply reinstall the system and call it a day. – Sergiy Kolodyazhnyy Aug 12 '15 at 16:48
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
  • so i used puppy linux to access and copy the files to another usb flash drive, i wasn't able to copy them from the live usb version of ubuntu x64 using sudo nautilus, although when i did try my harddrive was referred to as a long name of random letters and numbers.

    while i am fully ready to perform a clean install, its more about the puzzle at this point and solving the problem, helping the community understand what could've gone wrong, and maybe teach myself something in the meantime. i have other machines and this live usb to perform some light internet functions .

    – donniebaseball Aug 10 '15 at 09:49
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,462
-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,499
  • 5
  • 19
  • 24