6

I'm looking for a live USB Linux distribution that would offer semi-persistent functionality. What I mean by that - normally the system should work in a non-persistent mode (read-only) and no writes should be performed to the medium at all. Occasionally, after controlled updates to the system, I should be able to manually save the changes from that particular session without remastering the original image (be it by CLI, a "save button" or entry in the shutdown menu).

I used an old version of Slax (version 5, maybe 4) for that very purpose a long time ago. Unfortunately, I would need something more recent now (current Wi-Fi drivers, browsers etc.).

Most of the distributions I've encountered now either allow full persistence or none. The best I've found is selectively discarding changes per session, but still writing to the medium (unnecessary wear on the drive).

Additionally, it would be nice if the distribution would load from power on to a working desktop completely unattended, surely the faster the better (but it's not that crucial).

The most adequate solution I've found so far is a Puppy LiveUSB modified for Online Banking (you can see the interesting part in Additional Information: The Details of Completed Changes). But I would hope for some more mainstream distribution, at least in part audited by being used by a large userbase.

Do some of the more popular distributions offer this kind of functionality? Or alternatively, is there a way to tweak casper-rw to behave in that manner?

5
  • 2
    Disclaimer: Puppy Linux fan. For what it's worth, Puppy Linux is ranked 8th on the distrowatch.com Page Hit Ranking chart. Is it really that obscure? Or are you referring to the specially modified Puppy?
    – boehj
    Commented Jun 2, 2011 at 10:47
  • In that case I was referring to the modified image. Not that I assume any malevolence from the author, but I still feel uneasy about customized images, especially for more security conscious applications. So I'm looking for a way to recreate it on a mainstream image. If I am able to stick with Ubuntu/Fedora/openSUSE, the better. Commented Jun 2, 2011 at 10:56
  • 4
    Asking for a distribution recommendation then ruling out anything that isn't the top three best known distros is utterly unfair. The reason other distros exist is to tailor linux to specific needs. Many of what you would call non-mainstream distros are actually very good and should be considered. Their security can be judged on their open-ness. If they full build system and any patches to included apps are in the open, you probably don't have anything to worry about.
    – Caleb
    Commented Jun 2, 2011 at 12:20
  • Yes, I agree. But a one-time "download here" precompiled customized images normally do not get the open build system you describe. However, for the time being the distribution breed is not that important. First, I would have to find any recent distribution that would support it. With enough openness I could either use it directly or try porting the feature to a (similar) distribution of choice. But right now even Slax migrated to full transparent persistence. Or I couldn't find it (yet). Commented Jun 2, 2011 at 16:15
  • I was looking for basically the same thing. Ubuntu Forums have a post about exactly this. Haven't checked it out yet, but looks promising.
    – user9060
    Commented Jul 14, 2011 at 7:17

3 Answers 3

2

What you are looking for is pclinuxos, it has a live usb installer on the live cd menu. Once installed to usb and booted it offers a menu for either live boot or live with persistence.

My install of the 2009 was what you desire... I am just testing the 2011 offering but it has a difference in that it boots live by default rather than persistence which is even better for you.

2

Alpine Linux is designed in just the way you describe. The following text (authored by me) is from their wiki:

Another distinctive part of Alpine is its variety of "installation modes." It can be installed to a hard disk/SSD/other storage medium like any other distro; this is called the sys mode. The storage medium in question can be removable, if you like, so long as you can configure your machine to boot from it. However, if you're working with removable media, there are two other installation modes you might consider. In each of these modes, you will boot your machine from a static ISO image (either a CD or a USB partition configured like the CD). You will also need a writable medium to save updates to the system. In the diskless mode, this writable medium is typically a small USB key (or a second USB partition) that holds the changes you want to persist. Both the base Alpine system and all your changes will be unpacked into a memory-based filesystem. The other, data mode is for cases where you're dealing with a large amount of persisting data, that you want to keep on a hard disk/SSD/other storage medium, rather than unpacking into memory. The default setup here is to store your /var partition directly on the hard storage medium. But as in the diskless mode, your root system still comes from a static ISO image.

The second and third modes are sometimes referred to, collectively, as "run-from-RAM" installations.

Key to the second and third modes is Alpine's lbu utility. This tracks which files you've modified from their static ISO version, and want the changes to persist. The lbu utility saves those changes in .apkovl "overlay" files (these are essentially tar-gzip archives, though they can also be encrypted).

You can use the lbu utility with the sys mode, too, if you like: as a form of backup, or to configure overlay files for other systems. But for a robust incremental backup system, you'll probably want a more specialized tool.

What you're envisaging is what's described above as the "diskless" mode. You can configure the list of what gets persisted and what doesn't in as fine-grained a way as you like. Also, you can configure so that changes are only persisted when you explicitly request it.

0

In the end I managed to get a working solution by using a Debian Live image and a little tweaking with live-boot and live-snapshot.

By disabling the line:

${DO_SNAPSHOT} --resync-string="${ROOTSNAP}"

inside do_stop () in /etc/init.d/live-boot the snapshots are automatically loaded, but are not synced on shutdown. So this way it's possible to manually save COW changes when needed (live-snapshot -f) and rest of the time all system evolutions are discarded.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .