We have moved to a new Sailfish OS Forum. Please start new discussions there.
0

How to restore /root

asked 2015-08-20 20:40:41 +0200

AkiBerlin gravatar image

updated 2015-08-20 21:17:51 +0200

Stupid me: aparently I deleted the files in a directory that supposedly is /root. What I did is rm -rf ~

When I now use terminal with root access (devel-su) or otherwise I do not see the directory Information any more. Therefore, in terminal I have to navigate "blindly". Previously, in the "devel-su" mode, I saw something like "Jolla" at the beginning of every line in the terminal

That is the apparent defect. Are there any more I am not (yet) aware of?

EDIT: Maybe somebody can tell me what files normaly are found in /root

What can I do to return to the original behaviour (without a full recovery)?

Thanks for any hint! (And don't blame me - I already feel bad for my stupidity - It all started with a strange 0B directory visible in Filetug in the root directory which I beleived I have created accidentally)

edit retag flag offensive close delete

Comments

Be careful or next time it's gonna be rm -rf /

ScumCoder ( 2015-08-21 01:54:00 +0200 )edit

I won't do that - I guess I learned some lesson. What I just learned is that I should not play around with home directories and better should use the explicit path name. The reason I "cleaned" my Jolla was that there was no free space left any more so the next update would definetly have failed. Therefore I moved all /home/nemo files on the laptop in order to copy only some selected files back to the Jolla. I missed out that /root is the home directory when I am acting as a root user.

That I can do all that is great about Sailfisch - even if it bears some risk.

And I have to praise this forum - another good reason to like the Jolla.

So thank you to everybody!

AkiBerlin ( 2015-08-21 10:15:35 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2015-08-20 21:23:18 +0200

Trizt gravatar image

I think you can just do cp -a /etc/skel /root and then log out and back in.

edit flag offensive delete publish link more

Comments

@Trizt: Thank you a lot - that worked!

Are .bash_history .bash_logout .bash_profile and bashrc the only files normaly found in /root?

AkiBerlin ( 2015-08-20 21:37:42 +0200 )edit

i.g. there are only some other shell configs .cshrc and .tcshrc
except you use some e.g. filetug root version,...

rudi ( 2015-08-21 00:17:36 +0200 )edit
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2015-08-20 20:40:41 +0200

Seen: 208 times

Last updated: Aug 20 '15