www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

Saving "Temporary" profile?

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
drsox



Joined: 09 Jan 2014
Posts: 13

PostPosted: Wed Nov 05, 2014 1:44 pm    Post subject: Saving "Temporary" profile? Reply with quote

Hi,

I stupidly setup a complicated VPN setup under the TEMPORARY boot profile!
Is there any way I can save this temporary profile into a profile?

It seems you have to create and activate a profile before changes get saved to it.. I've only got remote access so shutting down the zeroshell machine to activate and reconfigure the profile isn't an option.

Saving the temporary config right into a profile would be ideal, anyone got any handy methods to do this?

Tom - www.mouselike.org
Back to top
View user's profile Send private message
gordonf



Joined: 26 Feb 2012
Posts: 88

PostPosted: Wed Nov 05, 2014 7:32 pm    Post subject: Copy contents of /Database maybe? Reply with quote

/Database is the mount point where the current Zeroshell profile is stored. /DB would normally mount to the first hard drive and then individual profiles would appear as directories in there.

Make a new profile normally, but don't activate it. Note the directory's name, like "_DB.001". Then try going to a Bash prompt on the router's console (or SSH?) and try this:

mount /dev/sda1 /DB (or whatever partition device it is)
/bin/cp -brf /Database/* /DB/_DB.001/

This should (I think) copy your current (temporary) profile to the new profile, including any VPN configuration. You should then be able to activate that profile and it should retain the contents of your temporary profile.

I DO NOT KNOW if this will work; it's just something I tried to do without actually reproducing a complicated profile.
--
Back to top
View user's profile Send private message
drsox



Joined: 09 Jan 2014
Posts: 13

PostPosted: Wed Nov 05, 2014 8:13 pm    Post subject: Reply with quote

Thanks for that! I will give it a go when I have a free moment and report back.

Tom - www.mouselike.org
Back to top
View user's profile Send private message
gordonf



Joined: 26 Feb 2012
Posts: 88

PostPosted: Thu Nov 06, 2014 2:04 pm    Post subject: Here's a way to test it non-destructively Reply with quote

If you're able to build another box (or maybe virtual machine) to run Zeroshell on, you could try following the steps I provided, then backing that profile up. Restore the backed-up profile to the second ZS system and see what happens when you try activating it.
Back to top
View user's profile Send private message
drsox



Joined: 09 Jan 2014
Posts: 13

PostPosted: Fri Nov 07, 2014 3:31 pm    Post subject: Reply with quote

It doesn't show up in the profiles list until you also do this:
Code:
cd  /DB/_DB.001/ (or whatever number you made it)
mkdir .settings
echo 'RecoveredProfile' > .settings/Description


Job done! Thank you.

Tom - www.mouselike.org
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell 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


Powered by phpBB © 2001, 2005 phpBB Group