Persistence
From DSL Wiki
This page in other languages: EspaƱol, Deutsch
Contents |
Why And What?
There comes a time in every DSL user's life when they must decide if they want to continue using DSL, or move on to another distro, or, heaven forbid, go back to that other OS.
If you've decided to use DSL as your regular OS, or even if you just use it occasionally, you probably want to know how to make your DSL settings permanent. There are at least 2 ways to do this.
Backup and Restore
When booting from LiveCD or a Frugal Install, your application settings, bookmarks, etc can be saved to a hard drive partition, usb key, floppy, etc, in a file called backup.tar.gz. To create this file, right click on the desktop. System->Backup/Restore. Type in the name of the device to save to (e.g. hda1/sda1/floppy) and hit backup. Then, when you reboot, your settings can be restored using the cheatcode 'dsl restore={hda1/sda1/fd0/floppy}'.
To change which files are saved, edit /opt/.filetool.lst (list of files to backup) and /opt/.xfiletool.lst (list of files to exclude from the backup process). Adding files to .filetool.lst can be easily done by choosing the file/dir in emelfm and clicking the 'Add2Filetool' button.
The default files/dir saved at backup are:
opt/ppp opt/bootlocal.sh opt/powerdown.sh opt/.dslrc opt/.backgrounds home/dsl/
If you decide you only want to save certain files in home/dsl/ and not the entire directory, you would want to remove home/dsl/ from .filetool.lst but add .filetool.lst and .xfiletool.lst to the .filetool.lst file.
Here is how it might look in this situation adding just the /home/dsl/.fluxbox directory
opt/ppp opt/bootlocal.sh opt/powerdown.sh opt/.dslrc opt/.backgrounds opt/.filetool.lst opt/.xfiletool.lst home/dsl home/dsl/.fluxbox
Persistent home and opt directories
Persistent home directory
A persistent home directory means that your entire home directory is written somewhere permanent, rather than constantly re-created at boot. Your home directory is probably where most of your custom settings are anyway, so making this persistent will save most or all of your settings. Here's how:
1) The first step is to create your home directory. Load up DSL as you normally would. Don't use the home boot option. Execute the following. If you want your home directory somewhere other than hda5, replace hda5 with the mount point of your device.
mount /mnt/hda5 mkdir -p /mnt/hda5/home cp -a /home/dsl /mnt/hda5/home
2) Reboot, and use the boot option:
dsl home=hda5
Use this boot option every time you boot.
Persistent opt directory
Sometimes you might want to save your settings under opt. bootlocal.sh is under opt, and if you want to run programs at startup, this is a good way to do it. Basically, the process for making a persistent opt directory is the same as for a persistent home directory, but using opt instead of home.
Persistent home and persistent opt work well together.
Notes: 1. /opt is a symbolic link to /ramdisk/opt (dsl 3.0.1) so copy from there. 2. do these steps as root! "sudo su" 3.change permissions to allow writing to the persistent "home" and "opt" dirs for required users (dsl!!)
E.g.
dsl@box:~$sudo su dsl@box:~$mkdir /mnt/hda3/opt dsl@box:~$cp -a /ramdisk/opt/ /mnt/hda3/opt dsl@box:~$mkdir /mnt/hda3/home dsl@box:~$cp -a /ramdisk/home/dsl /mnt/hda3/home
Creates: hda3/home/dsl/... hda3/opt/....
Reboot, and use the boot option:
dsl home=hda3 opt=hda3
Use this boot option every time you boot.
System configuration
If you have made configuration changes such as printer settings, setting up daemons, or modifying the startup scripts, you may wish for those settings to persist. See Saving your configuration for information about this.