Friday, February 15, 2008

Asus Eee PC: Install Ubuntu 8.04 on a USB stick

Ubuntu, the popular Linux distribution, is catching the attention of more and more people every day.

Many distributions today are available as live CD / DVD, so you can just test the new operating system with no modifications at all on your computer.

There are lots of tutorials and howtos on the web covering the topic of the installation, but our goal and the reason of this post is a bit different.

If you want to go ahead further than you can do just with a live distribution, then you will need to install the operating system on your computer. Maybe you want to start using the new system while maintaining the previous one, and I mean a full use (update packages, install applications, install additional drivers to test if your hardware is supported, and so on).

If you do not want to mess with your hard disk partitions and you only have one hard disk available (as laptop owners have), then you should consider to install the system on an external device.

Luckily we have today many options available such as USB disks, USB memory or even memory cards that can act as boot devices. Those devices are available today at cheap or moderated prices.

We have a laptop: The popular Asus Eee PC with its original operating System (a customized version of Xandros). We want to install Ubuntu (Ubuntu 8.04 alfa 4) on the laptop but we do not want to remove the original system. We will use a 8GB USB memory as the target device where new the operating system will be installed.

Prepare the media containing the live CD installation disk. You can download Ubuntu as an .iso file to be recorded on a CD (DVD). Alternatively you can extract the files from the .iso to a USB memory and make it bootable. This way you will have a live USB with your Ubuntu distribution. You can find tutorials with instructions to do this.

I used an USB with only one big partition of 1GB. Then I resized it to 720MB obtaining a second one of about 260MB. That can be a good idea if you plan to do some work (such as creating documents or downloading from the web) since the second partition will be available in read + write mode. In my first trial I used an additional SD card just to store the screenshots of this tutorial. With two partitions on the live USB you can avoid the need of a second storage device even if you want to take screenshots.

Plug your live USB and boot your computer. If you are doing this on the Eee PC, just press the Esc key in the first screen to choose which device to boot from. Wait until the live system is fully loaded and running.

Plug the target USB memory (where you are going to install the operating system). In this case I used one having 8GB, but the default install takes less than 2GB. I do recommend to use one having at least 4GB (you are going to need additional space for your files, to download package updates, to install additional applications, ...) or you will have almost no free space.

Click on the install icon.

Choose your prefered language, your timezone and the keyboard layout. When asked to prepare disk space, choose to manually partition the disk.

I do recommend to create partitions. This is an optional step and you can use the whole disk without partitions, but if you plan to update / upgrade your system it may be convenient to have separated partitions to mount the /boot and /home directories. Create the partitions on the desired media according to your preferences.

In particular, I have done three partitions: ~100MB (/boot), ~6GB (/), and ~2GB (/home)

Rmember to choose a filesystem without journaling (i.e. avoid using ext3). I have used ext2 on all filesystems.

The system may present you some warnings about "incompatible features", "uncorrected errors" or lack of "swap partition". You can ignore these warning and follow to the next step.

Then, you will be asked for some personal data to create your account on the system

The system looks for previous data. It this is a first install it will find nothing to import.

Ready to install. Be extremelly careful in this step. If you just choose to continue, the installer will modify the MBR of your main disk (the SSD containing the original Xandros or whatever you installed on your disk).

This is the lower part of the window, with the Advanced... button:

Choose the correct location (hd0) is the SSD, use the item corresponding to your media, such as: (hd1), /dev/sdc, or whatever else.

Once decided whether to use a boot manager and its location, the installation begins.

Be patient. Flash disks are not as fast as a clasical HD. The installation process will take a lot of time.

Before rebooting the system, check /boot/grub/menu.lst If your boot device is not the SSD the references to your device will be wrong. Replace (hd2,0) or (hd1,0) by (hd0,0). When you boot from the removable media, this media is seen as hd0 by the system.

Once finished, you can finally boot on your newly installed device

Versión en español: Instalar Ubuntu 8.04 en una memoria USB


Jeff said...

...except as of right now (March 1 2008) you won't be able to get wifi running properly. I hear it's being looked at via the Restricted Drivers Manager.

josean said...

The madwifi team is moving quickly and you can see advances in the support of the AR5007 wifi chipset.

Anyway, have a look at this comment with instructions describing how to install the current madwifi driver.

Anonymous said...

So when you unplug the flash drive does it go back to xandros?

josean said...

Yes, the goal of the installation on a USB memory is just to preserve the original Xandros system.