Installing Linux - Getting Started with Linux - Linux All-in-One For Dummies, 5th Edition (2014)

Linux All-in-One For Dummies, 5th Edition (2014)

Book I. Getting Started with Linux

Chapter 2. Installing Linux

In This Chapter

arrow Following the installation steps

arrow Checking Your PC’s hardware

arrow Setting aside hard drive space for Linux

arrow Trying the Ubuntu Live CD

arrow Installing Linux on a flash drive

Most PCs come with Microsoft Windows pre-installed; if you want to use Linux, you usually have to install it.

You may feel a tad worried about installing a new operating system on your PC because it’s a bit like brain surgery — or, rather, more like grafting a new brain because you can install Linux in addition to Microsoft Windows. When you install two operating systems like that, you can choose to start one or the other as you power up the PC. The biggest headache in adding Linux to a PC with Windows is creating a new disk partition — basically setting aside a part of the hard drive for Linux. The rest of the installation is routine — just a matter of following the instructions. If you want to try any of the Live CDs, you don’t have to do any disk partitioning; just boot your PC from the Live CD. But first, take a deep breath and exhale slooowwwly. You have nothing to worry about.

Following the Installation Steps

Installing any Linux distribution involves a number of steps, and I will walk through them briefly, without the details. Then you can follow the detailed steps for the specific distributions and install what you want.

 width= Some Linux distributions require that you have quite a bit of information about your PC’s hardware on hand before installation. If you plan to install Debian, go ahead and gather information about your PC and its peripheral components before starting the installation. Luckily, most Linux installation programs can detect and work with most PC peripherals. Nevertheless, it’s a good idea to figure out your PC’s hardware so that you can troubleshoot in case something goes wrong with the installation.

The very first step is to burn the CD or DVD for your distribution. You can burn the CDs on any system that has a CD/DVD burner. (You must have a DVD burner if you want to burn a DVD, but a DVD burner can burn both CDs and DVDs.) Typically, if you already have a Windows PC with a CD/DVD burner, you can simply use that system to burn the CDs.

remember.eps The second step is to make sure that your PC can boot from the DVD/CD drive. Most new PCs can boot directly from the DVD/CD drive, but some PCs may require your intervention. Typically, the PC may be set to boot from the hard drive before the DVD/CD drive, and you have to get into Setup to change the order of boot devices.

To set up a PC to boot from the DVD drive, you have to go into Setup as the PC powers up. The exact steps for entering Setup and setting the boot device vary from one PC to the next, but typically they involve pressing a key, such as F2. When the PC powers up, a brief message tells you what key to press to enter Setup. When you’re in Setup, you can designate the DVD/CD drive as the boot device. After your PC is set up to boot from the DVD/CD drive, simply put the DVD or CD in the DVD/CD drive and restart your PC.

 width= If you plan to try a Live CD distribution, the third step is to boot your PC from the Live CD or DVD. Otherwise the third step is to make room for Linux on your PC’s hard drive. If you’re running Microsoft Windows, this step can be easy or hard, depending on whether you want to replace Windows with Linux or keep both Windows and a Linux distribution.

If you want to install Linux without removing (or disturbing) Windows, remember that your existing operating system uses the entire hard drive. That means you have to partition (divide) the hard drive so that Windows can live in one part of it, and Linux can live in the other. Doing so can be a scary step because you run the risk of clearing the hard drive and wiping out whatever is on the drive. Therefore, always make a backup of your system before undertaking any significant changes.

To set aside space on your hard drive that the Linux installation program can use, you should use a partitioning program to help you create the partition. If your PC runs Windows 8, Windows 7, or Vista (as well as the much older XP, NT or 2000), you might want to invest in a commercial hard drive partitioning product. On the other hand, you can repartition your PC’s hard drive by using a GUI (graphical user interface) tool called QTParted, which comes with Knoppix and a number of other distributions.

 width= Note that the installers for some Linux distributions, such as openSUSE and Xandros Desktop, can automatically create partitions for Linux by reducing the size of a Windows partition. In that case, you don’t need to use a tool such as QTParted to shrink the size of the existing Windows partition on your hard drive.

After you set aside a hard drive partition for Linux, you can boot the PC from the selected distribution’s CD and start the Linux installation. Quite a few steps occur during installation, and they vary from one distribution to another. When you’ve come this far, it should be smooth sailing. Just go through the installation screens, and you’ll be finished in an hour or two. Most installers, such as the openSUSE interface, display a GUI and guide you through all the steps.

One key step during installation involves partitioning the hard drive again, but this time you simply use the extra partition you created previously.

After a few configuration steps, such as setting up the network and the time zone, select the software packages to install and then let the installer complete the remaining installation chores. Some distributions make it even easier; they do away with the software-selection step. Instead, they install a default set of software packages.

At the end of the installation, reboot the PC. Rebooting is sometimes required as a part of the installation process before the automatic configuration can run.

When Linux runs for the first time, you get a chance to perform some more configuration steps and install additional software packages.

Checking Your PC’s Hardware

If you’re concerned that your PC may not be able to run Linux, here are some of the key components of your PC that you need to consider before you start the Linux installation:

· DVD drive: You must have a DVD drive (either DVD-ROM or DVD burner), and the PC must be able to boot from that drive.

The exact model doesn’t matter. What does matter is how the DVD drive connects to the PC. Most new PCs have DVD drives that connect to the hard drive controller (IDE, for Integrated Drive Electronics, or ATA, for AT Attachment). If you add an external DVD drive, it most likely connects to the USB port. Any IDE/ATA or USB DVD drive works in Linux.

· Hard drives: Any IDE disk drive works in Linux. Another type of hard drive controller is SCSI (Small Computer System Interface), which Linux also supports. To comfortably install and play with Linux, you need about 5GB of hard drive space. On the other hand, to try the Live CD versions of Linux, you don’t need any space on the hard drive.

· Keyboard: All keyboards work with Linux and the X Window System.

· Monitor: The kind of monitor isn’t particularly critical except that it must be capable of displaying the screen resolutions that the video card uses. The screen resolution is expressed in terms of the number of picture elements (pixels), horizontally and vertically (for example, 1024 x 768). The installer can detect most modern monitors. If it doesn’t detect your monitor, you can select a generic monitor type with a specific resolution (such as 1024 x 768). You can also specify the monitor by its make and model (which you can find on the back of the monitor).

· Mouse: The installation program can detect the mouse. All types of mouse (such as PS/2 or USB) work with Linux and the X Window System.

· Network card: Although not all PCs have network cards, these days it’s rare to find one that does not. As long as yours has one, the installer can probably detect and use it. If you have problems, try to find the network card’s make and model so you can search online for information about whether Linux supports that card.

· Processor: The processor speed, expressed in MHz (megahertz) or GHz (gigahertz), isn’t that important as long as it’s over 700 MHz; most processors made in the past few years have speeds well above that. As a general rule, the faster the better. Linux can run on other Intel-compatible processors, such as AMD and VIA processors.

· RAM: RAM is the amount of memory your system has. As with processing speed, the more RAM, the better. You need a minimum of 512MB to install both Linux and the X Window System. With some distributions, the minimum amount is higher, and you’ll want still more memory to be able to run a GUI desktop comfortably.

· SCSI controller: Some high-performance PCs have SCSI controllers that connect disk drives and other peripherals to a PC. If your PC happens to have a SCSI controller, you might want to find out the make and model of the controller.

· Sound card: If your PC has a sound card and you want to have sound in Linux, you have to make sure it’s compatible. You can configure the sound card after successfully installing Linux.

· Video card: Linux works fine with all video cards (also known as display adapters) in text mode, but if you want the GUI, you need a video card that works with the X Window System. The installer can detect a supported video card and configure the X Window System correctly. However, if the installer can’t detect your video card, it helps if you know the make and model of the card.

