How to create portable Linux system on a USB Drive?
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:
- Create a bootable USB with the desired system using UNetBootin
- Using GParted I formatted an empty USB (destination for the new system)
- I removed the hard drive from the computer (physically)
- I booted into linux using the live USB created in step 1.
- I plugged in the empty USB (destination for the new system)
- I chose the "Install Linux" option
- The system automatically picked the empty USB and asked if I wanted to install
- 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:
- Make sure the bootloader is installed to the flashdrive (typically this is determined during the partitioning phase)
- 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.
Solution 5
I have a portable linux system powered by debian (Crunchbang).
For creating this you would need 3 things.
2 pendrives
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.
Related videos on Youtube
Priyanka
Updated on September 18, 2022Comments
-
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.
What should be my search string so that it returns only the value of SID in text format?
Thanks for your help.
-
Shekhar almost 11 years
-
Ben Plont almost 11 years^^ Knoppix live USB ^^ has persistent memory.
-
-
Jake almost 11 yearsHow would I ensure that the bootloader is installed? Is it a file which I can check?
-
Jake almost 11 yearsRight but if I installed Ubuntu, wouldn't that mean that I would see the installation menu all the time?
-
nerdwaller almost 11 yearsThis 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 almost 11 yearsya you would, will update here when I find a fix for that
-
Jake almost 11 yearsSo 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 almost 11 yearsyes.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 almost 11 yearsI 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 almost 11 yearsi 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 almost 11 yearsI'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 almost 11 yearsYUP.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.)