Linux

How to install a fully portable desktop on a USB for on-the-go access

Jack Wallen shows you the steps to install Porteus, a fully-encapsulated desktop that you can take with you on a USB.

As a writer, there are certain situations where I'd like to carry with me a fully-encapsulated desktop. That way I can boot into that desktop, do some work, save said work, and shut down. With this I could use any PC and know that:

  • No virus or malware would infect my work

  • No changes would be made on the “guest” PC

This sort of environment is good for many types of users and is possible, thanks to a portable Linux distribution called Porteus. Porteus is based on Slackware and allows you to boot into Linux from a flash drive, save any/all work to the flash drive, and then take that work with you. It's a full-blown distribution that runs either the KDE or Xfce desktop (depending upon your architecture and which version you download). The 64-bit version of Porteus offers either the standard KDE or Xfce desktops, whereas the 32 bit version runs Razor-qt (a KDE 3-based desktop). I want to walk you through the installation of Porteus on to a USB drive so you can enjoy a Linux desktop on the go (screenshot from Porteus below). We'll do this by downloading the ISO image and then extracting what we need from the ISO.

phoca_thumb_l_110303_01.jpg

Porteus manages to offer a full-blown distribution by installing in a compressed state (to keep its footprint small). During the boot process, it uncompresses and boots very quickly. Porteus also offers a package manager so you can easily install more applications. The package manager has a dedicated Porteus repository to select from, but you can install applications from any repository. All installed applications are treated as separate modules and can be activated and deactivated any time (to retain the speedy boot time).

You'll use the command line, but it's nothing too challenging.

What you need

First and foremost, you'll need to download the ISO image from the Porteus downloads page. You will also need a flash drive large enough to hold not only the operating system, but any data you plan on saving. Depending upon your needs, the size of USB drive will change. Plan for plenty of space (especially since flash drives are cheap). Finally, you'll want a running Linux desktop, in order to do the installation.

The USB drive will need to be formatted in the EXT3 format. If the flash drive is formatted in a Windows filesystem, no changes will be saved between reboots of the drive. If you're unsure of how to format the USB drive, I highly recommend installing a tool like Gparted to make this process easy (Gparted can be found in most every standard repository – so you can fire up your package manager and install).

Installation

Once you have the ISO downloaded, you have to mount the file so you can extract the contents. Here's how to do this:

  1. Open up a terminal window.

  2. Create a temporary directory with the command: mkdir ~/loop.  Mount the downloaded file with the command: mount -o loop ~/Downloads/file.iso ~/loop (Where file.iso is the name of the Porteus ISO).

  3. Insert your flash drive.

  4. Locate the path to the mounted flash drive.

  5. From the ~/loop directory, copy the boot and porteus folders onto the flash drive.

  6. Change into the porteus folder on the flash drive.

  7. Issue the command: sudo sh Porteus-installer-for-Linux.com.

That's it! Now you can reboot the PC from the flash drive and use your newly created Porteus distribution. NOTE: You may have to go into the BIOS and enable the machine to boot from a USB device.

When you have your Porteus distribution exactly as you want, you can simply copy the contents of the flash drive to as many similar devices as you like. This makes for a cheap means of distributing a fully-running distribution to friends and co-workers. In fact, you can fully customize the desktop (with themes, wallpaper, applications, and included files), and then copy the contents of the drive to other devices.

There are plenty of uses for such a portable operating system. End users, administrators (and everyone in between) can make use of the power and portability of Porteus.



About

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.

12 comments
jbdough
jbdough

dammit Jack!  

you just tricked me into teaching myself something about Slackware.  

Thanks again

Regulus
Regulus

Ok, drop to the CD = No Sweat.

Further information (as noted in various other comments here) were sometimes very wrong.  incorrect command lines, and non-existant items on drop-down menus etc.  

I managed to get the 'stick'  up and running, but this was not for the faint-of-heart.  

Yes, once running, you can use it as a personal desktop, connect to the internet via wire and wi-fi and customise and save your Firefox settings for your next use.  I did not detect any apparent 'footprint' left of the host unit.

I also noticed that one did not get access to the host unit's drive through the file explorer  or other simple means - which some other Linux base boots do offer.  Thus, this might not be the world's best troubleshooting tool - but, it was advertised as a 'Desk Top', not a troubleshooter.

Regardless, nice summer challenge and learned a bit.

Thanks for the article

wflagg
wflagg

I find it interesting how many responses indicate users that don't want to have a clue what really happens when they click a button on a gui. I guess they grew up in a Micro$oft world. I prefer to learn and like to look into the scripts behind the mouse click. If you want to beat up on Wallen base it on his ridiculous comments bashing C as a great language for embedded systems!


jdaughtry
jdaughtry

Why not use Puppy Linux.  You can install on a flash drive directly from the LiveCD.


janitorman
janitorman

Why make this so hard> most people can't even find the ~ key let alone type this stuff in a DOS window or whatever you call that on Linux. I'm a huge proponent of Linux, but the "terminal window" needs to go, along with obscure commands such as milkcow.shhh don`t tellanyone.

But then again that's why Jack writes for the 1% of the Linux users, who comprise 1% of the desktop world (leaving out servers and Android, of course.)

ad.rem
ad.rem

shouldn't step 6 be the boot-folder?


jbdough
jbdough

Change into the porteus folder on the flash drive.

Issue the command: sudo sh Porteus-installer-for-Linux.com


with Porteus-v2.0-i486.iso

Porteus-installer-for-Linux.com is in the boot folder

results:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

installer-for-Linux.com

Verifying archive integrity... All good.

Uncompressing Porteus Installer............

eval: 1: .porteus_installer-2.0/installer.com: not found

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks for this article Jack - we'll make it happen!


ad.rem
ad.rem

I will try the 32 bit-version, because not every PC is 64 bit already (32 will run anywhere)

jbdough
jbdough

requires  sudo sh Porteus-installer-for-Linux.com

see /boot/docs/install.txt around line # 191