Patches to persistent changes to snapshot on usb stick
First I'd like to describe the thing I tried to
accomplish,
- Prior to shutdown, take a snapshot of what have been
changed since boot and make it persistent to a
partition or file.
- When machine is booted, retrieve the snapshot and
restore the changes that it consists of.
The reason why I don't want to use root-persistent was
because usb stick has limited life of write (thousands
of times).
By leveraging what was provided by root-snapshot, I
was able to (almost) do it with minor changes in the
attached patch files.
Below is the way I make it work (please tell me if you
can make it work with make-live).
1) Unpack initrd.img, patch live.patch and
live-helpers.
2) Patch live-helpers under
/usr/share/initramfs-tools/scripts.
3) patch live-snapshot under /sbin/
4) Create a partition labeled 'cow-sn' on usb stick,
or create a dummy file named 'cow-sn.squashfs'
directly under a partition of usb stick. Partition can
be vfat or ext2/ext3.
5) reboot, specify 'persistent' on booting prompt.
Initramfs will copy whatever in 'cow-sn' or
'cow-sn.squashfs' (I don't know what will happen if
you use both) to /cow.
6) To take a snapshot to persist it to usb stick, '.
/etc/live.conf; live-snapshot
--resync-string=$COWSNAP'
I haven't been able to make the last step
automatically happen on shutdown (I can't make
root-snapshot work this way either).
Let me know if it works for you.
Thanks,
Kenneth
____________________________________________________________________________________
Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: live.patch
Type: application/octet-stream
Size: 1408 bytes
Desc: 2341096112-live.patch
Url : http://lists.alioth.debian.org/pipermail/debian-live-devel/attachments/20070828/d4e420a2/attachment-0003.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: live-snapshot.patch
Type: application/octet-stream
Size: 1301 bytes
Desc: 869876428-live-snapshot.patch
Url : http://lists.alioth.debian.org/pipermail/debian-live-devel/attachments/20070828/d4e420a2/attachment-0004.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: live-helpers.patch
Type: application/octet-stream
Size: 190 bytes
Desc: 46518925-live-helpers.patch
Url : http://lists.alioth.debian.org/pipermail/debian-live-devel/attachments/20070828/d4e420a2/attachment-0005.obj
Reply to: