Linux

Linux 101: How to set up Linux on a PC

Installing Linux on a personal computer may not be as difficult as you think. This document explains how to install Linux on a PC, starting at the beginning: choosing a distribution

The first step for setting up Linux on a PC is the most time consuming, it is simply to use a run from CD version of all distributions that you are interested in to pick the version you want to install. The easiest source for finding a listing of Linux distributions is: Distro Watch; they have the majority of Linux distributions included in their list.

Once you pick the distributions you want to check out, go to the distribution's Web sites and download the live CD/move ISO image for it. Then, using the method for your CD burning software, burn the ISO image to CDROM. With the CDROM in the drive, reboot the computer and you are now running the Linux version.

Once you have selected which distribution(s) you will install, you can go back to that distribution's Web site and download the install version of the distribution, which is most commonly made up of three CDROM ISO images. After these are downloaded, burn the ISO images to CDROM.

Delete the images from your hard drive after burning them to CDs.

You will then have to decide, before going any further, if you wish to multi-boot and keep Windows on the system. If you are going to keep Windows, you will have to run a defragmenting utility on the drive before going any further.

IMPORTANT NOTE: Due to Microsoft's policies, you may need to completely reinstall Windows, back all important data up before installing Linux or going any further. It may be easier to delete the Windows partition and replace it with a smaller one, as the NTFS support is not 100% in Linux yet. If you do choose to do this, I would recommend that you divide your hard drive into equal sizes for each operating system (each distribution is another OS) plus one [n+1] the first partition is the Windows partition, in NFTS, the second is a Windows FAT32 partition to share files with Windows.

Completely cleaning up your hard drive, removing all temp files and defragmenting it before backing up the data is always a good idea, and backing up your system is recommended before installing a new operating system. Because Microsoft's NTFS is not 100 percent supported, this is even more important if you are running any NT-based version of Windows.

If you have chosen to use a "Boxed set" of Linux, there is a set of "DOS" tools on one of the CDs, which will run in Windows and allow you to resize the partition for Windows. If you are using a downloaded version, then you can use the Linux tools during installation, but you may have to completely delete the Windows partition. Getting a trial version of Partition magic will allow you to resize the Windows partition without losing the data.

The partition table structure for a multi boot system looks complex, at first, but is actually very simple:

  • The first primary partition is your Windows partition.
  • The first extended partition is a transfer partition for enabling read/write access to files from all operating systems, and needs to be either a FAT32 partition or a FAT16 partition
  • The second extended partition is the first Linux partition, and should be set up in the Linux installation process. For only Windows and one Linux version, a 500MB partition is more than enough room. It will be given the label of /boot [500MB in size ]
  • You will need to create a partition with the label / [5 GB in size]
  • Create a partition with the label /home [remaining amount of space for distribution]
  • Create a partition with the label /usr [5 GB in size]
  • Create a partition with the label /var [1 or 2 GB in size]
  • Create a partition with the label /swap [double your RAM in size]

For a listing of which directories are in Linux, and what the use is, see this TR Discussion Posting:

Linux Filesystem Explained. When I wrote it, I tried to draw comparisons between the Linux file system and Windows.


When creating the partitions you will notice that you have a number of file system type options; the oldest one being the ext2fs. In a graphic installer, the file system types usually have an explanation of what they mean. The current default file system is the reiserfs, a journaled file system. This has a small hit on speed, but a major improvement on data protection, compared to a non journaled file system.

Speed and reliability for data input/output being important, the reiserfs or the ext3fs are the best supported file systems. If speed is more important than reliability, use the ext2fs. This does not mean major risk of data loss, but power fluctuations may cause some data loss or corruption, if you have spotty power, and do not have an interruptible power supply, go with a journalized file system.

Follow the prompts for the distribution you are installing. Each distribution has a different installation process, so detailing them here is not a viable option. If you are using one with a console /text interface, the space bar selects, and the right arrow will expand a category, the left arrow will collapse a category, up and down arrows will move you up and down in the listing. The enter key will finish the selection process and start the installation. A graphic interface installation program will have mouse support.

Selecting a package

Package selection is a big part of installing Linux. When first trying Linux it doesn't hurt to install everything, as this enables you to see which applications you like and will use. There are far more options than the live CD versions can include, so while you have some idea about packages from having looked at the live CD, there are more options than those shown. Generally, there are over 10 thousand packages in a three CD version of a distribution, including the libraries for software development.

You may see a message screen after you have selected, or during the selection process, that lists a number of packages. This is a list of packages required by the one you just selected, called dependencies; you can just hit the ok button when you see it. Some installers allow for this notification to be turned off, which I would recommend against, as the dependencies will help you to see the different parts of each application.

During the installation you will be presented with a series of configuration options. The four most important ones are:

  • The firewall--you should turn it on, and at this time you can choose what traffic will be allowed incoming from the Internet, if any.
  • The Display settings--this will configure the graphic server for the GUI, and you should use the test configuration option when doing this.
  • The mouse--it is a good idea to specify which connection and type, as the any USB or PS2 default of many distributions is not always a reliable mouse driver.
  • The Internet connection--if you connect through a network card, then configure it as a network connection, not a DSL connection, even if you use DSL.

If you tell Linux it's a DSL connection then Linux looks for the DSL modem as a device in the computer and you will not get online. If you use dial up connection, and your modem is classed as a Winmodem, then you will need to get the drivers for it from the linmodems Web site before installing Linux. After installing Linux, you will have to compile the drivers for the modem, install them and run the network configuration tool for the distribution you have installed.

Bootloader

When the bootloader is installing, you have the option of setting which bootloader to use, GRUB or LILO, either is a stable option. You can also set which OS will be the default OS at boot. The screens will have a default box on them, if you wish to keep Windows as default then just select default when highlighting Windows (note, it may be DOS with some distributions). You can, if you want, delete the failsafe and nonframebuffer boot options, keeping only Linux, Windows and floppy options. (Note, the floppy option is not always included with newer distributions).

If you are installing several versions of Linux, the boot partition created during the first Linux installation will need to be selected and labelled as /boot for each one. Make the same partitions for each version, except for swap, that you only need one. Do NOT use any other pre-existing Linux partition with different distributions, as the versions of software between the distros may cause conflicts when booting into them. By using the same boot partition, the bootloader installation step will read the data in it and configure the multi-boot for each new distribution. It may be useful to label each distro by its name in the boot menu as you go, this will make the boot options clearer when you are choosing one.

0 comments