Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] xorg fails to start via user error.
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Sun Nov 07, 2021 3:28 am    Post subject: [Solved] xorg fails to start via user error. Reply with quote

Hello,

I made a stupid mistake trying to fix a new gentoo install on some new hardware. I had done a base install but I set up the mount point wrong and ended up with another root dir in my home. So to boot into it, I had to mount my home to "/home/home/usrname" in my "/etc/fstab". I was trying to get the home moved to the correct dir. Well, instead of trying to do it in a live disc, I was being complacent and was trying to do it in my regular install. So, when I was doing the cp commands in the terminal, instead of using the full path to the mounted drive, I used my local home dir; copying all the dot files from the new install into it. At that time I didn't realize what I just did until I rebooted.
Now I can not startx without it being root. I can not figure out which file/files that are breaking my system. I would greatly appreciate the help in figuring out which config that I need to fix to be able to use my install. I am using startx to start kde with
Code:
#!/bin/sh
exec dbus-launch --exit-with-session startplasma-x11
in my "~/.xinitrc"

Here is the log file from "/var/log/Xorg.0.log" . I could not find one in my home dir, so this what I have. http://dpaste.com/DDVZPEYV8

Thanks again


Last edited by Tefrem34 on Mon Nov 08, 2021 5:24 am; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Nov 07, 2021 6:41 pm    Post subject: Reply with quote

Hi
Is your /home in a separate partition?
Is your /root in a separate partition?
Are the data intact in them?
How was the fstab before and how is it now?
What is the ouput of

ls /home
ls /root
?
It is not very clear --to me at least-- what happened.
_________________
:)
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21602

PostPosted: Sun Nov 07, 2021 7:16 pm    Post subject: Reply with quote

Exactly what commands were run to create this situation? Why were you using cp at all, when the correct solution was to mv the home directory itself?
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Sun Nov 07, 2021 9:34 pm    Post subject: Reply with quote

@ alamahant Yes I use separate partitions for root and home. Root was unchanged because it is its own partition.

@ Hu This was the bash_history
Quote:
cd /run/media/rbear
cd /run/media/rbear/home
cd /run/media/rbear/home/home
cd /run/media/rbear/home
cd /run/media/rbear
cd /run/media/rbear/home
cp /run/media/rbear/home/home/rbear/ /run/media/rbear/home/
cp -r /run/media/rbear/home/home/rbear/ /run/media/rbear/home/
doas cp -r /run/media/rbear/home/home/rbear/ /run/media/rbear/home/
cd /run/media/rbear/home/home
cd /run/media/rbear/home/home/rbear
cd /run/media/rbear/home/home
cd /run/media/rbear/home
cd /run/media/rbear/home/rbear
cd /run/media/rbear/home
cd /run/media/rbear/home/home
cd /run/media/rbear/home
ls
doas rm -r /run/media/rbear/home
doas rm -r /run/media/rbear/home
doas rm -r /run/media/rbear/home
That is after mounting it and changing to the diir.
I kept getting errors trying to save the home dir and get rid of the extra root in the /home dir. I am pretty sure it did that because I couldn't mout the nvme drive as one but had to mount them individually. Instead of mounting the boot and home partitions after chrooting and mounting when /boot was mounted, I did it at the beginning.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21602

PostPosted: Mon Nov 08, 2021 12:06 am    Post subject: Reply with quote

You did not direct cp to preserve permissions and ownership. It is likely that all copied files are now owned by root. Cleaning this up will be challenging. Do you still have the original directory, which was nested too deeply? You appear to have tried three times to delete it at the end. If you still have it, start over, and this time use mv instead of cp.

Without knowing what error you got, I can only guess. If I were to guess, it would be that the directory for user home directories was (correctly) root:root 755, and so only root could fix the location of your nested home.
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Mon Nov 08, 2021 3:50 am    Post subject: Reply with quote

No, I started over with that install. Which I am working from. I just need all the stuff from my broken install.
Is there a command that I can run when starting x so that it saves to the home dir instead of the /var/log/Xorg.0.log ?
Is there also a way to find the permissions for my dot files that I need in order to boot?

Thanks
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Mon Nov 08, 2021 3:54 am    Post subject: Reply with quote

I just looked at the permissions for the .xinitrc file and it is owned by root.
I am going to change the permissions and see if that is the culprit.
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Mon Nov 08, 2021 4:22 am    Post subject: Reply with quote

So I was able to get into my plasma desktop with startx!!
Not only was the .xinitrc file in root group but permissions, on top of that I had it misspelled; .xitirc or something like that.

However, I am missing the configs for my plasma, since what ever I copied/moved over wiped out what I had. So I missing all the config options in my kde settings.
Is there a way for me to re-install or copy in some configs so that I can get the options and features back?

Thank you.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Mon Nov 08, 2021 1:35 pm    Post subject: Reply with quote

Tefrem34,

All the files in /home/Tefrem34/ should be owned by Tefrem34.
They should be 6xx permissions. That's rw- for the owner.
If you have executable files there the should be rwx but that's a bit naughty.
The group and world access don't matter too much until things work.

Directories should be rwx for the owner.

That's enough to get you going.

There are a few security/privacy related files in /home/Tefrem34/ where the applications refuse to work if the permissions are too lax.

The group for the files in /home/Tefrem34/ will either be Tefrem34 or users, depending on your install.
Group permissions on files are usually r-- (read only) and on directories r-x.
The eXecute bit on directories allows the cd command to work.

Don't forget about the security/privacy related files that need be owner access only.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Thu Nov 11, 2021 2:43 am    Post subject: Reply with quote

I think why it was owned by root is because when I had chrooted into that partition I was using root, and when I copied the files into my native home dir, I must have edited it; why the name of the file was misspelled.
I had not even thought of looking at file ownership or permission when it wouldn't work. So getting the help, I was able to find what I screwed up on.

Thanks again for all the help.

I really appreciate this community. You all are amazing!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum