How to create portable Linux system on a USB Drive?

274

Solution 1

I've figured it out. I thought I will answer it through here for anyone else who encounters the same idea.

Here is what I did:

  1. Create a bootable USB with the desired system using UNetBootin
  2. Using GParted I formatted an empty USB (destination for the new system)
  3. I removed the hard drive from the computer (physically)
  4. I booted into linux using the live USB created in step 1.
  5. I plugged in the empty USB (destination for the new system)
  6. I chose the "Install Linux" option
  7. The system automatically picked the empty USB and asked if I wanted to install
  8. I completed the installation and shut down.

(Then I plugged in the Hard Drive back for normal functionality, the USB works as described by kind contributors above.)

Solution 2

For this application, you can just install Linux Mint to the flash drive, with a few minor considerations:

  1. Make sure the bootloader is installed to the flashdrive (typically this is determined during the partitioning phase)
  2. Use FAT32 for your /home partition since it is universally accessible and files of > 4gb are irrelevant for the size of flash drive you're using.

So to do this, I would just unplug my HDDs in my tower (or lappy) and boot to an installer disc, install to the USB and you should be set.

A word of caution You may want to choose another distro or at least a DE, mostly because you're going to be out of space pretty much immediately with Gnome (Cinnamon) or KDE and a system that provides all the drivers and junk in it (Ubuntu variants are often this way, which is great in most applications - just not this one). So you will probably need to strip out a ton immediately.

Solution 3

Use a virtual machine. Configure the boot disk in the VM the be the USB device, not a partition but the USB device it self. Install the system normally.

Solution 4

You can use Universal USB Installer. It allows you to set aside some space for persistent storage, which will allow you to install and keep changes that you make in a session saved to the usb drive instead of the memory.

You might want to use a bigger drive if you want the installation for more than a casual use.

Here is a screenshot of what to expect from the tool. enter image description here

Solution 5

I have a portable linux system powered by debian (Crunchbang).

For creating this you would need 3 things.

  1. 2 pendrives

  2. unetbootin app. Available at unetbootin.sourceforge.net/ (Yumi is also good at making bootable pendrives but I am sticking with unetbootin)


First, you have to install the unetbootin app.setup the bootable pendrive. It's simple. (I hope you figured out this by now.)

After that, you have to boot from the pendrive (you have to change the boot order in BIOS).

  • Select "install to hdd" from unetbootin menu (which appears when booting with pendrive).

  • Installer will start

  • In partitioning options select your second pendrive as the destination hdd.

  • Everything should go well.

  • Now the second pendrive is a portable Linux system.

you can now use the second pendrive as a normal linux system. Trust me I have a setup like this.

Share:
274

Related videos on Youtube

Priyanka
Author by

Priyanka

Updated on September 18, 2022

Comments

  • Priyanka
    Priyanka over 1 year

    Hi I am trying to extract value of "sid" from below XML:

    <?xml version="1.0" encoding="UTF-8"?>
    <response>
    <sid>1245.108628_C5B4C815-9DF7-4246-AB02-9F72191B70E9</sid>
    </response>
    

    I am using below configuration. But the response is full XML content in text format. Please help me crack this. I have spent several hours on net trying to figure out this seemingly simple problem.

    EvaluateXPATHProcessor

    What should be my search string so that it returns only the value of SID in text format?

    Thanks for your help.

    • Shekhar
      Shekhar almost 11 years
    • Ben Plont
      Ben Plont almost 11 years
      ^^ Knoppix live USB ^^ has persistent memory.
  • Jake
    Jake almost 11 years
    How would I ensure that the bootloader is installed? Is it a file which I can check?
  • Jake
    Jake almost 11 years
    Right but if I installed Ubuntu, wouldn't that mean that I would see the installation menu all the time?
  • nerdwaller
    nerdwaller almost 11 years
    This seems to answer that. I should qualify, if you are on a newer system with UEFI (any new W8 branded computer, for example) - you'll have a much harder time getting the device to boot on various PCs since not all support "Legacy Boot" (i.e. MBR).
  • Shekhar
    Shekhar almost 11 years
    ya you would, will update here when I find a fix for that
  • Jake
    Jake almost 11 years
    So this means that after the procedure is complete and I plug in the Linux USB, I would be able to boot from that anywhere?
  • Ashildr
    Ashildr almost 11 years
    yes.in the bios of the device u are booting from , u should change the boot priority.and it will all work fine.i know , coz i'm doin it :-)
  • Jake
    Jake almost 11 years
    I went through your instructions with Debian 7.0 but for some reason it failed to install GRUB nor LILI (or LILA not sure now). Otherwise it copied and partitioned the drive. But it warned that I would not be able to boot from the drive. What should I do?
  • Ashildr
    Ashildr almost 11 years
    i assume that you partitioned the second disk in ext3 and installed the the system under / (i.e:without creating different /home,/var,/usr partitions).in my case i partitioned the second pendrive as ext3 with partition manager ahead of preparing the two pendrives.i insist that you check the drive or partition you entered for grub is correct( stick with grub:its better to enter sda instead of sda1).i hope this works out for you
  • Jake
    Jake almost 11 years
    I'll format the drive as you've advised. It does not show as SDA or SDA1 instead it shows up as SDD - does this matter?
  • Ashildr
    Ashildr almost 11 years
    YUP.when it's about to finish the setup it will ask you to specify the drive in which you should install grub.stick with SDD if its your second pendrive.(you will know the device name from partitioning menu.)