You are not logged in.

#1 2011-12-30 09:31:23

Roescy
Member
Registered: 2011-12-30
Posts: 9

/home not mounting correctly?

When I boot my system everything boots fine but I am never offered a logon screen. It just drops me right into a root shell.

This all started when I ran unetbootin (lame I know but everything else I tried had failed so I gave it a shot). Somehow unetbootin wiped out my /etc/fstab file because initially my system wouldn't mount my /home directory at all. I realized this and rewrote fstab using the UUIDs in /dev/disk.

Arch boots fine but still drops me to the root shell after I log on. I can su into my own account just fine and access all my files on /home. It is probably worth mentioning that my /home is located on a separate partition from /. I am also getting very strange errors for instance I cannot launch chromium I get the following error:

[3498:3498:661317880:FATAL:chrome_browser_main.cc(1195)] Check failed: PathService::Get(chrome::DIR_USER_DATA, &user_data_dir). Must be able to get user data directory!
Aborted

My ~/.config/chromium directory is completely intact and owned by me. All the permissions bits are completely normal so I am at a loss as to why chromium cannot read the files. Also dmenu will not launch. I have to believe that this is somehow connected to my /home partition.

my /etc/fstab file:

# <File System>                           <dir>         <type>    <options>             <dump> <pass>

tmpfs                                     /tmp          tmpfs     nodev,nosuid,noexec   0      0

UUID=ee2aad2b-7d71-4311-a96c-131400d7cbb4 /     ext3              defaults,noatime      0      1
UUID=9e499f9c-6eae-4b1b-a955-cf405cd31472 /home ext3              defaults,noatime      0      2

ls -l /dev/disk/by-uuid

total 0
lrwxrwxrwx 1 root root 10 Dec 30 03:20 222B8C765718C0F4 -> ../../sda2 # ntfs junk
lrwxrwxrwx 1 root root 10 Dec 30 03:20 3e7886c3-d6be-48d8-a9d4-3dea5d57bade -> ../../sda1 # boot
lrwxrwxrwx 1 root root 10 Dec 30 03:20 9e499f9c-6eae-4b1b-a955-cf405cd31472 -> ../../sda4 # home
lrwxrwxrwx 1 root root 10 Dec 30 03:20 ee2aad2b-7d71-4311-a96c-131400d7cbb4 -> ../../sda3 # root

/boot/grub/menu.lst

default 1
timeout        10


title    Arch Linux
root     (hd0,2)
kernel   /boot/vmlinuz-linux root=UUID=ee2aad2b-7d71-4311-a96c-131400d7cbb4 ro quiet splash
initrd   /boot/initramfs-linux.img
boot

title    Arch Linux Fallback
root     (hd0,2)
kernel   /boot/vmlinux-linux root=UUID=ee2aad2b-7d71-4311-a96c-131400d7cbb4 ro single
initrd   /boot/initramfs-linux-fallback.img
boot

I am at a loss and couldn't find much in the search about it. This also seems like a serious bug in Unetbootin and I know I am not the first user to have this problem. There were a few posts on ubuntu boards with similar issues following unetbootin usage. I am very confused that applications depending on things in /home are having issues when for all I can tell /home is mounting just fine.

I really hope this isn't just something obvious that I overlooked, it is a bit late.

Offline

#2 2011-12-30 09:57:05

rayjgu3
Member
From: Chicago IL usa
Registered: 2004-07-04
Posts: 695

Re: /home not mounting correctly?

what stands out to me is grub kernel line at the end is single

kernel   /boot/vmlinux-linux root=UUID=ee2aad2b-7d71-4311-a96c-131400d7cbb4 ro single

which I believe only give root access. however you say it drops you into root shell I guess that means its logged in so does root have a password?

never tried to su my way from root to user but I would say that is your problem with chromium
even though you su'd into it the user directory is still root at least I would think it would be

take out single from kernel line & I think it will be straightened out

good luck

Offline

#3 2011-12-30 17:14:10

Roescy
Member
Registered: 2011-12-30
Posts: 9

