Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to create a live system on a USB key / SDCard with Linux Mint 14 (KDE or Debian Edition) that stores data persistently. The USB key needs to have at least one fat32 partition. As storage for the persistent files I could either use this partition, another partition on the USB key (possibly with another filessytem) or an image file on a NTFS formated HDD.

I've tried both Mint 14 Debian Edition and KDE Edition as a live system with persistence file/partition but failed both times when updates tried to change the boot system.

I've now done a full install on the USB key, installed packages, updated and now want to change this into a live system by transferring most of the system to a read-only squashfs image on the fat partition, use a UnionFS (or aufs) to make that writable storing things on a second (ext2) partition of the USB key and mount things like /home from an image on the hdd (for disk space reasons).

Can somebody advise which parts of the filesystem are suited to be placed inside the ro squashfs and which should be implemented as tmpfs ramdisks (/tmp? /var?). What's the best file system to be used inside the sparseimage for /home? What about /proc and other 'special' directories? Do they need to be handled differently? Is it sufficient to place the options in /etc/fstab? Or do I need to edit scripts inside the initrd.lz bootimage for the root fs?

I know this is rather complicated. I'm also thankful for any links to blog posts or tutorials about that matter.

share|improve this question

1 Answer 1

Take a look at the LiveCD images for your favorite distribution. A dissection of that should guide you.

Or save yourself the hassle, find out how they create LiveCDs, and work from there. Fedora LiveCD gives some pointers (for Fedora, other distributions must have something similar).

share|improve this answer
    
Dissecting them is not easy, as they hide away the filesystem configuration behind several layers of startup scripts and intermediate image files. I hoped someone could know. (and -1 for proposing a Fedora LiveCD to learn something aout a Debian-based system.) –  Chaos_99 Feb 10 '13 at 16:30
    
"...they hide away the filesystem configuration behind several layers of startup scripts and intermediate image files" - which is exactly what you'd have to do in order to achieve what you describe in the question. LiveUSB systems tend to implement persistent overlays as device mapper copy-on-write snapshots, where every change (writes and deletes) consume free space from the overlay. LiveCD systems are more akin to what you describe (except that the backing for the copy-on-write overlay would only exist in volatile memory via tmpfs). –  Thomas Nyman Oct 3 '13 at 8:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.