CSCI 2150 -- Laboratory Experiment
Creating Linux Boot Diskettes and Linux Installation


Similarities Between Linux and Win2K Installations

Okay, so it's time to do the Linux installation lab. There are a couple of things that you'll need to know. Some of them are based on the concepts you learned from the Windows 2000 install. For example, the process of bringing up a PC involves:

  1. Internal processor initialization
  2. BIOS or bootstrap
  3. Loading of operating system
  4. Loading of higher level drivers

For the Windows 2000/XP installation lab, some of you used CDROMs that were not bootable. In these cases, you needed to create a set of diskettes to boot the computer from the floppy drive. The same may be true for this lab. Different versions of Linux may require a boot diskette. For Windows 2000, four diskettes were needed. For Linux, a single diskette is all you will need. This diskette must be absolutely perfect, so you may want to have a second diskette just in case the first one doesn't work. The reasons for this will be discussed later in this lab.

Running a Computer Without an Operating System

Once again, you can't run a computer without an operating system. For the Windows 2000 lab, you should have set up the BIOS so that the PCs you were working at would first check the CDROM for an operating system, then check the floppy drive for an operating system, and lastly check the harddrive. Repeat the steps to configure your BIOS to verify that this is the boot sequence.

As I said earlier, some versions of the Linux CDROMs that we have in the lab will need a single boot diskette. There is a slight problem with creating the Linux boot diskettes however. The only operating system you currently have access to is the Win 2K or XP installation from last week. This is a problem. Using a Microsoft operating system, you can only create diskettes that contain Microsoft file systems. In other words, the "language" that Microsoft uses with its operating systems to create diskettes and the system to store files on them is a Microsoft language, not a Linux language.

A file system is the arrangement of ones and zeros on a storage device such as a hard drive or a diskette that tells the operating system how to find files, how to organize the data of files, and what files are currently stored on the device. This means that Windows not only defines the computer's operation for things like the user interface; it also defines precisely how data and programs are stored to a diskette or hard drive. Linux organizes its data differently on diskettes and Windows cannot (or will not) create it.

It's kind of like cats make kittens, dogs make puppies, and bears make cubs. Dogs cannot, however, make kittens, i.e., you can only make a copy from the original. For our Linux installation, we will need to make a bootable Linux diskette using the Windows operating system. No problem? Well, not if you have the right tools. Later on in this lab I will show you the procedure. (There was a similar procedure to create the boot diskettes for Win 2K.)

Installation Process

To install Linux, we will use the following steps which are much like the steps for installing any operating system with diskettes.

Setting up the PC to Boot From a CDROM or Diskette

First, note that the following process applies to the Dell GX1 computers only. Similar procedures are available for all computers, but the key strokes may differ.

  1. Power up the computer.
  2. Immediately after the computer runs its Power-On Self Test (POST) press F2 to enter setup.

After steps 1 and 2, the computer should respond with the following message:

"Entering System Setup..... Please wait"

After a moment, the first page of the system setup screen will be displayed. Just as with our hard drive installation lab and Windows 2000 installation lab, you should verify that the computer has found your hard drive.

After you verify the configuration of your hard drive, we need to allow the machine to boot directly from the floppy diskette. The following steps instruct the BIOS to do this.

  1. At the configuration screen, press Alt-P to go to next setup screen.
  2. Use the arrow keys to get to the setting for "boot sequence".
  3. Pressing space bar allows you to edit this field.
  4. Use the arrow keys to highlight the floppy diskette.
  5. Use the '-' (minus key) to move diskette to top of list.
  6. Use the arrow keys to highlight the CDROM.
  7. Use the Ctrl-up arrow to move the CDROM above the diskette to top of list.
  8. Pressing Esc returns you to the setup screen.

Now the computer will first check the diskette in the floppy disk drive to see if it is "bootable". If it is, the O/S will be loaded from it. To reboot from the setup screen, press Alt-B to reboot. There should be no diskette in the floppy drive now. Simply boot from your hard drive's installation of Windows 2000.

Hard drive Partitions

Physical hard drives and logical hard drives are two different things. Just because you have one physical hard drive mounted in your PC doesn't mean that you couldn't have more than one hard drive designation. For example, when you look at Windows Explorer, you might see multiple drives listed as C:, D:, E:, etc.

Back in the old days, the largest hard drive that the Microsoft Disk Operating System (DOS) could recognize was 85 Megabytes. Not much, huh? So when larger hard drives came out, we needed to have a way to make them accessible to the user for storing program or data files. To do this, a larger drive was divided into smaller hard drives, no one of which was bigger than 85 Meg. This "dividing up" is referred to as partitioning. Still just one physical drive, but now the operating system thought it saw multiple drives. This division of the single physical drive was accomplished simply by storing a specific pattern of ones and zeros to the hard drive to designate the end of one partition and the beginning of another.

