Ubuntu boots to console and allows only root login
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ubuntu boots to console and allows only root login
I have a laptop set up with Kubuntu 12.04, 64-bit, and I used it for a couple months without problems. Then, after booting it up one evening and copying a batch of files onto the hard drive from a USB stick, the system froze. No soft-reboot would work, so I used the power button. After that, the computer does not boot to the GUI desktop, but only to console, and allows only root to log in.
Note that the files that were copied immediately before the failure were copied to a data partition separate from the system files. All those files are in place.
From the console, as root, I can run startx and get the GUI desktop. I cannot, however, use the su command to change to a regular user. I have tried changing to the user that existed before the failure, and I have created a new user since then and tried it. Neither works.
Obviously, the new user's password was created after the crash. And I've also used the passwd command to reset the pre-existing user's password, so I know it's valid.
The error message I get in both cases is
Quote:
Unable to cd to /home/...
(where the ellipsis represents the user's name). The /home directory has full drwxrwxrwx permissions, as do both users' directories. Both users' directories are owned by the respective users, and all files (including hidden files) have rwx permissions in the owner's column.
Yes, I can check /var/log/dmesg, though I have no idea what the result means. I don't even know if newer material is added at the head or the tail. Nor do I know what other logs to look at. Can you offer any guidance here?
Then, after booting it up one evening and copying a batch of files onto the hard drive from a USB stick, the system froze.
we will need more information on this.
i suspect something went very, very wrong there.
Quote:
The /home directory has full drwxrwxrwx permissions, as do both users' directories. Both users' directories are owned by the respective users, and all files (including hidden files) have rwx permissions in the owner's column.
this sounds wrong.
my /home has drwxr-xr-x root:root, and /home/username has drwx------ username:users.
ondoho, I don't know how much more information there is to give. I had several video files on a USB stick, mounted the USB stick on the laptop at /mnt/usb1, copied the files to /video (which is on a partition separate from the root and system files), and let it run. When I went back to it, an hour or so later, the system was non-responsive. Ctrl-C had no effect. Ctrl-Alt-Del had no effect. I held the power button down to shut the machine off, then re-booted.
The system, since then, boots to the console and asks for a login and password. If I enter a regular username and the associated password, the system will very briefly display a message - it looks like a "Last login was..." message, but it disappears too quickly for me to read in detail. Then it again asks for login and password. I can enter username root and root's password and the computer accepts those credentials and runs as root, in console.
When I try to su to another user, I get the error message that the system cannot cd to that user's home directory. However, I can manually cd to those home directories.
The permissions have not changed since I set the machine up. They are set the same now as when I was able to use the machine normally, before the freeze-up.
I don't know how much more information there is to give. I had several video files on a USB stick, mounted the USB stick on the laptop at /mnt/usb1, copied the files to /video (which is on a partition separate from the root and system files), and let it run.
the actual commands you used.
but to me, too, it looks like you accidentally hosed your system.
and if it really was set up like this from the beginning, then something went wrong there, too.
After I plugged in the USB stick and determined the drive and partition to which it was mapped (sdb1), I did this:
Code:
$ su -
password:
# mount /dev/sdb1 /media/usb1
# cp -a /media/usb1/* /video/
I had previously made sure that the USB stick had nothing on it before I copied the video files (in their respective subdirectories) onto it, and I had checked that the /dev/sda5 partition was mounted to /video.
The files copied correctly, but the computer would not respond to anything after they were in place - except, of course, the power button.
Quote:
and if it really was set up like this from the beginning, then something went wrong there, too.
I'm not sure what you mean by "...set up like this..." but the system was not initially configured to boot to console nor to allow a root log-in. For the first few months, it booted to a grub2 menu screen, defaulting to the Kubuntu OS and allowing my regular user-name log-in (but not allowing a root log-in, which is the norm for Ubuntu). It changed to the console-only, root-log-in-allowed behavior only after this freeze-up.
$ su -
password:
# mount /dev/sdb1 /media/usb1
# cp -a /media/usb1/* /video/
that looks ok to me.
of course one could discuss whether there was a need to perform that command while still in superuser mode; had you exited first, there'd simply have been less risk of accidentally doing something fatal.
Quote:
I'm not sure what you mean by "...set up like this..."
i meant the permissions on your home directory/ies, as you quoted earlier.
unfortunately, at this point there's not much anyone can do to help you unless you start seriously troubleshooting your problem (probably from booting into a live system).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.