X
    Categories: Dustbin

Installing Ubuntu Linux!

Introduction

If you are like 93% of Internet surfers out there, you are reading this article from a browser installed on your Windows machine, however I’m sure you have heard of that “other operating system”. You know the one which is really difficult? Yeah, that’s right, Linux. Well, it’s almost right, except for the part about “really difficult”. You may have seen screenshots, thought about trying it, already tried it, or just thought “hey, it’s a cool idea”. If you are any of these and curiosity just has you itching to give Linux a shot, or another shot, read on!

In this article I’ll show you how to get up and running on your current system in your very own Linux environment. I will be walking you through installing the most popular, and in my opinion the best flavor of Linux called Ubuntu. So before you read any further, hop on over to the the Ubuntu Linux download page and start downloading the CD image. You may be wondering which download do you need. If you have an Intel or AMD processor, get the Intel x86 version. Avoid the 64 bit version, even if you have a 64 bit processor, it is not officially supported. Mac users will need the Power PC variation.

Don’t worry, we will be setting up a dual boot so your Windows install is safe!

UPDATE: We have posted a video of the entire process of installing Ubuntu Linux, using 7.10 “Gutsy Gibbon” as the testbed for our video. While this article will provide a lot of detail for you, be sure to check out our video to SEE it in action!

Why Bother?

Good question. Why would you want to try Linux when you are a happy Windows user? Here are just a few reasons:

  • It’s 100% free and always will be
  • Thousands of applications are immediately available and 100% free
  • No more virus, spyware, or malware hassles!
  • You want to learn something new (this was my reason)
  • It’s cool
  • Why not?
  • It’s 100% free (did I mention that yet?)

If any of those reasons are compelling, or at least good enough, Linux is worth giving a shot. Who knows, you might actually like it!

Important Stuff to Know

Before we actually start the installation, it is important to make sure your expectations of Linux are set correctly. First and foremost: Linux is not Windows! You are going to have to use the command line sometimes and most likely do a little bit of troubleshooting. Please do not let this intimidate you, after using Linux for a short while you will become proficient and, with a little patience and persistence, eventually be just as comfortable with Linux as you are with Windows. I’ll even point you to some very helpful resources to get all the answers you need. I’ve only been using it 5 months, and while I still know Windows better, I can use Linux just as easily.

As you may know, Linux is “open source” software, meaning anyone, anywhere can take the code and edit it without restriction. This sounds great, and don’t get me wrong, it is, however because there is no commercial backing, there can be certain shortcomings. Some of these include device driver support and availability of software (especially games). Do not let this discourage you though, virtually all hardware has support for Linux and you are going to have thousands of applications available to you with just a few clicks of your mouse once we get you set up on Ubuntu. Sound good? Of course it does! Check you download progress!

The machine I will be referring in this article is an Intel Pentium 3 866Mhz. The motherboard is an Asus CUV4X with 512MB of memory. Additionally, I have a DVD drive and 2 15 gigabyte hard drives, One has XP Professional already installed (primary IDE master) and the other is empty (primary IDE slave). Here is a basic rundown of what I will be covering in this article:

  • Setting up Ubuntu Linux on a separate hard drive from Windows
  • Answering a few post-new installation questions
  • Familiarizing you with your Linux environment… using Windows terminology
  • Pointing out some stuff you might want to try

Lets Install Ubuntu!

Ahh, there’s nothing more exciting than a new operating system install. Nervous? Don’t be, this is going to be easy. Is your download done yet? Well, when it is, burn it to CD immediately and pick up this article from this point. I’ll even leave you a marker so this spot is easy to find.

HERE IS WHERE TO PICK UP

You have the Ubuntu install disc, so pop in your spare hard drive (if you do not know how to do this, make a quick detour to the PC Mech Forums and you will have it done in no time) and put the install disc in your CD drive and lets get started.

After your computer goes through its boot sequence you will be greeted with the Ubuntu installation welcome screen. After pressing Enter, you will be asked for your preferred language, followed by your location and keyboard layout. The install will then start detecting some of your hardware, load some basic components, and auto detect your network settings. Now you will be prompted for your “Host Name”. This is the equivalent of your Windows computer name. I am going to call this computer tux (the name of the Linux Penguin). Up next, the install will detect your hard drives and ask what you want to do. Much like Windows, Ubuntu will let you select the drive you want to install it on and with the press of your Enter key handle everything for you. The problem is, that’s no fun, plus there is a better way. So let’s do a little Linux “geeking”.

Partitioning for Your Linux Installation

Before showing you the partitioning scheme I will be using for this setup, it is important to understand how the use of partitions differ between Windows and Linux. On a default Windows install, all your files are stored in a single block of space on your hard drive called a partition. To make things easy, Windows assigns a letter (usually C) to this partition. Linux does the exact same thing except it does not use letters. In fact, if you were to “explore” your Linux file structure, it would appear everything was stored on a single drive, even if you have several partitions or multiple hard drives “mounted” (more on this later). Enough talk, select the option to manually edit your partition table and let’s move on.

Now you will see a listing of your existing hard drive partitions. Linux refers to your IDE devices (usually your hard drives and CD drives) using the letters “hd” followed by letters a through d (representing primary IDE master through secondary IDE slave, respectively). Additionally, hard drive partitions have a number after them referring to the partition number. For example, a hard drive on your secondary IDE cable set as master, with 2 partitions would show as hdc1 and hdc2. A CD drive on your primary IDE cable set to slave would show as hdb (there is no number because CD’s do not have partitions).

You should see your primary hard drive (hda) which has your Windows installation with all of its partitions listed. We are going to leave this one alone. Additionally, you will see your empty hard drive (hdb, hdc, or hdd) with the size of the drive listed followed by “FREE SPACE”.

Highlight “FREE SPACE”, press enter and then select the option to create partition. We are going to first create the “/” partition which is equivalent to the Windows C drive. All of your programs and libraries (libraries in Linux are similar to Windows DLL’s) will be stored on this “/” partition. A size of 5-10 GB should be plenty for this. Since I only have 15 GB on my installation drive, I am going to allocate 5 GB, but if you have a bigger drive, assign more space just to be safe. On my primary machine, I have an 80 GB drive and I have 10 GB partitioned for “/”. After entering the size, select Primary as the partition type. Next you will be asked where to place the partition on the disk. Since “/” is our workhorse partition which will store all our crucial Linux operating system files, including the information we need to boot the system, it makes sense to place it at the beginning. At last you will be presented with a partition configuration screen. You will see the option to change the partition file system, but lets leave it with the Linux standard, ext3. Make sure the mount point is set to “/” and change the bootable flag to “on”… after all we do need to boot our system right? Select the option to be done with this partition and let’s move on to the next one.

You should now notice some of the free space has been allocated to your “/” partition. We still have a couple of more partitions to set up so highlight “FREE SPACE” again and create our swap partition. The swap partition is used for temporary random storage in case your computer doesn’t have enough memory to store what programs demand. Additionally, if you hibernate your computer, all the contents of your memory are stored in the swap. Windows refers to this as “virtual memory”. The recommended amount to allocate for this is one and a half times your memory, so for me, I am going to make it 768 MB. Make this a primary partition and place it at the end of your drive. At the configuration screen, change the partition to a swap area. Apply the changes.

Lets set up the final partition. Select the remaining “FREE SPACE” and assign all of your remaining space to this primary partition. When you get to the configuration screen, notice the mount point is set to “/home”. The /home directory in Linux is equivalent to “My Documents” in Windows. For example the user I am going to set up, “jason”, has its own directory (/home/jason) which stores all my personal settings and files. The reason we make this a separate partition is for abstraction. For example, we can format our “/” partition for a new install or distribution upgrade without losing any data… even better, all my settings such as bookmarks and playlists will be kept no matter what happens to the “/” partition. Pretty neat idea. Apply your changes, this is the last partition!

Well, the hard part is now over. Compare your screen to mine, they should look similar. Go ahead and select finish partitioning and confirm you selections to write the partitions to your hard drive.


Finishing the Installation

Next up, the installation will do some very exciting stuff including:

  • Installing the Base System – your Linux kernel (the kernel is the lowest, most basic level of the operating system) and some essential libraries (remember, Linux libraries = Windows DLL’s)
  • Copy and Install Packages to your Hard Drive – these packages include Open Office, The GIMP, and X (graphical window manager), among others

Once the copying portion is done, you will be asked for some more information. First up is your time zone. This is pretty simple. In my case, it’s Eastern. Next, it will ask for your name. Again, this is simple, just enter your first and last name. Up next, you will be asked for a login name. This can be anything you want except for “root”. The installation says your first name is a good choice, so I’m sticking with that. Finally, you will need to enter a password for your login and then confirm it. Make sure you remember the password!

Setting up the Dual Boot

Almost there, we are so close you can smell the finish line. Just one thing left, setting up the dual boot. After the install configures “apt” (Ubuntu’s installation package manager) you will see a message along the lines of “Loading GRUB”. Wait a few more seconds and then presto, a message pops up stating any addition operating systems you have, in my case it’s Windows XP Professional.

The installation program is now going to configure the GRUB boot manager program. Once configured, GRUB will present you with a menu when your computer boots asking which operating system you would like to load. In my case the menu options would be “Ubuntu Linux” and “Windows XP Professional”. The Ubuntu Installer is Windows friendly, so answer yes to install GRUB to the master boot record. Everything will magically be taken care of.

Rebooting Into Linux!

Now where were we? Oh yes, the part about being done. Your CD should have ejected by now, so pull it out of your drive, bask in the glory of the “First Stage Complete” notice and reboot!

Once you reboot, you will notice you now have a menu asking you which operating system you want to load. This is the GRUB program. As you can see, I am asked to load either Ubuntu Linux or Windows XP Professional. Since we have a new and exciting Linux install, let’s boot to Ubuntu.

Are you ready to see your new Linux desktop? Well, you are going to have to wait a bit longer. The installer needs to finish configuring your system. It will probably take 10-15 minutes, but you can sit back and relax as you don’t have to press any buttons. So go ahead and grab yourself some coffee and ponder about what you are going to do with your new operating system. Run a web server? organize your music and DVD library? do some programming or website development? Set up a workstation? Edit some video’s? I could go on, but the configuration is just about done. Yes, it’s finally time!

Entering Ubuntu for the First Time

See the login screen? Just enter your user name and password from above and you are in! Congratulations and welcome to Ubuntu Linux!

If everything went well, you should hear some music play when you log in and have your screen resolution set correctly (if not, I will show you how to fix it in the next section). Ubuntu uses a graphical manager called GNOME, which is quite intuitive and user friendly.It may look awkward at first, but it grows on you. The menu in the top left which has “Applications”, “Places”, and “System” resemble what your Windows Start menu would have. They let you easily launch applications and configure your system. Play around with it for a minute, you’ll see.

When you first entered your Ubuntu desktop, you may have noticed a little red icon at the top which is notifying you of updates. This is just like the Windows updates, except better. You will get an update notice not only for operating system updates, but for every application and library you have installed on your system. No need to check for any program updates… let Ubuntu do check and install the updates for you!

My Screen Resolution is Wrong!

The only glitch I have experienced in one of my Ubuntu installs is the installation program not detecting my screen resolution correctly. This is easily fixed, so if it happens to you, try this:

  1. Launch a Terminal window by going Applications > Terminal
  2. Type this at the command prompt:

    sudo gedit /etc/X11/xorg.conf

  3. Find the text:

    Section "Monitor"

  4. Create the entries for “HorizSync” and “VertRefresh” each on a separate line with the values corresponding to your monitor.
    For example, I have a generic 17 inch monitor at 1024×768 and my section looks like this:

    Section "Monitor"
    Identifier "HWP" # this is my monitor name
    Option "DPMS" # default options, leave these alone
    HorizSync 28-60 # horizontal refresh frequencies
    VertRefresh 43-60 # vertical refresh frequencies
    EndSection

  5. Reboot your computer and your resolution should be all set

Enter My Password?

While you are configuring your system, you may be prompted by a box asking for your password. This is normal, and a very good thing. Because the user you logged in as does not have administrator, or root, access to install programs, Ubuntu has to launch the configuration/install utilities as the user who does, root.

Why don’t you just log in as root then? Glad you asked. It’s simple, to protect you from yourself. Let’s use a Windows analogy to demonstrate why this is a good thing. We all know spyware and viruses are a problem with Windows. You probably have anywhere from 2-5 programs installed on your computer to prevent or detect them, as they install themselves without you knowing. How do they do this? Well, because in Windows when you are logged in, most likely you have administrative access to your system, and as a result, so does any program you start. So when you launch Internet Explorer and visit a malicious site, anything this site runs is with administrative access. Now take a novice computer user, apply this example and add to the mix email, programs, and install files and you can see how running as administrator (or in Linux, root) can lead to having an infested system. In Ubuntu, the only way programs can install themselves or modify your system files is if you know about it, hence the prompt for your password.

Enough of that… you really won’t see the prompt much as your login can run all programs once they are installed, and you can rejoice in not having to worry about spyware or viruses in Linux.


Wow… Everything is… Free…?

Earlier, I did mention something about thousands of free programs just a few mouse clicks away. Want to install some? Nothing to it, just click on your Applications menu at the top left and select Add Applications. There are a plethora of options available here, so just select what you want, click Ok and let Ubuntu automatically install and configure it for you. That’s it! Seriously.

In addition to Add Applications, there are also thousands more applications and tools available in Synaptic (System > Applications > Synaptic Package Manager), so look there to to get pretty much anything you want. Just make sure you enable all the repositories (hint: in Synaptic go Settings > Repositories)!

What About My Windows Files?

Ubuntu should have detected your Windows drive and automatically placed a link (Linux equivalent of a shortcut) on your desktop. If for some reason it did not, lets go through how to do it. What we are going to do is “map” the contents of the Windows partition to a folder on your Linux install. This is called “mounting”. Lets walk through the steps to have your NTFS partition automatically mounted when you start Ubuntu. Don’t worry, it’s very easy.

  1. Launch a Terminal window by going Applications > Terminal.
  2. Now we are going to create a “mount point” (what Windows uses drive letters for) where we can access the files.
    Enter this at the command prompt:

    sudo mkdir /media/windows

    “sudo” means run as root, so whenever we preface a command with sudo, we are telling Ubuntu to execute the command not as the logged in user, but as root. This command creates a file in the /media folder called “windows”. You most likely will be prompted for your password, so enter it. If you were to try the same command without having “sudo” in front it would tell you your permissions do not allow it.

  3. Next, lets configure Ubuntu to automatically mount these files when we boot.
    Enter this at the command prompt:

    sudo gedit /etc/fstab

    The fstab file stores information about your mounted drives. Lets add this line to the bottom:

    /dev/hda1 /media/windows ntfs ro,nls=utf8,umask=0222 0 0

    This means is mount hard drive partition “hda1” (you should know what this means by now) to the folder /media/windows which has an NTFS file system.

  4. Save the file and close gedit.
  5. At the command prompt enter:

    sudo mount -a

    You should now see an item on your desktop called “windows”. Double click it and behold your Windows files!

  6. If you have multiple partitions, simply follow steps 1-5 again except create a different mount point than /media/windows and list the appropriate partition, instead of /dev/hda1, in your fstab file.

If I completely lost you on the above steps, don’t be discouraged. I didn’t have a clue what any of that meant 4 months ago. Now it’s second nature. Be patient and you will feel the same way too!

Helpful Ubuntu Links

Before I leave you to explore your new system, I did promise to give you some helpful links. The best I have seen, and still frequent often are:

Last thing… I promise! You should definitely check out a utility called Automatix developed by a fellow on the Ubuntu Forums known as arnieboy. This script gets you up and running on common applications and tasks, such as FireFox plugins, video drivers, and MP3/DVD decoders (make sure you read the notices though).

Have Fun!

Well, that’s it for this article. I hope you found this helpful and informative. If you have any questions or comments (good and bad), feel free to email me articles[at]132solutions.com. Perhaps if I get enough questions, I can write a follow-up to address them and get you deeper, and more comfortably, into Ubuntu. Experience is by far the best teacher, so get your hands dirty and let me know how it goes!

Until next time…

PCMech Staff :