The application for partitioning in the Linux lab is a little different. No longer do we have the problem with seeing large hard drives. The problem is that the way Linux stores data is incompatible with how Windows stores it.

For example, imagine two people trying to share a filing cabinets. One of them stores everything by the date the document was received and the other stores everything in alphabetical order. Not too bad a problem, right? Well, ask one to find information from the other's filing system in the dark. Well, that's stupid! Not really.

If one operating system interprets the stored binary values differently than the other, they cannot share a common hard drive partition. So we will have to create separate partitions to run the separate operating systems of Linux and Windows. In fact, Linux will use two different types of partitions for two different purposes. In the end, your hard drive will have at least three partitions, one for Windows and two for Linux.

If you've already completed the Windows 2000/XP lab, your hard drive has one large partition starting at the beginning of the drive. This partition contains your Windows installation and it could be as small as 2 Gigabytes , but it may be larger. It all depends on what decisions you made during the Windows installation lab. There needs to be, however, some space left over for our Linux installation.

When you boot from the hard drive, the PC finds your Windows operating system and boots from it since it is the only operating system available. (In cases where you need to make boot diskettes, you will use the Windows O/S to run the program RAWRITE. We will cover that later.)

Windows 2K/XP
Partition
(2 Gig or larger)
Empty/raw
hard drive

You will be creating two partitions for your Linux installation.

Windows 2K/XP
Partition
(2 Gig or larger)
Linux Swap
Partition
Linux Native
Partition

This will give us three logical drives inside of one physical drive.

Windows/DOS has a program called FDISK which allows you to partition your hard drive. It is, however, not really comprehensive, i.e., it doesn't handle Linux. The Linux installation software uses a program called Disk Druid to partition your drive. The operation of this program will be described in the procedure for the lab.

RAWRITE Program

If you need to use a boot diskette to install your Linux O/S, you already have a problem. You need to create a diskette that contains the Linux operating system and uses the Linux file system. If you don't see the predicament yet, don't worry, you're not alone.

The problem is this: since the diskette must use the Linux file structure, Windows 2000 or XP cannot be used to create or format it. Windows only knows the Windows format. Therefore, we have to have a program that will run on Windows, but can create a diskette with a Linux format.

