View Full Version : Live Persistence
pitonyak
30th April 2008, 01:47 PM
Does anyone know how Live persistence works? I am writing an article, and I claim the following:
Live distributions use dm-snapshot to layer a read/write snapshot in RAM on top of the read-only media; a DVD, for example. Changes, therefore, are made in RAM and not persisted.
Fedora 9 introduces Live Persistence, a Live USB key that saves its state. With Live Persistence, the snapshot is a file on the USB key, rather than a snapshot in RAM. Changes, therefore, are automatically persisted to the USB key. Although accessing a USB key is slower than accessing RAM, more memory is available for other uses.
I believe this to be correct, but would like to verify. For example, it is possible that RAM is still used for the snapshot, but that the snapshot is persisted to the USB Key on shutdown, rather than using the file on the USB Key as the snapshot. Any insight is appreciated.
I sent an email to Douglas McClendon a few days ago to ask him, but he did not respond.
OralDeckard
30th April 2008, 09:38 PM
I'm pretty sure the best way to get this information is to actually do a persistent USB stick.
Here is a link that should help you accomplish this:
http://fedoraproject.org/wiki/FedoraLiveCD/LiveCDHowTo
From what I understand of it, it is to have the live image right on the USB stick and not have to worry with a CD or DVD.
I may try it myself, and do it with a CD where I change the /etc/fstab to define /home as a partition on the USB stick. I do that now with hard disks, making the /home folders serve whatever Linux is fired up. For a Live CD of DVD it seems to me that this would be far better.
pitonyak
30th April 2008, 09:56 PM
I do have a Live USB, and I verified that it works and that it persists. My concern is related to a few specific details. Well, answer this question, and I am finished:
Is the "layer" created and used on the Live USB, or is it used in memory and then persisted to the USB Key on shutdown?
If you following the "howto", you will NOT create a Live Persistent USB Key. You must use the newer livecd-iso-to-disk script. This script is included with the Live distribution, or, you can download the script directly from here:
http://git.fedorahosted.org/git/?p=livecd;a=blob_plain;f=tools/livecd-iso-to-disk.sh;hb=HEAD
This does work. I just want to make certain that the article in the Linux Magazine are accurate.
A.Serbinski
30th April 2008, 10:13 PM
According to the wiki: "This is done by having the snapshot used for the live image kept on the USB stick rather than in RAM"
Seems to me that this is a silly way to do it, wouldn't it be better to just install to the USB? Then there's no need to mess with snapshots.
AntMan
30th April 2008, 10:33 PM
Seems to me that this is a silly way to do it, wouldn't it be better to just install to the USB? Then there's no need to mess with snapshots.
Using a LiveUSB setup helps when installing onto devices without a CD-rom or network connection. My IBM subnotebook doesn't have a CDrom and the USBlive installer worked like a charm when installing Fedora onto it.
pitonyak
1st May 2008, 02:31 AM
I am NOT an expert, but the following "feels" correct:
If I install to a USB Key, then it will no longer act like a "live" device. Specifically, it will set specific paths (say in /etc/mtab) tied to a specific device. With a Live USB, that path will change when I place it into another computer.
In other words, there appears to be a clear difference in the way that things are configured for a normal install.
That said, I can also interpret Serbinski's comments to mean that the live image should be installable as a live disk so that updates go directly to the key without using an overlay file. Off hand, this does sound like the proper way to solve this problem, providing it still acts like a "Live USB" on boot and is usable on different computers and not tied to one.
Thanks for the information, this seems to verify what I wrote in the article.
Oh, and my guess is that this was simply the easiest path to a working solution.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.