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.
- 105,154
- 20
- 279
- 497
-
-
@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
– donniebaseball Aug 12 '15 at 16:05sudo user add -m -G sudo donnieand it spit out the same exact message. -
@donniebaseball So looks like all the attempts at making system work are failing. You've got some serious issue there. Boot the computer, select
memtestfrom 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
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
-
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
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,499
- 5
- 19
- 24
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:07as for booting in recovery mode, and then
sudo mount / -o remount, rwi'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:41or 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