- All
- Ambassador
- Personal
- Solaris
- Sun
Session persistance on BeleniX LiveUSB
I've been working on BeleniX session persistence for some time, and have completed the overall initial framework.The usbdump script to create the LiveUSB can be downloaded here.
Heres how this usbdump works:
- Formats the usb as UFS and copies the entire contents of the CD to it.
- Modifies the microroot on the USB by untarring the contents of the allbak.tar file to it. This adds the following files:
- sbin/backup.sh
- sbin/sessionmgr.sh
- sbin/session-shutdown.sh
- sbin/signature.sh
- sbin/networksetup.sh
- sbin/FirefoxScript.sh
- sbin/macids
- lib/svc/method/sysconfigure-system
- lib/svc/method/fs-root
- Create a big file to fillup all the unused space on the USB and lofi mounts this file as a device
- This is formatted as UFS, and and is used for saving the user data and settings.
- This initial contents of this are untarred from savemap.tar
The call sequence of various scripts is :
init-> ....-> fs-root -> sessionmgr.sh -> (signature.sh, networksetup.sh)
init-> ....-> sysconfigure-system
signature.sh -> macids
session-shutdown.sh -> bachup.sh (->FirefoxScript.sh)
The scripts explained:
backup.sh : (Not to be called manually) looks into the filesystem to search for new files and tars them up to the saveback area (/mnt/saveback/common/backup.tar by default). This script refers to /mnt/saveback/common/profiler.list to enlist the important files that need to be saved. This file can be modified by the user to his specific needs. The default saves Firefox and thunderbird settings, firefox addons, gaim settings, xmms settings and new files on the desktop.
(NOTE: It is recommended that profiler.list only be used for small files. For large datafiles, audio,video, etc, save them to /root/Documents and these always be available after reboot. You can use the Documents link on the desktop to access these.)
sessionmgr.sh : (Not to be called manually) Is called by fs-root on bootup and looks for saved profiles of that machine. If found the keyboard, desktop, X11 and network settings are automatically loaded.
signature.sh : (Can be called manually) Displays the signature of that particular PC. It currently uses macids to look for the ethernet mac IDs and uses the first such ID as the signature. Is called by sessionmgr.sh
networksetup.sh : This should be called manually by a user on a PC he wants the network settings to be remembered across sessions. It internaly calls inetmenu and saves the user config to /mnt/saveback/sessions
session-shutdown.sh : This should be called manually when the user wants the changes made to the current settings need to be saved. This calls backup.sh internally.
sysconfigure-system is a system script that mounts the /root/ filesystem on belenix on RAM. This has been modified to load the session data when booting up.
Summing up the user has to know:
- /root/Docments is where all data files go.
- session-shutdown.sh is the script to be run before powering off a system if the changes made in that session need to be saved.
- /mnt/saveback/common/profiler.list determines what need to be saved
- networksetup.sh is the script to be run on systems where the user wants network config to be persistent.
This is a technical know-how of the current state of usbdump currently in alpha stage. Lots of improvements are needed:
- /mnt/saveback is lofi mounted file on the USB. Using xlofi instead would mean an encrypted and secure LiveUSB.
- A collection of profiler.list for different types of users. The included one is minimalist (doesnt even save .profile). I solicit help here by users to add your important files to this and send me back the profiler.list.
- Currently only /root/Documents has been loopback mounted to the writable space. This can also be done easily to other important areas like /opt/csw, etc, which would allow users to install applications from repositories like blastwave onto the LiveUSB.
- Script cleanup/ removal of debug stuff.
Once stable and mature enough these scripts would be useful to the livemedia and Indiana projects.
Is there any feature you'd like to see on the LiveUSB? All comments and suggestions are welcome. You can join in on the discussions at belenix-discuss, this blog or mail me directly: anil dot verve at gmail.
Posted by anilg [Solaris] ( August 27, 2007 07:58 PM ) Permalink | Comments[2]

Hey Anil, I came across your work yesterday. I have an SDHC 4GB card I'm trying to dump OpenSol2008.5 to. Can your existing script be modified to allow 2008.5 to boot off the SD card? Can you give me some pointers on the differences between Belenix and OpenSol2008.5? This way, i would how much work is needed. Thanks -kyle
Posted by Kyle L on May 12, 2008 at 09:05 PM IST #
You can follow the below bug and download the scripts from there.
http://defect.opensolaris.org/bz/show_bug.cgi?id=256
Posted by Anil Gulecha on May 13, 2008 at 12:50 AM IST #