Flag This Hub

Installing Ubuntu on pendrives

By


Besides being used to transport files, the pendrives are excellent options to set up the portable system, since different from CDs and DVDs, they support the recording of files, allowing the system save the changes. The pendrives are also the most used to install the system in netbooks that do not have a CD drive.

Previously, installing Linux distributions in pendrives was a complicated process, which involved copying the files manually, or configure the syslinux grub (thus enabling the boot) and, optionally, create a loopback file to save the changes. You can see an example of how things work in the beginning of Chapter 2 of Linux Tools Techniques:http://hubpages.com/hub/Installing-Kurumin-7-and-other-distros-on-a-Pendrive-or-card

Fortunately, today things are much simpler. In the case of Ubuntu, the installation in pendrives can be done using the USB-Creator, a utility that automates steps, allowing to install with few clicks. It comes pre-installed from the Ubuntu 8.10 and can be found in "System> Administration> Create a USB startup disk".

To use it, you must have a Pendrive (you can also use memory cards, USB readers stuck in) at least 700 MB of free space. For security, the USB-Creator Pendrive not the format, offering only the option of installing the system using the free space.

The installation works perfectly in pendrives formatted in FAT16 or FAT32, which dispenses the partitions and use the EXT3 file system or Linux. All you need do is put the installation CD of Ubuntu in the drive, plug the Pendrive and run the USB-Creator. It detects the CD-ROM in the drive and Pendrive, offering the option to install directly. Clicking on the "Other" you can also specify the location of an ISO image (which allows for faster installation due to better transfer rate on the CD). It also allows you to choose which Pendrive use if more than one is plugged:

See all 4 photos

Note that there is an option to adjust the volume of space to save files and documents. This allows the Pendrive is used as a full installation of the system, where you can save files, change settings or even install new software via apt-get.

This will create a file named "Casper-rw" in the root directory of the CD, which is actually a picture of loopback, which is mounted UnionFS using the same system that was used in Knoppix (and other live-CDs earlier) to save the settings to allow running from the CD. This little trick is mainly to blame for allowing the system is able to save the changes even being installed on a FAT partition.

In examining the files within the Pendrive after installation, you notice that it will contain a file structure similar to that found in the installation CD. Nevertheless, you can continue using the free space to save files normally, even from Windows:

The advantage of this approach, for a traditional installation of the system is that the "installation" consumes much less space on Pendrive as the system image is copied in a compressed. This allows the installation occupies only 700 MB of Pendrive (plus the space reserved for the loopback image), instead of occupying 2.3 GB as a regular installation of Ubuntu. This allows you to install even pendrives, 1 GB, but even with 300 MB free for files and settings.

As usual, the next step is to configure the PC to boot using the Pendrive. Many PCs and laptops using older BIOS bugadas with several problems that prevent booting from USB, but you will not have problems with the latest equipment. In most micros, you can quickly access a menu of boot by pressing ESC or F10 during the counting of memory. It allows USB boot without the need to change the configuration of the setup.

Using the boot Pendrive for the first time, it displays the default boot screen of the CD, asking to use the language and the working environment is also exactly the same as used to make the boot CD. However, changes made are stored in file-rw Casper (and not in RAM, as would be done by using the CD-ROM), which means that everything is safe back in the Pendrive.

Thanks to better transfer rate and time of access offered by Pendrive lower, the performance is much better than to run from CD without those "Paradita" caused by acceleration and deceleration of the CD in the drive. The Pendrive can also be used to install the system on the HD normally, exactly the same as the CD to boot. In this case, the system makes a regular installation of the system, without copying the settings and saved files.

Besides pendrives, the USB-Creator can be used to install the system in other devices that support usb-storage mode, such as cameras, MP3 Players and even many cell phones and smartphones. Provided there is sufficient space available on the card, you can create a "camera to boot" or a "cell-boot" without difficulty.

Finally, you can also use the Pendrive to create a small swap partition, to allow the boot on micros with little RAM. To do this, simply use Gparted to resize the main partition and create a swap partition of 100 MB or 200 at the end. Since the partition is formatted, it will be activated automatically during boot.

Using swap partitions in pendrives is not recommended, because the question of courses of reading and writing, but, anyway, is a feature you can make use if necessary.

Another tip is that you can access the files saved in the installation of Pendrive (any distribution) mounting the file "Casper-rw", as commented, is just an image of loopback, designed to allow the settings and files system are saved in FAT partitions. To do this, visit the Pendrive and mount the file using the "mount-o loop", as in:

# Mkdir / mnt / Casper 
# Mount-o loop Casper-rw / mnt / Casper

Access the folder and you'll see a file structure similar to a Linux install, simply access the folder "/ home / ubuntu", which are stored the files created by the user's default live-CD:

Being an open-source project, the USB-Creator is also available for other distributions. The version for Fedora, for example, can be installed using "yum install usb-creator", or downloaded at https: / / fedorahosted.org / liveusb-creator /. Page is available in a version for Windows, which creates the pendrives from XP or Vista:

Like this Hub?
Please wait working