SEARCH

How-To Geek

Create a Persistent Bootable Ubuntu USB Flash Drive

Don’t feel like reinstalling an antivirus program every time you boot up your Ubuntu flash drive? We’ll show you how to create a bootable Ubuntu flash drive that will remember your settings, installed programs, and more!

Previously, we showed you how to create a bootable Ubuntu flash drive that would reset to its initial state every time you booted it up. This is great if you’re worried about messing something up, and want to start fresh every time you start tinkering with Ubuntu.

However, if you’re using the Ubuntu flash drive to diagnose and solve problems with your PC, you might find that a lot of problems require guess-and-test cycles. It would be great if the settings you change in Ubuntu and the programs you install stay installed the next time you boot it up.

Fortunately, Universal USB Installer, a great little program from Pen Drive Linux, can do just that!

Note: You will need a USB drive at least 2 GB large. Make sure you back up any files on the flash drive because this process will format the drive, removing any files currently on it. Once Ubuntu has been installed on the flash drive, you can move those files back if there is enough space.

Put Ubuntu on your flash drive

Universal-USB-Installer.exe does not need to be installed, so just double click on it to run it wherever you downloaded it. Click Yes if you get a UAC prompt, and you will be greeted with this window. Click I Agree.

sshot-1

In the drop-down box on the next screen, select Ubuntu 9.10 Desktop i386. Don’t worry if you normally use 64-bit operating systems – the 32-bit version of Ubuntu 9.10 will still work fine. Some useful tools do not have 64-bit versions, so unless you’re planning on switching to Ubuntu permanently, the 32-bit version will work best.

sshot-2

If you don’t have a copy of the Ubuntu 9.10 CD downloaded, then click on the checkbox to Download the ISO. You’ll be prompted to launch a web browser; click Yes.

sshot-3

The download should start immediately. When it’s finished, return the the Universal USB Installer and click on Browse to navigate to the ISO file you just downloaded. Click OK and the text field will be populated with the path to the ISO file.

sshot-5

Select the drive letter that corresponds to the flash drive that you would like to use from the dropdown box. If you’ve backed up the files on this drive, we recommend checking the box to format the drive.

sshot-6

Finally, you have to choose how much space you would like to set aside for the settings and programs that will be stored on the flash drive. Considering that Ubuntu itself only takes up around 700 MB, 1 GB should be plenty, but we’re choosing 2 GB in this example because we have lots of space on this USB drive.

sshot-7

Click on the Create button and then make yourself a sandwich – it will take some time to install no matter how fast your PC is.

sshot-8

Eventually it will finish. Click Close.

sshot-9

Now you have a flash drive that will boot into a fully capable Ubuntu installation, and any changes you make will persist the next time you boot it up!

Boot into Ubuntu

If you’re not sure how to set your computer to boot using the USB drive, then check out the How to Boot Into Ubuntu section of our previous article on creating bootable USB drives, or refer to your motherboard’s manual.

Once your computer is set to boot using the USB drive, you’ll be greeted with splash screen with some options.

sshot-10

Press Enter to boot into Ubuntu. The first time you do this, it may take some time to boot up. Fortunately, we’ve found that the process speeds up on subsequent boots.

sshot-11

You’ll be greeted with the Ubuntu desktop.

sshot-12

Now, if you change settings like the desktop resolution, or install a program, those changes will be permanently stored on the USB drive! We installed avast! Antivirus, and on the next boot, found that it was still in the Accessories menu where we left it.

sshot-13

Conclusion

We think that a bootable Ubuntu USB flash drive is a great tool to have around in case your PC has problems booting otherwise. By having the changes you make persist, you can customize your Ubuntu installation to be the ultimate computer repair toolkit!

Download Universal USB Installer from Pen Drive Linux

Trevor is our resident Linux geek, but always keeps his eyes open for neat Windows tricks too.

  • Published 04/15/10

