Radu Cotescu's professional blog

g33k w17h pa45510n

How to Install Ubuntu Desktop Edition

This is tutorial number 1 in the series of Linux tutorials for Windows users: How to install Ubuntu Desktop Edition. Even if the process itself is pretty simple (there are only some clicks to be made and a form to complete), there are some things that need to be made clear for the new user and, of course, there are some useful tips. Let’s proceed.

The first step is getting your brand new Linux (Ubuntu) .iso image that you will burn on a CD that we are gonna use for the install process. To do that, just go to http://www.ubuntu.com/getubuntu/download. Here you will have several download options. For the purpose of this tutorial, choose the Desktop Edition tab, click the radio button for Ubuntu 9.04 Desktop (the latest version) and then choose the architecture that fits your machine. Throughout this tutorial I will use the 32bit version, but that mustn’t stop you from choosing the 64bit version if your machine is able to cope with that. Choose the nearest mirror and then wait for the download to complete. Check that the md5 hash of the .iso file is the same with the one provided by Canonical here. More details on how to obtain the md5 hash for your file are here. Burn it!

Here comes the nice part. Set the boot options from BIOS so that your PC would boot first from the optical drive. Insert your new Ubuntu CD and restart. From now on I will explain the process using screenshots. After Ubuntu boots your system, you will be asked to choose your language for the next screens.

Ubuntu boot screen

On the next screen you are presented with the disc options:

Ubuntu disc options

Let me explain them a bit

  1. Try Ubuntu without any change to your computer means that you will boot your Linux entirely from the CD, without any information written to your hard disk. This option is usually for people who want to just test Ubuntu but I must warn you that because your OS will be run from an optical drive, responsiveness will be affected. Also you cannot install packages, therefore this option will not provide you the full functionality of Ubuntu.

  2. Install Ubuntu is a self descriptive option that we will consider in the next part.

  3. Check disc for defects is an useful option, especially if you have downloaded an .iso file and burn it on a CD as the download may provide a corrupted file or the burn process might not be perfect. It actually compares md5 hashes of important files with hashes stored on the CD, in a file.

  4. Test memory is a way to assure that your RAM works ok.

  5. Boot from first hard disk is the way to quit the Ubuntu disc menu and go to your previous OS.

The other options (the F buttons) are pretty easy to understand. Modes and Other Options provide more advanced info that is not needed now. So we want to install Ubuntu. This thing is done in 7 easy steps, but rest assured, I will help you to get it done.

At the Welcome screen you are required to choose the language for your system.

Ubuntu welcome

Then you should choose your location and set your timezone. This thing also automatically sets the servers for your updates so it’s better to pick your real location so that you can benefit of the full speed of this process of keeping your system up to date.

Ubuntu time and location

Now it’s time to set your primary keyboard layout. Other layouts can be added later.

Ubuntu keyboard layout

Now comes the more challenging part of partitioning your hard disk for Linux. For this tutorial I am using a virtual machine which has no other operating system on it. If you are installing Ubuntu in a dual boot configuration (meaning with other OS on the machine), Ubuntu will detect the other partitions and will still ask you how would you like to partition the space. If you have another OS on the machine, Ubuntu will present you three options for partitioning your hard drive:

  1. Use the entire disk (this will wipe off your other OS);

  2. Specify your partitions manually (the thing that we will do, even if it’s a more advanced thing);

  3. Guided install / Install them side by side (this will try to install Linux on the partition that has the most free space, by creating another Linux partition from the free space; this option is available only if there is another OS on the machine).

We will pick option number 2.

Ubuntu disk space

Linux has two important partition types. The first one is called swap (guess where this name comes from?!) and the other one is the basic Linux File System (ext2, ext3 or ext4 generally) which is used for data. If you would like to use the hibernating function of your new Linux system, then your swap partition must be the same size as your RAM. For this machine I have set a 512 MB RAM size so, in consequence, the swap partition will be set at 512 MB. Then you must specify the partitions for your data.

From now on you must know some basic stuff about nix systems (Unix and Linux). Every device on a nix machine is handled as a file / folder. Therefore the concept of partition is a bit different from the Windows sense. Here there are no drive letters, but devices like /dev/hda (or hdb, hdc, sda sdb - the final letter indicates you that there are more than one hard disk in the machine), or devices like /dev/hda1 (hda2, hda3, sda 1, sda2 - where the number represents the partition on a physical hard disk). HD_letter stands for IDE drives while SD_letter stands for SATA drives.

Because of the fact that everything is a file / folder, you can set your different folders to be mounted from whatever partition you like. The term mount (unmount) designates the operation of attaching (deattaching) a folder (location) to the system. There are some important locations in Linux / Unix that should be explained:

