Using 12.04 installation as a persistent pen drive

8,787

As far as I know, what you want can't be done with a persistent Live USB.

A full install in an 16GB USB drive (8GB may work, but I have not tested it.) will solve most of the four issues you mention.

I have a 16GB USB with full install and am yet to face any memory management issues. Most computers these days have 4GB or more RAM. So, swap file/partition is not as important. You can do a full install and set swappiness to 0, and limit updates to "Important Security Updates only" to avoid unnecessary writing to the USB.

  1. No "Try Ubuntu" in a full install. Bonus, password protection.
  2. Unplugging the pen drive when Ubuntu is running from it, either in persistent, or in full mode will be a bad idea. I have no solution for this.
  3. A full install will not have the "Install Ubuntu" on the desktop.
  4. If you use a 16GB pen drive, you can create a 1 or 2 GB FAT32 partition in the beginning for "normal" use. The rest can be ext4 partition with / mount point. The first partition will be accessible both when booted from the pen drive as well as when just plugged in.

    It may even be possible to put some folders like "Music" in the FAT32 partition and sym link it to your home folder. I have not tested it. If it works, you have a bigger FAT32 partition and a smaller ext4 / partition.

Minimal install

One option for full install may be to use the server iso or the minimal iso and add the desktop and whatever else you need on top of it. I don't know if it will reduce the size of install to less than 1GB, but it is worth a try. See how to install Unity on top of a server install.

Warning:

There are some WiFi chips that only work with proprietary drivers. A full install USB stick with only opensource drivers will not have WiFi connections when plugged into and booted from such a computer. There may be similar issues with some graphics cards as well. Installing various proprietary drivers into a full USB installation for all possible combinations of hardware may have unexpected results. A full USB install will not be as portable as a Live USB stick.

Hope this helps

Share:
8,787

Related videos on Youtube

cregox
Author by

cregox

sen+cregox@ ahoxus.org (apparently mailto: doesn't work here) legacy "about me" wonder if we got email notifications on this network partially thanks to my ranting. used to think flair rocks (like stackoveflow) but i was blind. :( be sure to visit my current and only project since circa january 2019: AHOXUS previous display name: Cawas (up to 2015 dec 21) profile kind of superficially updated on 2021 feb 11, before i started deleting everything almost 1 year before.

Updated on September 18, 2022

Comments

  • cregox
    cregox over 1 year

    Disclaimer: I aim to build a self contained pen drive with our application inside for running it in as many machines as possible. Portability. So no matter about updates. Maybe I'm looking at the wrong linux distribution to do this... Please let me know if you think so. I've tried many knoppix and ubuntu flavors (and still am trying many others) but they don't come with enough drivers for Unity3D (nothing to do with Ubuntu's Unity) to work - even lubuntu won't work! I'm betting it's lack of openGL 2.0 support.

    Creating a custom live persistent pen drive is a real pain and I'm trying for 1 day without any success. Sure, being able to do it would probably be ideal and occupy the minimum space.

    Using the installation image on a pen drive, however, is good enough and is really easy to create. We can even do it from any OS, using UNetBootin, LiLi USB Creator or some other methods. Straight forward.

    Some recommend installing it on a pen drive. But that requires way too much space! Almost 3gb, I can only use this if it's 1gb at most. And, I believe, it won't behave as good as something meant to be installed on a usb disk, because of memory management and, again, drivers. The MinimalCD installation doesn't even recognize a wireless network / device on the first computer I've tried.

    So, there are only a few negative points on using the installation image that I can think of.

    Question here, is how to remove those drawbacks (in order of importance):

    • Having to press "Try Ubuntu". That's the big one. Couldn't find how.
    • Unable to remove "Install Ubuntu 12.04 LTS" app (minor importance).
    • Unable to load everything on memory and keep on running without the pen drive (like this).
    • Setting the ISO to use maximum amount of space for the OS will leave pen drive with zero space left and any file saved within it from ubuntu is inaccessible from the outside (when plugging in the pen drive and not booting from it).

    The last 2 items are obviously not that important.

    Am I missing something? Can those points be fixed?

  • cregox
    cregox over 11 years
    I actually did almost all of it with a persistent live usb today... with macpup. but it's lacking something that makes the app runs too slow, and I'm trying to find what it is to install it. the smaller the OS is on the live usb, the more I can use for our app so going ubuntu full install is a big no no right now. but, if there's some way to install it in less than 1gb, then we may talk as it does resolve almost everything else as you said.
  • user68186
    user68186 over 11 years
    One full install option may be to use the server iso or the minimal iso help.ubuntu.com/community/Installation/MinimalCD and add the desktop and whatever else you need on top of it. I don't know if it will reduce the size of install to less than 1GB, but it is worth a try. See ubuntugeek.com/… for how to install Unity on top of a server install.
  • cregox
    cregox over 11 years
    ok... but won't this lack the portability expected on a pen drive? I mean, seems like it's custom made to work in one machine only.
  • user68186
    user68186 over 11 years
    Unlike Windows most of the (open source) drivers are built into the kernel. If the persistent live USB works on a machine, the vanilla (no proprietary drivers installed) full install version should also work on that machine.
  • cregox
    cregox over 11 years
    finally I could manage to try this idea of Minimal install... didn't work. I couldn't even get the wireless card to work with that install. so, the idea I had of lack of portability began much sooner than expected.
  • user68186
    user68186 over 11 years
    I may be wrong, but if I remember correctly, the Live USB does use some proprietary WiFi drivers during "Try Ubuntu" and "Installs." It looks like you have run into this situation. I will add a warning to my answer.
  • cregox
    cregox over 11 years
    it doesn't offer "try ubuntu". only "install" and "install with command line". but I doubt this will be a good idea. installation is meant to be on a single machine. the live cd is meant to run in any machine. have you actually used your installed pen drive in many different places?
  • user68186
    user68186 over 11 years
    I have used it in five computers. It worked on four. The fifth failed to boot from USB. None of them needed proprietary drivers. By "Live USB" in my last comment I meant the regular desktop iso based solution for you, rather than a full install on USB (installed either from regular iso, or from minimal iso).
  • cregox
    cregox over 11 years
    oh ok, I see. your latest warning also clarified that for me. so I also edited my question to address those points. seems like this really isn't the solution we need. but thanks so much for all effort! ;-)
  • user68186
    user68186 over 11 years
    You are welcome. It will be great if you could answer your own question and describe how you solved some of the issues using macpup. Provide as much details as you can. Then you can accept your answer so that the question is flagged as answered and others can benefit from it. Cheers.
  • cregox
    cregox over 11 years
    trust me, if no answer comes around it means I haven't found it. I still couldn't make macpup work properly (or research deeper into it yet). I'm also trying other flavors of linux and doing all that as a side job. an answer from me could take some months to come, if nobody can help first.