Comments (72)

  1. tehsnarf

    What would you do about updates? I noticed there are a ton of updates since the time the install cd was made… are they all stored on the casper portion, or are they magically updating the files they’re suppose to, or am I thinking too much in this?

  2. JKingz

    is it necessary to do a virus scan from a bootable USB or a LiveCD or can i run the virus scan from an existing Linux installation on the computer? because i have a xp machine that i would like to scan but in the same computer i already have ubuntu installed.

  3. Khai

    thank you :)
    I wanted a setup like this to tinker with Ubuntu but not go to the trouble of installing it fully

  4. Bud Berry

    USB is fine, how do you make a CD Ubuntu??????

  5. Mike

    I LIKE and USE PenDrive Linux (although, it’s just as convenient using “Startup Disk Creator” from
    the Live Linux Dist CD).

    Still, (here’s the “but” you knew was coming). When all you have is an 8 or 16 GB USB disk
    4 GB is an underutilization of space.

    I’ve seen tutorials on moving the “home” folder (which have never worked out for me). Still
    one can format the additional space and use it for storage. It would be nice to see this relocation
    of the “home” folder option incorporated into the installation process directly (when detecting a
    larger than 4 GB drive (minimum 8 GB) or at least in the documentation for those who might want
    the option but lack the instructions or the wherewithal to figure it out for themselves.

    Otherwise, you have this really nice 4 GB OS on an 8 or 16 GB drive in which the remaining space
    is either unused (wasted) or underutilized simply as storage rather than as a relocated “home”
    folder.

    Another thing I’d be interested in seeing is just how to backup a Pen Drive OS in the event of
    a system crash rather than having to do a complete reinstall every time due to a lack of space
    full upgrade or an upgrade or installation gone wrong or a power outage in the middle of an
    upgrade or what have you.

  6. Gyffes

    I love me my bootable ‘buntus, but have a question: Does the OS update? That is, if I ‘sudo apt-get update’, will it?

  7. Trevor Bekolay

    @tehsnarf and Gyffes

    That’s a good question! I didn’t test that out yet, but I’ll do it today and report back.

    @Mike

    Good points. We’ll be doing an article on making backups and drive images soon, and those methods should work for USB drives (in any case, I’ll test it out with a USB drive).

    @JKingz

    If you have a Linux installation, then you can use that to scan your Windows hard drive, yes. The same steps as in the Antivirus article will work.

  8. Spydey

    Nice guide. Just a quick question. What would the differences be between the program in the guide and the one that is included in Ubuntu? Why would someone be more inclined to use one over the other? I the ubuntu one is called something like USB Creator, or similar. It creates a persistent file too. What are your thoughts?

    -Spydey

  9. Trevor Bekolay

    @Spydey

    The main advantage of this method is that it can be done from inside Windows. The implicit assumption of this article is that the reader doesn’t already use Ubuntu, or else this guide would be kind of moot.

    Originally, I tried to use USB Creator from within the Ubuntu Live CD to make a persistent flash drive, but I had issues doing this, likely due to the fact that I was running it through VMWare rather than natively. I still think that this can be done, but the two methods I tried — doing a full install of Ubuntu with the flash drive as the target, and using the USB Startup Disk Creator — failed at various points. Doing it through Windows proved easier and worked on the first try.

    Of course, those methods of doing it from within Ubuntu probably do still work, I just think that they’re a bit more complicated than the USB Universal Installer method.

  10. Spydey

    @Trevor Bekolay

    Thanks for the clarification. That is what I figured but I just wanted to make sure. I created a ubuntu persistent drive yesterday while I was running from one. :-) It was extremely slow but after about 30 mins, it finished. I booted from my 16GB flash drive that has a persistent ubuntu 9.04 live x32 on it. Once I was up and running, I used the built-in usb creator and created a second persistent ubuntu 9.10 live x32 on it. Worked like a charm, but was slow to create.

    One cool thing about how I have it set up is that I have my 16GB flash partitioned into 2 partitions. the first one is the persistent ubuntu install. The second one is a fat 32 partition. This allows me store any files that I might need between both my windows system and ubuntu system on the same drive that I have my ubuntu system. I also have super spyware, malwarebytes, mse (microsoft security essentials), and other malware fighters on that 2nd partition. This allows me to help any friends/family members if they get infected. I can scan first from ubuntu using avast! and then boot into safe mode in windows and have the needed programs there with me at all time.s :-) It’s my little super cleaner and OS all-in-one.

  11. Trevor Bekolay

    @Spydey

    Very cool! I only have a 4 GB USB key at the moment, but if I get a bigger one, that sounds like a great idea.

  12. Spydey

    @Trevor Bekolay

    Hey, one more thing. Just an idea but I would love to see an article in the future about using AptCD or Remastyr (sp?) to make a peronalized/customized ubuntu .iso which then could be used in conjunction with usb creator/UNetbootin/usb installer to make a personalized/customized persistent ubuntu live usb drive. That would be awesome! Plus, it would allow you install your personalized ubuntu from that usb drive if your already installed ubuntu system on your machine were to crash or go bad for some reason. Kind of like a persistent usable backup installable type of a thing. Crazy!

  13. Trevor Bekolay

    @Spydey

    Sounds very interesting, I’ve added it to my list! Thanks.

  14. markus

    this is very interesting stuff. usb sticks are much more faster and flexible than CDs for live systems.

    @Mike: about the underutilization of space: create 2 partitions on the stick, the 1st one with ~700mb and FAT32 and the 2nd with the remaining size, formatted with ext2 and labeled “casper-rw”. so you can bypass the limitation of FT32 to the filesize of 4GB.
    it can also be done with an exisiting “installation” on the stick. if you already have a casper-rw file on the stick and want to keep the data, you can copy it to your HD, mount it and transfer the files to the newly created partition.

    markus ;-)

  15. lu

    I am rather new a Pc stuff …I put Ubuntu on a thumb drive a month or so ago.as you recommend…so if my PC had a problem I could down load Ubuntu from my thumb drive to my PC….is what your saying now is that there is a new & better way to do this…please help me understand…thanks

  16. Arthur

    Hi, thanks for a very good tip for installing Ubuntu on a USB flash drive. Not sure whether this has already been asked, but as you yourself said you had shown how to put Ubuntu on a USB drive before but NOT persistant. Having already done that, i.e. put Ubuntu on my USB, can I now make it persistant? without having to reinsatll?

  17. Spydey

    @Trevor Bekolay

    Do you know if by using the method that you mention in your guide, it keeps Wubi installer available on the USB drive? The reason I ask is because if I use the USB creator from within ubuntu to create a persistent install, then take that usb and plug it into a windows machine, the Wubi installer is no longer on the list of options that are given when the Ubuntu live window pops open. Does that make sense?

    It would be very handy to carry around a persistent usb of ubuntu and be able to install it via Wubi into windows for those friends/family of mine that would like to give ubuntu a try but not willing to do a dual boot in the typical sense, nor relinquish their windows partition. I have tried to do this several times via the usb creater in ubuntu, but every time I plug that usb into the up and running windows machine/OS, the option is no longer available like it is if I were to insert an actual live cd.

    Any ideas, thoughts on the matter?

  18. Trevor Bekolay

    @Iu

    The persistent method is not necessarily better, it depends on what you’re using the Ubuntu flash drive for. If you want to make changes that persist — for example, if you want to install some utilities on the Ubuntu flash drive permanently — then this article would be the one to use. If you just want something that you can boot up and tinker with, the previous article would be better suited. The non-persistent USB drive booted up faster, in our testing, which may be important to you as well.

    @Arthur

    There is a way, yes! It’s not quite as easy, because you have to change the boot string, but check out this page and use that utility. Note the note at the bottom of the page.

    @Spydey

    This method does indeed keep the Wubi installer available on the USB drive. If you pop it in, you can run wubi.exe no problem.

    Now, I am not sure if installing from the Wubi installer also maintains the changes that you made on the flash drive. My guess would be that no, those changes would not be made on the installed Ubuntu, but again, I’m not 100% sure.

  19. calebstein

    yay, this article finally came :) !

  20. deralaand

    Could you do an article on a persistant Puppy Linux IAN install?

  21. deralaand

    Sorry…my mobile likes to correct that which was not wrong. I meant to say USB not IAN.

  22. Merlin

    I did a ‘normal’ Ubuntu installation on my 16 GB USB stick and had it made bootable from within the installer. Now I have a complete Ubuntu on a stick ‘in my own language’ and persistent with the ability to update the OS and install new apps if wanted.
    That way I allways have a full blown PC in my pocket that works on most of the hardware around. The only thing necessary is a PC that can boot from USB, but the exceptions to that are becoming rarer by the day.
    Try that with Windows… I am both a Windows and Linux user, but for this purpose Linux beats Windows with ease.

  23. Corleonedk

    @ Trevor Bekolay

    For some reason i can not get this to work on my 64 bit machine, it will give me various I/O errors when i try to load up..

    If i make a non persistent 64 version whit Unetbootin i have no problem getting Ubuntu to load up and run like a charm…

  24. Trevor Bekolay

    @Corleonedk

    Are you making a 32-bit or 64-bit Ubuntu Live CD with the Universal USB Installer?

  25. Iqbal Halani

    There are earlier cheap no hard disk P3 laptops that may be used as big screen GPSs . Can u suggest a good Linux GPS software (with good maps availability). Does Ubuntu recognise Bluetooth hardware circa 2001.

  26. mknaomi

    Hi! first thk’s alot about this article is very helpful, but i have aproblem when iam on desktop ubuntu the casper-rw can not mount ,but i can mount my main hd in here i try to copy my xp file to the casper-rw.any solution? please help thk’s

  27. Angelo

    I haven’t found this anywhere but what is the relationship between the persistence size and the size of the resulting drive? If I have a 2 GB stick, can I use a 2 GB persistence size and that includes Ubuntu, or is it in addition? (Hence only able to use 1 GB.) Or is that compressed with a ratio depending on whatyou choose?

  28. Trevor Bekolay

    @Angelo

    I’m pretty confident that the persistence size is in addition to the Ubuntu live CD, which takes up about 500MB on your drive, I think. So if you have a 2GB stick, you’d only be able to create a 1 GB persistent section. I’m pretty sure, anyway!

  29. Capil Tiwari Bhramdat

    @Trevor Bekolay

    Just curious, is it possible to run two versions of linux on the same flash drive? I am using a 16GB flash drive. Is it possible to add 2 or even 3 linux systems? in other words can I run Fedora, Ubuntu, Kuubuntu, and/or Xubuntu on the same flash drive seperately?

  30. Trevor Bekolay

    @ Capil Tiwari Bhramdat

    Yes actually! There’s a great utility from Pen Drive Linux that does just that. Check out http://www.pendrivelinux.com/boot-multiple-iso-from-usb-multiboot-usb/

  31. Jim

    This works great but I’m having problems with it remembering that I should have a dual monitor set up. I had some other problems with persistence and those were related to permissions that I was able to fix. Does anyone have any ideas about monitor setup.

    Also I’m having a problem with Digikam not finding or reading it’s configuration file on rebooting. It wrote the file and then when you reboot it doesn’t see it. It’s important for me as it lets me use Digikam and it’s spacial selection tool on geocoded photos in my work place. Digikam is the reason that I use the pen drive to get around software installation restrictions and still get my work done. Thank GOD for DigiKam and open source software.

  32. junelmer

    The Universal-USB-Installer works great and I’ve been able to try out several different distros listed on the Pendrivelinux web site. However, after running my netbook with the live linux USB, when I later boot from the hard drive I find that the native OS (Win7) has been “upset” and must be restored.

    Is there a way to run linux totally from USB pendrive without changing/damaging the operating system on the hard drive? ( i.e. not touch the hard drive at all)

    I’d like to be able to have a completely isolated OS on the USB for use on different computers, but I don’t want to make changes to the host hardware.

    Suggestions?

  33. Phil

    The Universal-USB-Installer works great, but after using the USB flash drive to boot into Ubuntu 9.04 and changing the time it is not persistent. When I re-boot from the flash drive it once again opens the unchanged version. Why? Is there something else I need to do?

  34. JakeDaSnake

    Hi,
    I heard that using a different operating system on a usb drive actually greatly reduces the risk of getting a virus on my computer. although, after installing 10.04 desktop onto my flash drive and running it only from my usb, i realized that i cannot access the internet (i have only a wireless router–and the wireless icon says that it does not find any internet connection anywhere). My Ubuntu desktop then came up with a 2 wireless driver softwares but i could not install either one of them for some reason. I have not installed this onto my computer because i think it would defeat the purpose of keeping it on my flashdrive. Anyway, please respond with your feedback on my situation. Thanks.

  35. Abel

    I installed Ubuntu on my usb drive per these instructions above, but for some reason randomly it keeps
    getting corrupted and won’t boot anymore, i’ve reinstalled it about three times already. I’m able to install
    avast and several games and it will boot normally a few times, but then suddenly it will not boot anymore. I’m usnig Windows 7 x64 and installing on SandDisk Cruzer 8gb. Any suggestions?

    Thx

  36. Vince086

    Worked great! Might get a bigger usb drive to make this a practical solution for traveling.
    One problem is I can not connect to my wifi network, it wont pick up the signal and even if it does it still doesn’t want to, very annoying.

  37. Nathan

    Everything worked great… until I tried to create a new user that would have to use a password to enter Ubuntu. Is this something that is possible? To password protect entrance into Ubuntu?

    Thanks!

  38. Trevor Bekolay

    @ Nathan

    Yes, that shouldn’t be a problem if the drive is persistent — though I haven’t tested it myself!

    The easiest way to do it would be to just add a password to the default ubuntu user. To do that, just open up a terminal and type in

    passwd

    and follow the prompts to set a password!

  39. Nathan

    Thanks Trevor.

    The problem was that I did a reboot. That doesn’t seem to work. If I do a cold stop and then boot up, everything is fine.

    I can deal with that at this point, though.

    I’ve tried to do this effectively for almost a year and could never get it to work as I wanted. This did the job.

    Again, Thanks!

  40. Trevor Bekolay

    @ Nathan

    Oh, weird, good to know! Glad it’s working.

  41. Tony

    Hi all, have been trying to install ubuntu 10.04 for the last 4 hours with no luck. Followed all instructions but to no avail. I keep seeing the message that zip 7 cannot open the iso file as an archive!! This is driving me crazy, i seldomn ask for assistance as the answer is usually somewhere on the net, but this time i’m stumped. I have no cd’s and refuse to buy any, this works for everyone else so it’s got to work for me.

  42. Alan

    Tony,
    I think the problem you’re running into is using 7zip at all. It’s not necessary for the install onto usb. Make sure when you download your .iso file you aren’t having windows open it for you with any default programs. Just save the file and download the usb creator program as described above.

    cheers, and good luck :)

  43. Shawn

    @trevor: Great tutorial, thanks. I tried the LiveCD USB Creator, but had problems booting from the USB stick afterward; unfortunately, same thing using this one. I get the selection screen, and select ‘Run Ubuntu from this USB – I get some text zipping by as you describe, then the circular ‘loading’ cursor, then the ‘Ubuntu’ splash screen (with the loading bar and the word ‘Ubuntu’ in the ‘spotlight’), then back to the circular ‘loading’ cursor. That’s as far as I get; this last try I left it for a full ten minutes. I can move the cursor around, so I don’t think it’s ‘frozen’ but I never get the desktop. Thoughts?

  44. Raul

    I tried this with Fedora 13 recently and it worked great. But I was only using 2gb of my 8gb flash drive so it tried installing it again. However, now it’s not giving me the persistence option. I’ve reformatted the flash drive several times now and downloaded the fedora iso, and the universal usb install over and over again. any ideas as to why it’s not giving me the option anymore?

  45. lala

    @Raul: lol you got OWNED

  46. ayesha

    i fnk this website was shit and a crap

  47. ayesha

    CRAPPPPPPPPPPPPPPPPPPPPPPPP
    BASTRAD

  48. smiles

    Would this work with another distro like say Linux Mint?

  49. killybilly

    Hi, i made a persistent Live USB from the Ubuntu Maverick option “Startup Disk Creator” in the live cd distro. It works really good, i’ve installed the apps and changes i wanted, but now i’d like to ‘lock’ persistence so no new changes or any data whatsoever may be stored. Is there a way to disable this capability so it may behave just like the CD distro + changes made?

  50. le2400943

    What should be the USB file system?
    NTFS, FAT30, exFAT?

  51. FAT32 when installing from Windows7

    You will need FAT32. Don’t forget to format the USB as FAT32 before Ubuntu installation on USB drive.

  52. copOcomputers

    Hi all,
    I think that this tutorial is great. I do have one question. I have a 500gb external hard drive and I was wondering if I could instead of just using a “try before buy” version of ubuntu , I could use the .ISO image to install the operating system onto the bootable hard drive and then have the FULL VERSION of ubuntu, not just a “frugal download”.

  53. god37337

    @copOcomputers

    ubuntu is free! all linux is free!
    google it ;)

    cheers

  54. Alvas Rawuther

    @Trevor Bekolay – I am having problems with this. I downloaded a 32-bit i386 ubuntu 10.10 .iso and it worked fine while trying to live boot it non-persistently using UNetbootin. Although, I can’t seem to be able to make a persistent one using Universal USB installer, it boots up and when I run it off the usb, it gets to loading screen and hangs there even after 10-15 minutes.

    Help would be greatly appreciated.

  55. Maklus

    To make it easy and have always the option to choose the boot mode (including fresh), in Live USBs created with the USB Startup Disk Creator of Ubuntu:

    Inside the Live USB’s syslinux folder the file syslinux.cfg has to be edited:

    Delete all the content and copy there this code:

    prompt 1
    timeout 50
    default 1
    say -
    say Enter the number of the desired option
    say ————————————–
    say -
    label 1
    say 1 Try Ubuntu without installing
    kernel /casper/vmlinuz
    append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash –
    label 2
    say 2 Try Ubuntu without installing and fresh
    kernel /casper/vmlinuz
    append noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash –
    label 3
    say 3 Install Ubuntu
    kernel /casper/vmlinuz
    append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash –
    label 4
    say 4 Check disc for defects
    kernel /casper/vmlinuz
    append noprompt boot=casper integrity-check initrd=/casper/initrd.lz quiet splash –
    label 5
    say 5 Test memory
    kernel /install/mt86plus
    label 6
    say 6 Boot from first hard disk
    localboot 0×80

    NB: I think that fresh boot is faster. It’s logical, because no personal configurations, etc. have no be loaded (they are in the casper-rw file).

  56. Martini

    I’m having the same problem as Alvas Rawuther is two posts up. Does anyone know how to fix it?

  57. Helpingus

    @Alvas & @Martini:

    If you follow what said in http://ubuntuforums.org/showthread.php?t=1681125 I think & hope you’ll get success. I did !!

  58. UbuntuSalesman

    LOL @ copOcomputers’s “Try before you buy version of ubuntu” comment…

  59. Loco_Poco

    Hello mate,

    I have seen when I download ubuntu from the website that they recommend to use this software but I used unetbootin and tried to work this out, nothing was good until I goggled to your post

    Thanks for your time,

    Loco

  60. Phineas Peacock

    Hi. I followed the instructions for the usb installer(worked great), but in answer to the fact of wasting space on a large thumb drive I have an easy solution. If you use version 1.8.3.4, it allows you to use the full space of the drive. I did this, and it is epic.

  61. Dylan Pryor

    Same problem as Alvas. The Ubuntu boots, but is not persistent.

  62. Alvas Rawuther

    @Helpingus – Thanks a lot!

  63. Alvas Rawuther

    @Helpingus – The link is dead!

  64. Endocorneelius

    Hey just doing this now on my 4GB USB but I’m just wondering if it’s possible to put the UberStudent on USB? I’d like to be able to just boot it when I want to do some actual work and go back to normal when finished or at least just give it a try. I didn’t notice the option on the Universal USB Installer and was hoping I could.

    PS I have another 8 GB USB I could use for UberStudent incase a 4 GB USB would fit both Ubuntu and UberStudent.

  65. Vads980ap

    ==== Safe & tidy live USB, with personal files, persistent or fresh boot, no CD, any BIOS ====

    This tutorial shows how to create a bootable USB flash drive with both Ubuntu and personal data in it.

    Features:
    + The operating system files are kept appart from the personal ones
    + On booting you can choose to do it in a persistent or fresh way (loading or not saved configuration or session)
    + No CD needs to be burnt (only it the BIOS is old …)
    + If the BIOS of your computer cannot boot from USB (for example because it’s old) a solution is given so it can (see at bottom: Appendix A))
    + If you don’t have a (free) pendrive an alternative is given (see at bottom: Appendix B))

    Advantages:
    + We have 2 partitions:
    ++ The first partition is for our personal files or archives (songs, photos, videos, documents, …)
    ++ The second partition is for Ubuntu (the operating system), including the persistence file, casper-rw
    + This way the pendrive can be used for 3 things:
    ++ Boot Ubuntu in any computer (in Live mode)
    ++ Install Ubuntu in any computer
    ++ Use our personal files, both from Ubuntu Live (for example the one in the same pendrive), an installed Ubuntu, other Linux distro, Windows, …
    + As our personal files are appart from the operating system ones:
    ++ Our personal data is easily accessed and managed by any operating system (for example, booting the Ubuntu Live of the same USB flash drive you don’t need to use sudo neither search within the file system; and you can edit, delete, … them)
    ++ The operating system files are safe (for example Windows XP cannot access them: it only can access the first partition, where the personal data is. If everything were in a single partition, with any operating system, all the files would be accessable and for example when trying to delete a personal file we could delete by accident an operating system file).
    + It’s useful to have the option to boot the live USB in fresh mode:
    ++ The booting is faster (the persistence file is not used)
    ++ We can use it to boot the live USB in a computer different to our’s, which probably will have a different hardware (even if we can boot in persistent mode on it -I think that normally yes- after finishing the external computer’s configurations would be saved and when booting back again on our computer probably some of the configurations would be different to the ones we like to use)
    + As we don’t burn any CD (only it the BIOS is old …) we help to keep or room or office tidy, we save money, pollute less, …
    + We can have a “live USB” even if we don’t have a pendrive but yes a memory card of a photo camera and an external card reader

    Howto:
    (If you have Ubuntu installed in your computer or in another live USB jump to B))
    A) You have Windows installed in your computer but not Ubuntu
    0. Boot Windows
    1. Download http://www.pendrivelinux.com/downloads/Universal-USB-Installer/Universal-USB-Installer-1.8.4.1.exe
    2. Insert your USB flash drive
    3. Copy the files you want to keep to another drive
    4. Run the program downloaded in 1. and follow the instructions of http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/ (by now don’t use the persistence option)
    (If you have another USB flash drive jump to B))
    5. Reboot the computer and press the key stated by the BIOS to go to the boot menu (F12, F11, …, then use the arrows to select the USB flash drive and then press Enter). If no boot menu, go to the BIOS main menu (with F2 or Del …), then to boot options …
    6. Install Ubuntu in your computer. More info in https://help.ubuntu.com/community/Installation/FromUSBStickQuick

    B) You have Ubuntu installed in your computer (or in another live USB)
    I’ll do it with this example:
    + Desktop -or laptop- computer, not netbook
    + USB flash drive of 4 GB
    + Personal files will take up more than half of the memory or space
    + Ubuntu version for the USB flash drive: 10.04, 32-bit (for 32-bit or 64-bit computers)
    0. Boot Ubuntu (the one installed in your computer’s hard drive or the one in an extra live USB)
    1. Download the required ISO file: http://www.ubuntu.com/desktop/get-ubuntu/download (and choose and click) or ftp://swtsrv.informatik.uni-mannheim.de/pub/linux/distributions/ubuntu-release/lucid/ubuntu-10.04.2-desktop-i386.iso (or from other country …)
    2. Plug the USB flash drive
    3. Copy the files you want to keep to another drive
    4. Hold Alt key and press F2 . Type gnome-terminal and press Enter
    5. Type sudo bash and press Enter. Enter your password
    6. Type ls /dev/disk/by-id/*usb* -l and press Enter . At the end of the first line there should be something like sdb or sdc or sdd … In my case sdb
    7. Type fdisk -l and press Enter . After /dev/sdb I see /dev/sdb1 (there is only 1 partition; no divisions in my USB flash drive)
    8. Type umount /dev/sdb1 and press Enter
    9. Type fdisk /dev/sdb and press Enter
    10. Type m and press Enter to see the options
    11. Type p and press Enter to see the partitions (in my case /dev/sdb1 )
    12. Type d and press Enter (fdisk selects the only partition I have)
    13. Type p and press Enter (now there is no partition so no /dev/sdb1 is shown)
    14. Type n and press Enter then p and Enter then 1 (number of partition) and Enter then Enter (to use the default beginning: 1) then 600 (something more than the half) and Enter
    15. Type p and press Enter. I see /dev/sdb1 with Id of 83 (Linux file system)
    16. We want change it to FAT32: Type l and press Enter . We see that c is our option (W95 FAT32 (LBA) file system)
    17. We change it: Type t and press Enter (it selects the only partition up to now). Type c and press Enter
    18. Type p and press Enter . We see Id of c (W95 FAT32 (LBA) file system)
    19. Type n and press Enter then p and Enter then 2 and Enter then Enter (to use the default: just after first partition) then Enter (to use the default: all the free space, to the end)
    20. Type p and press Enter . We see also /dev/sdb2 . With Id of 83
    21. Type t and press Enter then 2 and Enter then c and Enter
    22. Type p and press Enter . We see Id of c bor both
    23. Type w and press Enter. Changes are written on disk
    24. Type fdisk -l and press Enter . Now we see the 2 partitions.
    25. Now we format the first one: type mkfs.vfat /dev/sdb1 and press Enter
    26. Now we format the second one: type mkfs.vfat /dev/sdb2 and press Enter
    27. Close the terminal or console
    28. Hold Alt key and press F2 . Type gnome-control-center and press Enter
    29. Click on USB Startup Disk Creator (under Hardware)
    30. Click on the button named Other.. (up-right) and choose and open the downloaded ISO file
    31. Under Disk to use click on /dev/sdb2
    32. Down, select Stored in reserved extra space
    33. Move the How much button almost to the limit. In my case the limit is 876.0 MB but I put it in 851.0 (just in case I need to modify some file of booting, …)
    34. Click on the button Make Startup Disk
    35. When it finishes click on Exit
    36. Edit the file syslinux.cfg (inside the Live USB’s syslinux folder): delete all the content and copy there this code:
    prompt 1
    timeout 50
    default 1
    say -
    say Enter the number of the desired option
    say ————–
    say -
    label 1
    say 1 Try Ubuntu without installing
    kernel /casper/vmlinuz
    append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash –
    label 2
    say 2 Try Ubuntu without installing and fresh
    kernel /casper/vmlinuz
    append noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash –
    label 3
    say 3 Install Ubuntu
    kernel /casper/vmlinuz
    append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash –
    label 4
    say 4 Check disc for defects
    kernel /casper/vmlinuz
    append noprompt boot=casper integrity-check initrd=/casper/initrd.lz quiet splash –
    label 5
    say 5 Test memory
    kernel /install/mt86plus
    label 6
    say 6 Boot from first hard disk
    localboot 0×80

    FINISHED !!!

    Now if we open the terminal and we use fdisk -l we see that there is a * for Boot in /dev/sdb2 . So the second partition is bootable (where Ubuntu GNU/Linux, the operating system, is located)

    To see this working reboot the computer and press the key stated by the BIOS to go to the boot menu (F12, F11, …, then use the arrows to select the USB flash drive and then press Enter). If no boot menu, go to the BIOS main menu (with F2 or Del …), then to boot options ….

    The first time in the middle of the boot we have to choose the language and click on Try Ubuntu v 10.04.2 LTS

    If we click on Places menu and then on 2.4 GB Filesystem the first partition is mounted and the Nautilus File Browser opens there. We can copy, create, delete, edit, open … our personal files: songs, photos, videos, documents …

    ENJOY !!!

    Appendix A) If the BIOS of your computer cannot boot from USB you can download http://download.plop.at/files/bootmngr/plpbt-5.0.11-2.zip , uncompress the file and burn a CD (a Business card CD is enough, or the easier to find Mini CDs) from the image (file) plpbt.iso (for example the one in the root folder). You insert the CD and the pendrive with Ubuntu in the computer, reboot or switch it on, and a menu appears where you select USB, so the computer boots from the USB flash drive. It may happen that the BIOS were configured to look the hard drive before the CD or DVD drive: in this case you just need to change the boot order of the BIOS. To do this, just after rebooting or turning on the computer, press the key stated to go to the BIOS main menu (F2 or Del …), then to boot options … The newer BIOSes also have a boot menu, accessable with F12, F11, … But these modern BIOSes normally allow to boot via USB. (The Plop Boot Manager allows to boot from any USB flash drive, no matter the operating system in it)

    Appendix B) If you don’t have an USB flash drive you can have Ubuntu in the memory card of your photo camera (SD, xD, …). And the memory card can hold both the operating system, your personal data and the photos you take with the camera. To boot Ubuntu from this card you just need to insert it in an external reader (for example one of those that have several sockets for different formats) connected via USB to the computer (if you put the card in the internal reader of the computer probably you won’t be able to boot Ubuntu -if someone can do it, please, explain it-)

  66. Michael

    Hi, I have Ubuntu 9.1 on 4GB pen drive. I’m writing this from it actually. I set this up about a year ago and use it on several machines for different reasons. How do I get rid of the language prompt and on some of the older machine it takes at least 10 to 20 minutes to boot. Thanks for the help in advance

    Michael

  67. jo-chen

    @Alvas Rawuther: had the same problem. In my case it was looking for something on fd0, i.e. a floppy drive, which did not exist. Try to disable the floppy drive and/or controller in your BIOS.

  68. Ankur

    Hi Trevor Becolay,

    I have a bit of confusion after reading the above article. I am new to linux but very much familiar with windows operating systems.

    A) I want to install RedHat Linux on my computer becoz I want to learn how to work on Linux. My issue is I do not want to install Linux on my computer hard disk drive but I want to use my USB Drive which is of 8 GB size to work as a hdd. So it means now when i switch on my computer my computer should read USB drive as hdd and it should have a linux installed on it. In this case i can, not only save my hard disk space and at the same time i dont have to messup with my windows OS.

    Is this possible if yes how ? If u have time pls send my reply on my personal email id that i have mentioned.

    Thanks
    Ankur

  69. corey wall

    Hi i tried using the bootable ubuntu before using an 8 GB flash stick i have on a old emachines laptop that doesnt have a hard drive. i wanted to use the bootable so i can use that laptop wven without a harddrive in it. my problem is that when i run the bootable it keeps freezing every few minutes and its very frustrating is this just becuase its not enough space? or is it the laptop

    EMACHINES:
    1.8 ghz cpu
    512 mb RAM
    built in graphics card (cant remember the model but its nearly 4-6 years old)
    (no hardrive)

    thanks please send me a reply soon – corey

  70. bruce

    I just read most of this page and my only thought really is what a lot of fuss and hassle this way is. All you have to do is disconnect your main hard disk or if your using a laptop, on most its just a 2 minute job to drop it out of the back, plug your usb in and do a normal install. Whatever distro your into is gonna install to the usb. Ive done this many times, and it works a treat. – Perhaps you might like to set your bios so it will automatically boot from a usb first, if one is plugged in. Have a nice day. – Oh, it might have been nice if somewhere nearer the start of the article that this usb installer program is exe and is for windows, not linux.

  71. Ian

    As a quick point. Linux mint can create a bootable usb automatically that allows updates, adding software, to store your passwords and settings (but under a universal password, for security!) reopens software that you left open during the last session etc. Also, its easy to have an icon for changing keyboard layout at the click of a button (I use my pen in both portuguese and english keyboard computers).

    Not only, this, but if you WANT to use the original version installed in non-persistant mode, its still there on the pen and you can choose it instead through a simple menu.

    I have found this very easy to use (used xfce, since it is the fastest desktop available.. strangely I see very little difference in speed booting from usb (2.0) and booting the same system from hard drive.. very quick boot! Also, linux mint contains all the codecs, so set up is much faster.

  72. geekdout

    Hi! As far as utilities go to make a PERFECT tool disk on Ubuntu as listed above, can anyone list the top must-have utlities (GUI friendly) to have on this Swiss-Army-Knife USB stick? Network tools, command references, clients, file management utilities, browser tools, webservers, ftp servers, packet monitoring, etc? I know a few (NMAP, Apache), but UNIX isn’t my first language and I’m trying not to completely have to learn it like a script kiddy.

    Daily I have to get out to the internet to research, download, install demos, get email, print to locally attached printers, run VPN and Citrix clients, connect to various WiFi sources, host remote access sessions and internet meetings, run instant messaging, move files via SCP, connect vie SSH, authenticate to mutliple firewalls and monitoring systems using a browser or other client, play media files, do packet monitoring and recording using a graphic analysis tool, read PDF’s, play flash, run Java applets, allow for automatic updating, have graphic line-drawing editing tools, run OpenOffice, copy screenshots, run a VOIP telephony client, control the system peripherals, easily search and browse file systems, DoD wipe drives, mount different filesystems for recovery, burn ISO images, etc.

    I just bought a 16 GB Sandisk Cruzer, and I’m getting ready to build it. Any advice is appreciated. I REALLY like the info that Spidey provided. I want to build the ULTIMATE network/sysadmin USB utility device.

Get Free Articles in Your Inbox!

Join 134,000 newsletter readers

Email:

Go check your email!