Navigatrix.net - A Voyager's Companion
http://navigatrix.net/

How to save personal configuration to USB Stick
http://navigatrix.net/viewtopic.php?f=10&t=584
Page 1 of 1

Author:  David [ 08 Jan 2014, 12:50 ]
Post subject:  How to save personal configuration to USB Stick

Lets imagine you just went through the configuration of your Sylpheed eMail Client, Airmail, XGate, SatPhone, OpenCPN, AIS, Instrument Panel and comports on your USB stick. Its a little bit time consuming so you dont want to do it again after a harddisk installation or after deleting the persitency files of the USB stick. So why not save the configuration and make it permanent?

Just go to the terminal and enter savecfg. This will save the configuration files to the preseed folder of your USB Memory. Those files will be the new defaults after resetting the persitency of a live system and also will be used when you do a hard drive installation.

This will save you some time ;)

Author:  S.V.Ketos [ 13 Jan 2014, 20:49 ]
Post subject:  Re: How to save personal configuration to USB Stick

Thank you! Thank you! Thank you!!! Been trying to figure that one out for a while now. Is there a way to keep your settings when a new distribution comes out?

Thanks,

Tim

Author:  David [ 14 Jan 2014, 10:57 ]
Post subject:  Re: How to save personal configuration to USB Stick

Just make a new stick and transfer the contents of the preseed folder into it. This will save the configuration for:
airmail,opencpn,zygrib,sylpheed,xgate,gnuais,wvdial,comports,gpsd,hamfax,polarcom,jtides and wxtide.
Works also on a non persistent usb stick.

Author:  S.V.Ketos [ 14 Jan 2014, 18:27 ]
Post subject:  Re: How to save personal configuration to USB Stick

How about things like keyboard layout and and Internet access point configuration. Is there a way to save that information also?

Thanks again,

Tim

Author:  Moe [ 06 Apr 2014, 00:07 ]
Post subject:  Re: How to save personal configuration to USB Stick

Sorry, Tim, this thread slipped through the cracks.

If you look at savecfg
Code:
sudo medit /usr/local/bin/savecfg
you will see the script just copies some of your configuration files to a preseed directory so when there is a hard disk install or a persistence file re-build those configuration files 'pre-seed' the new setup.

Your network configuration files are located at /etc/NetworkManager/system-connections
Code:
wadda@mini:/etc/NetworkManager/system-connections$ ls -lisa
total 16
50331922 4 drwxr-xr-x 2 root root 4096 Feb  5 17:18 .
50331654 4 drwxr-xr-x 6 root root 4096 Oct 17 06:52 ..
50334899 4 -rw------- 1 root root  242 Feb  5 17:18 BigPond8S58
50334696 4 -rw------- 1 root root  283 Jan 31 23:21 New 802-11-wireless connection
Your keyboard configuration is located at /home/$USER/.config/lxkeymap.cfg

The trick is to include that information in the savecfg file that mimics.
Code:
# comports
cp -v "/etc/comports*.conf" "$preseed/"
# gpsd
cp -v "/etc/default/gpsd" "$preseed/gpsd"
Insert after line 22, but before line 60, something like
Code:
# NetworkManager connections
cp -v "/etc/NetworkManager/system-connections/*" "$preseed/NetworkManager/"
# keyboard layout
cp -v "/home/nx/.config/lxkeymap.cfg" "$preseed/"
I'm still not sure about the path following the $preseeding argument, or if an addition needs to be made to the /preseed/config.txt file. I'm just not familiar enough with the process. Maybe someone else knows, but I'll look into it.

Author:  David [ 06 Apr 2014, 10:00 ]
Post subject:  Re: How to save personal configuration to USB Stick

To add additional configurations one has to add them to the /usr/local/savecfg script to save them and to /usr/local/bin/nxlive to restore the configuiration on a live stick and to /usr/lib/ubiquity/target-config/60navigatrix to restore the configuration on a harddisk install. However, it would also be required to add this into the iso. A better way may be to have a text file whith the locactions of the configuration files and the information of how to change the config files if the username on a new installation changes. If there is interest for something like this i may add this feature later down the road.

Author:  Moe [ 06 Apr 2014, 10:06 ]
Post subject:  Re: How to save personal configuration to USB Stick

So it's clearly more complicated than I thought.

...but since the keyboard config and wireless passwords are easy enough, for the frequency I'm not sure it would be worth the time.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/