User:Schivmeister/ArchLinuxUFD

From ArchWiki
< User:Schivmeister
Revision as of 12:09, 2 January 2011 by Schivmeister (Talk | contribs) (create page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Goal

Set up an Arch Linux environment on a USB Flash Drive, commonly known as a pen- or thumbdrive.

The Challenge

Find the optimal installation method that should:

  • Be low on memory footprint to be used on older machines (but still i686)
  • Minimize disk writes
  • Save at least some information (persistence)
  • Enable use of the drive across platforms (a single or first vfat partition)
  • Have a full environment for one-stop production and recovery (i.e sysadmin and traveller tool)

Estimated size of installation: 3.5G (full Openbox desktop with all the apps you'll ever need)

The Options

Installation

Frugal

Create custom ISO, unpack ISO, install syslinux. Or boot the ISO directly from GRUB/syslinux.

Caveats: More RAM usage than full install

  • On a single vfat partition
    • Caveats: More visible files on the UFD
  • On a second ext2 partition
    • Caveats: Some Windows systems will have trouble mounting the first vfat partition especially for large devices (>= 32GB)

Full

No ISO creation involved.

  • On a second ext2 partition (pacman -r or mkarchroot + GRUB or syslinux)
    • Caveats: Randomly appears to freeze the system for a few seconds, inherits the Windows trouble above for multi-partitioned UFDs, plenty of disk writes
  • On a virtual disk image stored on a single vfat partition (ala Wubi)
    • Caveats: Probably inherits all problems from normal full install above except for Windows trouble

Frugal Data Persistence

  • Persistent overlay (complicated, but the best, saves everything seamlessly)
  • Persistent home with loop-mounted disk image (straightforward, user data only, system changes remain unsaved)
  • Persistent home by mounting the vfat partition as /home (prone to permission problems, hidden files visible on Windows and looks cluttered)

Case Study: Fedora

Fedora appears to be the most user-friendly Live USB distro. First of all it has a cross-platform Live USB creator, and secondly has seamless saving of system and user data. Your UFD stays intact and needs no formatting.

This is achieved by a "persistent overlay" based on what's called an "LVM copy-on-write snapshot". The huge disadvantage here is that with every change free space is used up on the overlay, and ultimately you will end up with an overlay that is full.

Case Study: Ubuntu

Ubuntu's Live USB creator uses the "casper-rw" flag for an ext2/3/4 partition to retain all data changes. This requires, obviously, an extra partition either by means of multi-partitioning the UFD or by using a loop-mounted disk image.

Ideas

  • Implement some way to use localepurge during ISO creation to reduce the size of the image drastically (3.5G down to 3G)