This is where RAWRITE.EXE comes in. RAWRITE is a very simple program. It takes as its input a file that is exactly 1.44 MBytes long. (Note that this size is exactly the same as the size of an entire 3.5" floppy diskette.) This file, which is called an image, is a picture of a bootable Linux floppy diskette. RAWRITE simply copies the image, bit by bit, byte by byte, sector by sector, to a floppy diskette. This way, the file formats, directory structures, and everything else of the image containing a Linux boot disk will be copied to the diskette exactly as it appears in the image file. The only requirement is that the image look exactly like a Linux boot diskette, and that has already been taken care of. The image file boot.img is a Linux formatted boot diskette. RAWRITE simply copies that diskette to a real diskette.

Linux Installation Procedure

The following is a more detailed set of "cookbook" instructions. Following them does not necessarily mean that you understand the process, but that you can follow instructions. Please make an attempt to see that you understand what you are doing.

  1. If you don't have a bootable Linux installation CDROM, follow these steps to create a Linux boot diskette
    1. About one half of your hard drive should have been partitioned last week to install Windows 2000. The remaining portion of your drive will now be dedicated to Linux partitions. Begin by booting up with your installation of Windows 2000.
    2. Insert your Linux installation CDROM into the CDROM drive.
    3. From the Start menu, select Programs->Accessories->Command Prompt. (Command Prompt is sometimes referred to as MS-DOS Prompt.) You should now be presented with a text window that allows you to type in a line of text at a prompt and press enter to execute that command.
    4. Type the command D: and press enter. This should change your active drive to the D-drive which should be your CDROM. (If you don't know the drive letter of the CDROM, use Windows Explorer to identify it.)
    5. Now you will need to change to the directory where RAWRITE is contained. Type the command CD\DOSUTILS and press enter. This will change your current directory to DOSUTILS, under the CDROM.
    6. Now run RAWRITE by simply typing RAWRITE and pressing enter.
    7. RAWRITE will first prompt you for the image file. The image is located in the directory IMAGES and is named BOOT.IMG. Therefore, the filename should be D:\IMAGES\BOOT.IMG. (If your CDROM drive has a different letter, substitute it for the D.)
    8. RAWRITE will then ask you for the destination disk drive. Place your diskette in drive A and type A.
    9. RAWRITE should then create your boot diskette. If you get an error, use Windows 2000 to format the diskette to ensure it is blank, then try RAWRITE again. It is vital to use a flawless diskette with RAWRITE as it will use every bit of the diskette for writing the image. This is because a file system can "block out" bad portions of a diskette and store files elsewhere, but with RAWRITE it is copying bit-by-bit the 1.44 Megabyte image file to the 1.44 Megabyte diskette and will use every bit of the diskette.
  2. If you have a bootable CDROM, insert the CDROM into the drive and boot the PC. If you are booting from a diskette, insert both it and the installation CDROM and reboot the PC.
  3. If you successfully rebooted the PC with the Linux diskette, you should get a screen with instructions from RedHat along with a boot prompt at the bottom. For a graphical interface for your installation, just hit enter. If you've had difficulty with your installation and this is your second attempt, you might want to try a text installation. To do this, type text at the boot prompt and press Enter to begin installation. Usually a text installation is quicker too.
  4. You may be prompted to test the CDROM you are installing from. Since these CDROMs are used in the lab and not necessarily taken care of, you may want to perform this test. After you get through this step, the graphical interface will start and you will be asked a few questions about the installation such as the language.
  5. When it asks what type of installation you want to perform, select CUSTOM. The reason for this is that we want to have more control over what files are installed. For instance, if you want a really quick installation, only install the bare-bones Linux operating system by deselecting all of the installation options so that we can install the minimum amount of files. This can be done in the interest of speed and hard drive size.
  6. Note: On some systems, there will be no mouse support at this point. Use the TAB to go between selections, the enter key to select those selections, and the space bar to toggle check boxes.
  7. Partitioning Hard drive
    1. After answering the questions based on languages, keyboards, CDROM, etc., you will be asked which program you want to partition with, Automatic, Manually with DRUID, or manually with FDISK (expert only). Select DRUID.
    2. You will be presented with a screen, the top half displaying the partitions and the bottom half displaying the available drives. There should be one partition already labeled as DOS 16-bit, DOS 32-bit, or vfat. This is your Windows installation. If there are any other partitions, highlight them one at a time and select delete.
    3. To add a partition, select NEW. When you do this, a window will pop up asking you for the details of the partition. You will be adding two partitions, "swap" and "/" (minus the quotation marks).
    4. Add Swap partition: Don't give it a mount point (swap partitions don't have names); make its size twice the size of the amount of RAM installed in your computer, set the size options to fixed size, and set the type to swap. Select OK. Note that if you ask the installation program to check for bad blocks, your installation time will increase significantly. This doesn't mean that you shouldn't do it. It is an especially good practice to check for bad blocks if you are installing the operating system to an older drive.
    5. Add / partition: Name the mount point '/' (without the quotes); if you want it to fill the rest of the hard drive, check the box allowing it to grow to fill rest of hard drive; otherwise, enter a size for the partition in Megabytes (make it at least 4 ,000 Megabytes); set type to ext3.
    6. Once you've added these two partitions, press ok, done, or next (whatever your particular installation uses) to go to next screens.
  8. Formatting/preparing partitions for installation -- The installation program will now guide you through the formatting and setting up of the partitions. For a new installation or new partitions, you should have all new partitions formatted.
  9. Installation of software -- At one point, the installation program will ask you which software packages you wish to load. Make the decision as to whether you want lots of cool stuff to play with or whether you want to get out of lab early. The more stuff you install, the longer it will take. Note that I don't think kernal development is on the CDROMs we will have access to in the lab, so be careful not to install too much. Your installation will stop in the middle and may crash if it doesn't have the correct CDROMs. It would be nice to install other workstation goodies such as X-Windows and Gnome though.
  10. Configuration -- After the software is loaded, the installation program will ask you for some information on configuration. For the most part, the default answers are sufficient. Exceptions to this are:
  11. Rebooting
    1. Lastly, the installation program should congratulate you on a successful install. Remove the Linux boot diskette and press OK to reboot.
    2. Once the computer reboots, you should get the LILO: prompt. Type "Linux" and press return.
    3. After a number of screens of power-up info, you should get a log-in prompt. Use the root name along with the password you created in step 6.
  12. Once you've logged in, you should have a prompt that looks something like "[root@linux /root]#_". This would mean that your user name is root (the first root), your host is Linux, and the current directory is /root. Now if you want to play, you can. This lesson is not meant to provide an introduction to the Linux operating system. If you want help, type "help". Some general commands are:
  13. To shut down the system in order to power down, make sure you are logged in as root and type:

    "shutdown -h now"

    The -h indicates the system should halt after shutdown and the now tells the system when to shutdown.