Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to install Ubuntu 11.04 to my 16 GB fast USB flash disk (I don't want "installation" with Universal USB Installer as written on original Ubuntu site).

I want it for portable use. I wonder if there are any optimizations for that, like:

  • keeping things in RAM as long as possible,
  • minimizing disk writes (that's so bad for flash),
  • dealing with hardware drivers when running on other computers,
  • et cetera.

My requirements are:

  • full "/" partition encryption (I know that /boot/ can't be encrypted)
  • not using Universal USB Installer
  • no extra partitions for persistent changes.

Any tips for above things, partitioning or useful system changes would be appreciated.

share|improve this question
Linux Live will actually copy your entire root partition to RAM, so that there is no flash drive access at all. Many Slackware based CDs use it (NimbleX, Slax), and might help you your 1st and 2nd points. (I don't know about how compatable they are with Ubuntu's method of booting, unfortunately). – new123456 Sep 9 '11 at 22:07
@new123456: Seems good, but it uses file for persistent changes, that's what I don't want. – Matej Sep 10 '11 at 7:33
up vote 1 down vote accepted

I did an ubuntu-install with exactly your three requirements (as they match mine). And I did nothing special about it, except I used the alternate Ubuntu-install to turn disk-encryption on.

I did the following:

  • Download alternate iso: (use the iso with alternate in the name)
  • Install it on a bootable medium (i used a smaller usb-stick with the USB-Installer, but CD is fine too)
  • Boot from the install-medium
  • Put your target USB-stick in and install to that location (if you are unsure which drive is correct, you should look at the disk-size)
  • Enable encryption (LVM) in the installation-process
  • Reboot from your newly installed Ubuntu from the USB-disk

That worked for me some years now. I can use this stick on different computers, as the hardware will be detected automatically. It is somewhat slower from USB, so I use a lightweight window-manager. LXDE or XFCE should be fine. You could add noatime,nodiratime to /etc/fstab to reduce writing to the USB. I also deactivate Swap, as most machines I use provide more than 1GB of RAM and that's enough for my needs.

share|improve this answer

You must log in to answer this question.

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