Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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'm trying to make a USB boot ubuntu for day-to-day operation. Not live necessarily, but certainly to:

  • Persist changes (including local document store)
  • Password-protected logins (though single user)
  • Minimal damage to USB blocks

I'm not looking to run a machine off of this 24/7, just to use as an alternate boot OS for sitting in hotels with company laptop of an evening; I don't want my stuff left on their platters.

Persisting changes can be covered by the likes of unetbootin and Universal USB Installer, this much I have gathered. Secured login though appears to be an issue under such solutions as there is no authentication on these live instances - even creating a new user does not counter this as (I found) the system simply auto logs into the new user and you can't disable this feature - relevant controls are grayed out.

How can I disable automatic login on a LiveUSB?

Using the above as a guide I stoved my first live USB as the entries in the post do not match the 12.10 file content and adding the additional line appears to be the breaking change; I added it, the install broke.

Onto USB life-span - I found a rather in depth article and no doubt to some it all makes perfect sense but to be honest I struggled with it, which goes into some detail including the mention of virtual partitions for high read-write processes that are not persistence critical:

In contrast to that there are of course (again) the stand-alone applications like unetbootin and Universal USB Installer, but none of them seem to breach whether or not they make use of tmpfs for data that does not need to be persisted, logs, apt cache etc and nor do they state if the file system is set out in a way to preserve the USB - the use of swap partitions is pointless on a stick.

SO in short, can anyone layout or point me in the the direction of simple steps to achieve my requirements?

I say simple.. I'm not a complete simpleton, but editing files is simple, copying text is simple, replacing values is simple... running scripts is less simple and if Ubuntu and the Linux community want Windows dead, there's still a lot to be done to make the life of a casual Linux user, such as I, easy.

Would also be interested in assisting writing such a guide if someone has the know-how and the inclination; I can document processes given sufficient info :)


share|improve this question
I actually thought about doing this but found it to be a nightmare. The IO on a flash drive is too low. However, this was with USB 2.0; so 3.0 might be sufficient. I have used DSL though and that wasn't too bad. – jersten Jan 27 '13 at 4:18
Well to be honest, it's the I of the I/O that gives the largest performance hit, which is why I want no swap and more virtual partition usage for stuff like session data. As for USB read speed, I think a little lag is acceptable in my scenario; essentially I'm just looking to make a netbook for web access, skype and simple games. – Paul Eden Jan 27 '13 at 13:43
As a followup, also found this post which I'm having a go at, though as I'm running from within VMWare anyway, the virtualisation aspect is not possible for me:… – Paul Eden Jan 27 '13 at 21:29

You boot a computer with a Live CD or USB stick. You then insert (another) USB stick and install Ubuntu on to it. When you run the installer, you select the (second) USB drive for installation and choose the manual partitioning. If it creates a swap partition, you can edit and set it to "do not use the partition." There is some "swap off" command that you can try. Gparted also allows you switch off the swap.

share|improve this answer
Thanks for the shout on gparted - still comparatively very new to linux. Now to rebuild my stick :) – Paul Eden Jan 27 '13 at 13:54

I have an external hard disk, which boots with Ubuntu 12.04. (Some details here on my setup)

Essentially you need to install Ubuntu on your USB, and not make it a live usb.

  1. Get a Live CD or USB ready (this is what you will use to install Ubuntu)
  2. Get another USB, at least with ~4GB of space. (this is where you will install Ubuntu)
  3. Boot from the first USB.
  4. During the installation, choose /dev/sdb1 or /dev/sdc1 as the installation disk (where you will install ubuntu). This should be sdb1 ideally, since you would be using it on other systems, where this will be second disk (the first being internal HDD of that computer)
  5. Choose /dev/sdb as the GRUB destination to install the boot-loader on that machine

Now, you can reboot and remove the installation usb/CD. You should get the grub boot from your USB. You can move this usb to different computers and it should comfortably boot to Ubuntu.

The only issue is that since your GRUB setup is hardwired to /dev/sdb1 (second hdd), you would have to make sure that it is the second drive on whichever machine you wish to boot.

share|improve this answer

you can burn multi-system on CD or install multi-system on usb-stick and manufacture innumerous distris on one stick. have fun !

share|improve this answer

Following is step by step how to do a Full install of 12.04 on a 8GB flash drive. 12.10 is similar.

For larger drives make larger partitions.

A quality flash drive with wear leveling, running Ubuntu casually, should last years:

Turn off and unplug the computer. (See note at bottom).

Remove the side from the case.

Unplug the power cable from the hard drive.

Plug the computer back in.

Insert the flash drive.

Insert the Live CD.

Start the computer, the CD should boot.

Select language

Select install Ubuntu.

Select Download updates while installing and Select Install this third-party software. Continue

At "Installation type" select "Something else". Continue

Confirm Device is correct.

Select "New Partition Table"

Click Continue on the drop down.

(Optional partition for use on Windows machine)

Click "Free space" and "Add".

Select "Primary".

Make "New partition size..." about 1000000 bytes.

Location = Beginning.

"Use as:" = "FAT32 file system".

And "Mount point" = /windows.

Select "OK"

Click "free space" and then "Add".

Select "Primary", "New partition size ..." = 4000000 to 6000000 bytes, Beginning, Ext4, and Mount point = "/" then OK.

(Optional home partition)

Click "free space" and then "Add".

Select "Primary", "New partition size ..." = 1000000 to 4000000 bytes, Beginning, Ext2, and Mount point = "/home" then OK.

(Optional swap space, allows hibernation)

Click "free space" and then "Add".

Select "Primary", "New partition size ..." = remaining space, (1000000 to 2000000 bytes, or same size as RAM), Beginning and "Use as" = "swap area" then OK.


Confirm "Device for boot loader installation" points to the USB drive. Default should be ok if HDD was unplugged.

Click "Install Now".

Select your location. Continue.

Select Keyboard layout. Continue.

Insert your name, username, password, computer name and select if you want to log in automatically or require a password.

Selecting "Encrypt my home folder" is a good option if you are worried about loosing your USB drive. Select Continue.

Wait until install is complete.

Turn off computer and plug in the HDD.

Stick the side panel back on.

Note: You may omit disabling the hard drive if after partitioning you choose to install grub to the root of the usb drive you are installing Ubuntu to, (ie sdb not sdb1). Be cautious, many people have overwritten the HDD MBR.

share|improve this answer

Your Answer


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.