· Printer: In addition to this hardware, you also need to find out the make and model of any printer you plan to use in Linux.

tip.eps Many distributions, such as Debian GNU/Linux, work on any hardware that’s compatible with the Linux kernel. For information on Linux-compatible hardware, see

 width= To check whether your PC’s hardware is compatible with individual distributions, visit that vendor’s site and find its hardware compatibility list.

Setting Aside Space for Linux

In a typical Windows PC, Windows is sitting on one big partition, taking over the entire hard drive. You want to shrink that partition and create room for Linux. During Linux installation, the installation program uses the free space for the Linux partitions.

 width= To try out any of the Live CD distributions — such as Ubuntu — you don’t have to repartition your hard drive. Just boot your PC from the Live CD. The installers can nondestructively shrink a Windows partition, so you don’t need to perform the repartitioning step beforehand. If you plan to install Fedora, Debian, or any other Linux distribution on the hard drive, you have to repartition your hard drive. If you want to resize the disk partition under Windows, you can use a commercial product, or boot a Linux distribution and then use GParted, the partition editor, to resize the Windows partitions. GParted can resize NTFS (NT File System) partitions, which are used by most newer versions of Windows.

warning.eps When you resize the disk partition, you always risk losing all the data on the hard drive. Therefore, before you resize hard drive partitions with a disk-partitioning tool, back up your hard drive. After making your backup — and before you do anything to the partitions — please make sure that you can restore your files from the backup.

After Ubuntu boots and the GUI desktop appears, follow these steps to reduce the size of the Windows partition:

1. Choose System⇒Administration⇒GParted from the Ubuntu desktop.

The GParted window appears, and the tool displays the drives it finds on your PC. The first hard drive appears with a device name /dev/sda, the second one as /dev/sdb, and so on.

2. Click the hard drive from the list of devices on the right side of the GParted window.

3. From the list of partitions, click the partition you want to resize.

This partition would normally be the largest partition. For Windows 7, Vista, or XP, the partition type is ntfs, as shown in the Type column in the list of partitions. In a typical new PC, you might see two partitions — a smaller fat16 partition and a large ntfs partition.

4. Choose Resize/Move from the GParted menu.

The Resize partition dialog box appears.

5. Set the setting for the new size for the partition and then click Resize/Move.

You should choose a size such that you get 4GB or more free space after the partition. You’ll see the size of the free space in the Free Space After field in the dialog box.

6. Click Apply to begin the operation after you have specified all changes you want to make. When the warning appears, click Apply and all pending operations will be performed.

The partition is changed, and you have free space after the Windows partition.

After you create free space on the hard drive for Linux, you can proceed to install the Linux distribution of your choice.

Trying a Live CD

Before you install anything, you’ll find it worthwhile to try out a Live CD or bootable USB version. In addition to getting a feel for a Linux desktop, you can usually perform a few additional pre-installation chores.

To start Ubuntu, for example, boot your PC from the Live CD. A menu will appear from which you can enter various options to control the boot process or check your system to see if it meets hardware requirements. You should choose the default option of booting Ubuntu (this option is automatically performed if you don’t make a selection before the menu times out in 30 seconds).

A few minutes later, you see the GNOME GUI desktop, which Ubuntu uses. You can now start exploring Ubuntu. If you click the Examples folder, you’ll find a number of things that Ubuntu can do. You can also choose GParted (the partition editor) from the System, Administration menu (System⇒Administration⇒GParted) to reconfigure the hard drive.

When you finish using Ubuntu, choose System⇒Quit. After Ubuntu shuts down, remove the DVD and press Enter. Should you decide you want to install Ubuntu, click the Install icon on the desktop to begin the process.

Installing Linux on a Flash Drive

I was a fan of Live CD versions of Linux distributions for a while — but no more. I liked Live CDs because I could create cheap media that I could distribute to students and users so they could enjoy the Linux experience on their own machines without installing the operating system, changing what they were comfortable with, or risking doing harm. In addition, this same user group could quickly change from Fedora to Ubuntu to openSUSE and more. My biggest dislikes of the Live CD distributions were their incredibly slow speed and the inability to save configuration changes easily. Given these substantial issues, I’ve been seeking a better solution. Thankfully, I’ve found it: bootable USB distributions.

Bootable USB distributions have been around for some time but have all had weaknesses that prevented me from embracing them. Fedora’s Live USB implementation, however, is the best I’ve encountered. It provides a simple method for creation that most users can walk through unescorted, the installation process is nondestructive — allowing you to keep existing files on the USB drive — and retaining changes (data persistence) is straightforward.

In the rest of this chapter, I show you how to create a bootable flash drive and use it in your own setting.

Creating the bootable flash drive

Although you can create a bootable flash drive using a number of command-line methods in Linux, the simplest technique uses Windows. (I realize that it might sound like heresy to suggest making a Linux boot medium from Windows, but most users interested in a Live USB implementation of Linux probably run Windows.) Follow these steps to create a bootable flash drive:

1. Go to and download the liveusb-creator program.

2. Install the liveusb-creator program.

3. Open the folder where liveusb-creator was installed.

4. Double-click the liveusb-creator program to run it.

5. Under Target Device, select the flash drive.

For example, the flash drive may appear with a name such as TravelDrive.

6. Choose where the image (the ISO file) will come from.

If you have a slow Internet connection, you can have one Live CD from which you pull the ISO file. If you have a faster Internet connection, use the Download option to access a current ISO file.

7. Set the Persistent Storage amount.

This is the amount of storage space allocated to the installation that will always be available. I suggest a value of at least 300MB for the average user. (I don’t know why this defaults to 0MB.)

8. Click the Create Live USB button and sit back.

You can watch the progress. Be prepared to wait ten minutes for the process to complete. Two folders are created on the drive: syslinux (less than 7MB and responsible for the booting) and LiveOS (the size depends on your storage setting).

9. Close the application and test the newly created bootable drive.

Troubleshooting the workstation

I experimented with a number of flash drives and failed to encounter a problem with any as long as 1GB of free space remained after the installation. Smaller drives (2GB or less) are often factory-formatted with FAT (file allocation table) and larger ones are formatted with FAT32; this did not make any difference in installation or usability that I could ascertain.

You must be sure that the workstation settings will allow the machine to boot from USB, which typically requires reconfiguring the BIOS.

1. To begin, reboot the workstation and press the key that takes you to the BIOS configuration (usually F12 or DEL or sometimes F1 or F2).

2. Choose the Boot menu and enable the setting that reads Boot USB Devices First or something similar.

tip.eps On some computers, the flash drive is hidden under the hard drive section of the boot BIOS. In this case, you need to choose Boot⇒Hard Drives, change the primary hard drive to the storage media, and then make sure that the USB is the first choice listed under Boot Device. If the option to boot from USB is Enable/Disable, select Enable and then go to the order of boot devices and move the USB selection above the hard drive selection.

3. Save your changes and exit the BIOS configuration.

At this point, the workstation will continue with the reboot and — if your USB drive is plugged in — should boot Fedora.

tip.eps If you get the single line entry Boot Error and nothing else happens, update the system BIOS per the manufacturer’s instructions.

Working daily with the new drive

When your system boots, the Fedora environment will load much more quickly than it loads with Live CDs. The USB drive displays the new folders created on it, and other devices can be accessed as usual. The Install to Hard Drive icon remains on the desktop, allowing for a quick permanent transition to Fedora should you decide to do so.

tip.eps To use the operating system, an Internet connection is not required but is strongly recommended because most users will want to download additional programs that allow them to test the operating system’s functionality further.

Congratulations! You can now start using Fedora!