[Fedora-livecd-list] [PATCH] overlay/persistence patch, updated, still development quality

Douglas McClendon dmc.fedora at filteredperception.org
Wed Sep 26 12:47:32 UTC 2007


Here is another update to my devicemapper-snapshot based LiveOS 
persistence implementation.

Still developer quality, and nothing really changed since the last 
version other than bringing it up to date with the current livecd-tools 
git tree.

Other than what I mentioned in the prior posts, the following new things 
are relevant-

- code has not been put in to mimick the running-from-git-directory 
feature that applies to mayflower.  Thus the 3 files (findoverlay, and 2 
.patch) files would need to be in /usr/lib/livecd-creator for it to work.

- ntfs support removed.  I tested with vfat (also noticing that a mount 
-t auto on a mkfs.msdos created filesystem results in vfat).

- Only livecd-fedora-7-desktop.ks has the necessary gross code to patch 
/etc/rc.d/init.d/functions and halt.

- it is off by default, so the basic way to test would be-

git clone ...
cd livecd
patch -p1 < /tmp/downloaded_overlay.patch
cd creator
cp *.patch findoverlay /usr/lib/livecd-creator
./livecd-creator --config=../config/livecd-fedora-7-desktop.ks \
     --fslabel=somelabel
qemu-img create testoverlay.img 4G
qemu -net none -m 384 -boot d -cdrom ./somelabel.iso \
     -hdb ./testoverlay.img

under qemu:
fdisk /dev/sda, create a partition, give it a dos/vfat label (e.g. 6), 
mkfs.msdos /dev/sda1
mkdir /mnt/test
mount /dev/sda1 /mnt/test
mkdir /mnt/test/LiveOS
dd if=/dev/zero of=/mnt/test/LiveOS/Persistence-somelabel- \
   bs=1M count=256
# note trailing dash above, it matters.
umount /mnt/test
init 0 (or just ctrl-c qemu)

(DONE WITH INIT)

now invoke qemu again in the same way, but at isolinux boot, hit tab, 
and add "overlay=auto" to the kernel boot arguments.

do some stuff
shut down cleanly

jump to (DONE WITH INIT) as often as desired...  maybe things will 
persist if no bugs were encountered...

Definitely much polishing and debugging yet to be done.  But it does 
seem to work (at least until you forget to - or are unable to - cleanly 
shut down, at which point your persistence data may well become 
corrupted beyond repair)

-dmc




More information about the livecd mailing list