Re: /home not mounting correctly?

That is only for the fallback option on the grub menu. I have been using the regular arch linux. I realize it was defaulting to the fallback but I was manually selecting the first option. It also is not booting me into single user mode but a fully fledged root shell. I may just have to reinstall arch. I am fairly certain this all has to do with my /home partition being setup incorrectly somehow....


DONT USE UNETBOOTIN!

Offline

#4 2011-12-30 17:36:08

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,741

Re: /home not mounting correctly?

What does runlevel report?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2011-12-30 17:55:32

Roescy
Member
Registered: 2011-12-30
Posts: 9

Re: /home not mounting correctly?

runlevel reports:

N 3

Offline

#6 2011-12-30 19:29:22

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: /home not mounting correctly?

*chuckles*
Your default boot-kernel is '1' -ie. the fallback-kernel which puts you into single-user mode.
Your timeout is long enough to choose the 'proper' kernel (well, kernel is the same but not the initrd).
I can only surmise that you hit 'Enter' as soon as the grub menu comes up ...

Offline

#7 2011-12-30 19:31:02

Roescy
Member
Registered: 2011-12-30
Posts: 9

Re: /home not mounting correctly?

I was manually selecting the first option. I also have now changed that value to 0 to reflect the first choice. Not to mention my runlevel is 3 not S.

Offline

#8 2011-12-30 19:44:18

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: /home not mounting correctly?

Your runlevel is decided by /etc/inittab - me, I _always_ start in runlevel 3 and use startx to go 'graphic'

As for being 'root', you can always do a 'su -  {myusername}' and then a 'startx'

Last edited by perbh (2011-12-30 19:46:49)

Offline

#9 2011-12-30 19:52:46

Roescy
Member
Registered: 2011-12-30
Posts: 9

Re: /home not mounting correctly?

I have always started at runlevel 3 and then use my ~/.bash_profile to start x at login. You are correct that I can su into my account and then startx manually. However I don't exactly like my computer booting right into root (security reasons) and I cannot launch certain applications (something is wrong with /home). It's as if certain applications cannot see that /home is mounted. agetty and login seem to have no idea that any users exist and drop me into a root shell ignoring the users on /home.

Offline

#10 2011-12-30 23:37:37

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: /home not mounting correctly?

When you say you used Unetbootin, do you just mean that you used it to create a USB key or that you also booted the machine from that key? (Self-interested question: I'd like to know what to avoid!)

When you boot, you don't have to give root's password at all? It is dropping you to a root shell without any login or authentication? So you are not getting any login prompt? Or are you being asked just for root's password (as would happen in single-user mode, I think)?

Is there anything useful in the logs? What are the permissions on /home and your home directory?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#11 2011-12-30 23:50:14

Roescy
Member
Registered: 2011-12-30
Posts: 9

Re: /home not mounting correctly?

I used unetbootin to create a bootable USB stick. I had previously been attempting to install the distro on the USB key as if it were a hard drive and got errors and all the guides said to use unetbootin (using windoze). I dont have windows so I used the version in the arch repos. I definitely selected the thumb drive for installation. HOwever when I rebooted my computer it dropped me into a basic shell. From there I mounted my root and home directory and booted. It dropped me right into a root shell, no password was needed. Full root access at run level 3. I looked at my fstab file which had been completely wrecked. It only had a /tmp mount specified. I changed it using the guids from /dev/disk/by-uuid and rebooted. My home directory and root directory were successfully mounted at startup. Again, it dropped me right into a root shell with no password. /home was where it should be and I had access to all my files.

the permissions for /home are

/home drwxr-xr-x owner: root group: root
/home/<username> drwx------ owner: <username> group: users

I cant find any error message in the logs. The boot log doesn't indicate anything and nor does the system log.

Offline

#12 2011-12-31 00:54:52

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: /home not mounting correctly?

Have you tried temporarily removing "quiet" and "splash" from the kernel command line when you boot? Messages should be getting into the logs as well but I'd be tempted to maximise the possible sources of information available if I were in your position. dmesg would be another thing to try if you haven't already done so.

If you think that Unetbootin wrote to (some partition of) your hard drive rather than the USB key in error, it would be likely there should be other evidence of this beyond a corrupted fstab, wouldn't it? Is there anything else obviously wrong?

What happens if you temporarily move your user data directory for chromium aside and then try starting it?

Can you launch any GUI applications?

When you su to your home, which command do you use exactly? Do you just use su <username>? Or do you add any options?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#13 2011-12-31 00:59:19

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: /home not mounting correctly?

Comment on Unetbootin: I don't really understand why it requires privileges to run. I don't need to authenticate to write or delete files on my USB keys normally so why does Unetbootin need it? If it didn't have that, it shouldn't be possible for it to e.g. corrupt system files (though it could still hose your home directory which would probably be worse).

My impression is that Unetbootin runs better on Windows than Linux - Arch, anyway. But that doesn't necessarily make it safer...


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#14 2011-12-31 03:27:50

Roescy
Member
Registered: 2011-12-30
Posts: 9

Re: /home not mounting correctly?

I ran unetbootin with sudo. That was probably a bad idea in retrospect. I can effectively point chromium to the correct directory for config and it will run. However, other applications still have errors and the whole launching to root shell business isn't good. I am seriously considering doing a complete reinstall. If I ever use unetbootin again (highly doubt I ever will) I'll just run it in a VM.

Unetbootin did more than just damage my fstab. I found random config files in my /etc (they seemed harmless but I deleted them). My guess is that it wiped something more than just my fstab causing these issues. However I cant for the life of me figure out what went wrong....

Offline

#15 2011-12-31 03:39:16

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: /home not mounting correctly?

Roescy wrote:

I ran unetbootin with sudo. That was probably a bad idea in retrospect.

Only in the sense that it may be that unetbootin was a bad idea. It won't run at all without privileges. At least, it wouldn't for me. (Fortunately, it did not screw up my installation...)

Hopefully somebody else will have an idea. (Somebody who knows something!) But if it has corrupted/deleted unknown files under /, I'd think that figuring out what is damaged and how to fix it might take longer than reinstalling. But that might depend on your level of knowledge and how much configuration you'd have to redo...


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#16 2011-12-31 03:48:18

Roescy
Member
Registered: 2011-12-30
Posts: 9

Re: /home not mounting correctly?

I am kind of just hoping someone can figure it out by tonight. If not I'll just clean install it. It shouldn't take me too long. I'll just store all my config files externally and insert them into the fresh arch install. Honestly I somewhat enjoy when things go wrong since it allows me to learn more. I think I could have arch up and fully functional within an hour.


EDIT:

Also it may be important, when I start a terminal it starts in the /root directory instead of ~. Not sure if this is significant but it certainly is annoying.

Last edited by Roescy (2011-12-31 04:05:01)

Offline

#17 2011-12-31 06:32:09

Roescy
Member
Registered: 2011-12-30
Posts: 9

Re: /home not mounting correctly?

I tried running dmenu_run and get the following error:

mkdir: cannot create directory `/root': Permission denied
/usr/bin/dmenu_run: line 9: /root/.cache/dmenu_run: Permission denied

Trying to create /root? This certainly confuses me. Maybe something is wrong with my /root directory?

Anyway here is the bash script for dmenu_run:

  1 #!/bin/sh
  2 CACHE=${XDG_CACHE_HOME:-"$HOME/.cache"}/dmenu_run
  3 (
  4         IFS=:
  5         if test "`ls -dt $PATH "$CACHE" 2> /dev/null | sed 1q`" != "$CACHE"; then
  6                 mkdir -p "`dirname "$CACHE"`" && lsx $PATH | sort -u > "$CACHE"
  7         fi
  8 )
  9 cmd=`dmenu "$@" < "$CACHE"` && exec sh -c "$cmd"

I cant see anything wrong with any of this but this is an example of something that doesn't work as expected on my system and I was hoping it might be useful.

Offline

Board footer

Powered by FluxBB