/ this is the parent of all files and folders (devices, partitions, etc.) on a Linux machine. It’s called root. Do not confuse it with the user root!

/bin the bin directory contains several useful commands that are used by both the system administrator as well as non-privileged users. This directory usually contains the shells like bash, csh etc. as well as much used commands like cp, mv, rm, cat, ls. There also is /usr/bin, which contains other user binaries. These binaries on the other hand are not essential for the user. The binaries in /bin however, a user cannot do without.

/boot this directory contains the system.map file as well as the Linux kernel. grub (the boot manager) places the boot sector backups in this directory.

/dev This is a very interesting directory that highlights one important characteristic of the Linux filesystem stated earlier - everything is a file or a directory.

/etc This directory contains all the configuration files for your system, usually in the form of _filename_.conf

/home Linux is a multi-user environment so each user is also assigned a specific directory which is accessible only to them and the system administrator. These are the user home directories, which can be found under /home/username. This directory also contains the user specific settings for programs.

/lib This contains all the shared libraries that are required by system programs. Windows equivalent to a shared library would be a DLL file.

/lost+found Linux should always go through a proper shutdown. Sometimes your system might crash or a power failure might take the machine down. Either way, at the next boot, a lengthy file system check using e2fsck will be done. e2fsck will go through the system and try to recover any corrupt files that it finds. The result of this recovery operation will be placed in this directory. The files recovered are not likely to be complete or make much sense but there always is a chance that something worthwhile is recovered.

/mnt This is a generic mount point under which you mount your file systems or devices. Mounting is the process by which you make a file system available to the system. After mounting your files will be accessible under the mount-point. This directory usually contains mount points or sub-directories where you mount your floppy and your CD. You can also create additional mount-points here if you want. There is no limitation to creating a mount-point anywhere on your system but convention says that you do not litter your file system with mount-points.

/opt This directory contains all the software and add-on packages that are not part of the default installation. Again, this directory is not used very often as it’s mostly a standard in Unix installations.

/proc This is a special directory on your system that identifies all your processes in real time.

/root We talked about user home directories earlier and well this one is the home directory of the user root. This is not to be confused with the system root, which is directory at the highest level in the file system.

/tmp This directory contains mostly files that are required temporarily. Many programs use this to create lock files and for temporary storage of data. On some systems, this directory is cleared out at boot or at shutdown.

/usr This is one of the most important directories in the system as it contains all the user binaries. X and its supporting libraries can be found here. User programs like telnet, ftp etc are also placed here. /usr/doc contains useful system documentation. /usr/src/linux contains the source code for the Linux kernel.

/var This directory contains spooling data like mail and also the output from the printer daemon. The system logs are also kept here in /var/log/messages

After all this, you must now choose your mount points and to create your partitions. I suggest a minimum 3 partition style: one is swap, one is / and another is /home (in case your systems fails bad, you still have your user files in the /home/_yourusername_ folder on another partition than the OS) . If your hard disk is empty, you must first create a new partition table and then the partitions. Else you just need to create the partitions. You have the option of choosing between different types of partitions (primary or logical - more about it here), different file systems and mount points. If you use the model I have presented earlier, your hard disk should look like this (minus the partition sizes):

Ubuntu partitions

I recommend using a minimum 4GB partition for the / folder and using the ext3 file system for your partitions. ext2 doesn’t have journaling, ext4 isn’t yet completly bug free but it will be at the next release (9.10) and reiserFS (the direct competitor of ext3) is a bit slow at booting, the performance being comparable with the one of ext3 afterwards.

Then Ubuntu would like to know more about you:

Ubuntu who are you

For obvious security reasons I recommend you to check the Require a password to log in radio button.

You are ready to install Ubuntu. The 6th step was skipped as there wasn’t another OS on the machine. If it were, Ubuntu would have asked you if you would have liked to migrate some of the settings.

Ubuntu ready to install

Here we go:

Ubuntu installing

After the install is done remove the disk from the optical unit, reboot your machine and log in to your brand new Ubuntu machine. I will let Ubuntu surprise you with its desktop.

You will see by playing with your new OS that you do not need to install drivers unless there are some proprietary ones available for your hardware (Nvidia graphics usually) and that you have plenty of software installed from the start. I dare you to study your Ubuntu desktop. The next tutorial will handle how to configure your fresh installed Ubuntu: connecting to the internet using other methods than DHCP, installing different software packages, tuning up the system for more speed, profiling your machine and many others that should be done to enjoy style, performance and stability.

Kudos to you for following this tutorial!

How To, Linux, Tutorials, Ubuntu

« Linux tutorials for Windows users Right click not working in Firefox 3.5 »