[Fedora-livecd-list] The long-awaited landing of persistence

Jerry Vonau jvonau at shaw.ca
Fri Mar 7 23:27:00 UTC 2008


Douglas McClendon wrote:
> Jeremy Katz wrote:
>> After long periods of waiting and hoping, etc I'm just about to do a
>> push of some changes that at least give us a good base to build on for
>> persistent live images.  They're very very very heavily based off of
>> Douglas McClendon's patches that he posted here a month or two, but I've
>> done basically two things with them:
>> 1) Integrated the findoverlay bits into mkliveinitrd directly and was
>> able to do a little bit of cleanup accordingly
> 
> No general objections.  As I look at it more, I'm sure I'll start 
> submitting some patches for mkinitrd.
> 
>> 2) Not put in the bits right now to do the snapshot teardown on shutdown
> 
> No objections.  I admit, that I also have not witnessed a failure, since 
> some kernel improvement maybe half a year ago seemed to make it 
> crash-proof.  But of course it should do the right thing to shutdown 
> cleanly.  But I agree that can be deferred for now.
> 
>> The former is pretty non-controversial.  The latter, well, we're going
>> to need some testing to know how feasible this really is.  I spent quite
>> a while this afternoon trying to cause any form of corruption without
>> the initscripts changes and never succeeded[1].  And realistically, if
>> it's going to cause corruption if we don't shutdown cleanly, then we
>> have problems if someone loses power or removes their USB key or any of
>> a whole bunch of other things occur.  I _did_ have the journal get
>> recovered and as long as things were able to get to the journal, it was
>> good to go.  But more testing is going to be needed.  So if anyone here
>> wants to try building some images and putting them on USB drives and
>> testing them out, that'd be greatly appreciated.  And then I'm going to
>> issue a larger call for testers with the Fedora 9 beta.  If we find that
>> we need to integrate some of the shutdown bits, we'll make it happen.
>> But right now, I'm feeling pretty confident that we won't
>>
>> The quick steps of how to take advantage of the functionality:
>> 1) Build a live image using the newer mkinitrd (6.0.32) in your repos
>> 2) Use the updated livecd-iso-to-disk.sh with an --overlay-size-mb=512
>> (or 1024 or whatever based on the capacity of your USB stick minus the
>> size of the ISO)
> and minus whatever space you want for other stuff on the liveusb.  I see 
> plenty of interesting uses of LiveCD/USBs with this feature, and the 
> writable area.  I haven't yet looked at what Jeremy actually merged, but 
> the LiveUSB host filesystem (typically vfat) will be accessible under 
> /mnt/overlayfs.  I think in the LiveUSB case it is also /mnt/live.
> 

Anybody else adding swap to their usb? That would be a nice option for 
the live2usb script, IMHO, just not sure for the best/right way to add 
that... I use a usb2ide adapter, and have a pre-existing swap partition 
  that "just works" on boot.

>> 3) Boot the USB drive
>>
>> You can also (although it's more complicated) use a USB stick with a CD
>> 1) Build live image as in 1) above
>> 2) Create /LiveOS/overlay-$v- on your USB stick with size how ever big
>> you want (can be a sparse file).  $v is the label of the _iso_ (not of
>> the USB stick)
>> 3) Find the label or UUID of the partition on the USB stick you're
>> using.  Write it down.
>> 4) When you boot the CD, have the USB stick plugged in and add to the
>> kernel command line
>>           overlay=$dev
>> where $dev is what you found in step 3.  If it's a label, do LABEL=foo;
>> similarly uuid ==> UUID=foo.
>>

So lets just say that you boot your initrd, have the means to setup the 
network, retrieving your "overlay file", could you then merge that into 
the base livecd before your really mount sysroot?

Wow, I'm thinking updates as you boot or just before you install to the 
hard-drive.... Or maybe grab my personal mod's from here... Or base live 
+ overlay = spin...  Just some random thoughts...


>> Big big big thanks and kudos to dmc for doing all of the legwork here
>> and letting me off the hook for so long on actually getting it
>> integrated.  But once I finally got around to having a full afternoon to
>> spend on it, it was in great shape.
> 
> Thanks, and no problem.  Of course, now I/someone really need to put 
> together a brief overview/faq page, to especially drill in the 
> mechanism, and set expectations appropriately given the mechanism (i.e. 
> as with ram for the livecd, creating and deleting files is not currently 
> handled as ideally efficient as one would like).
> 
> But given the appropriate expectations, I expect to see it end up being 
> useful in a lot of situations.  And I am sure that in the future the 
> feature will improve over this initial functionality.
> 

Yes it will, thank you for the great start.

Jerry




More information about the Fedora-livecd-list mailing list