Operating Systems and System Integration Partitioning the hard disk 1 Aim A hard disk needs to be divided into one or more sections called partitions. We will install a number of operating systems onto our hard disks. Each operating system needs at least one partition. We will use the Linux fdisk program to create these partitions today. Later, in your subject Systems and Network Administration, Albert will show you how to install Windows 2000 (and possibly Windows NT) into some of these partitions. Our aim for today is to create the partitions necessary for installation of all these operating systems. 2 2.1 Background Types of partition On an ibm pc compatible, there are a few types of partition: type primary extended logical max number 4 1 no limit location outside of any other partition outside of any other partition inside an extended partition The total number of primary and extended partitions must be four or less. 2.2 Limitations of IBM PC BIOS The computers we use are compatible with the original ibm pc. The bios (Basic Input Output System) also remains compatible with the original machine, and has the following limitations: parameter number of bits maximum value cylinders heads sectors 10 8 6 1023 255 63 To boot an operating system on a PC, the bios must be able to load the first part of the operating system. The first part of the operating system must be on a location on the hard disk within these limitations. In particular, the boot files of the operating system must be entirely below cylinder 1024, or the computer may not be able to boot. 2.3 Disk and partition naming scheme in Linux The motherboards of the computers in the lab have two 40-pin ide connectors: one is called the primary ide bus, the other the secondary. A ribbon cable connects to each of 1 these connectors. There are two female sockets on each cable. One connects to a disk configured as the master, the other to the slave. Jumpers on the hard disk determine whether the disk is the master or slave. The naming scheme for the disks is: name hda hdb hdc hdd primary/secondary primary primary secondary secondary master/slave master slave master slave Partitions are named with the first three letters being that of the hard disk. Added to this is a number. A primary partition may be numbered 1 to 4 (i.e., on our hard disks, hda1, hda2, hda3 or hda4). Logical partitions start with the number 5, so on hda, the logical partitions are called hda5, hda6, hda7,. . . 2.4 Our partitioning scheme The partitioning scheme we use here will look like figure 1. Windows 98: FAT16 Windows client NTFS extended hda2 Windows server NTFS 3GB logical hda6 Linux /boot 8MB logical hda7 Linux swap 300MB logical hda8 Linux root 3.7GB logical hda9 1GB primary hda1 2GB logical hda5 Figure 1: The partioning scheme we will use for our hard disk. We will create all these partitions today. We will use the Linux installation procedure to run fdisk to partition the removable hard disk. 3 Procedure Hard disks are very delicate. Treat them as if they were very fragile and very expensive (they are!). Never plug or unplug a removable hard disk in while the power is on. Wait at least fifteen seconds before putting the hard disk in or removing it from the computer. 1. Either make a network boot floppy disk or take one from the technician or from the lecturer. 2 2. Install the removable hard disk. This will be the master device on the primary IDE bus. 3. Put the floppy disk into the drive and reboot the machine. 4. The installation screen for Red Hat Linux will appear. 5. Accept defaults for language and keyboard. Figure 2: The screen where you select using FTP for the network installation method. 6. For installation type, select FTP. See figure 2. Figure 3: The screen where you select using DHCP for TCP/IP parameters. 7. When asked for the IP address of the computer, select Use DHCP by pressing the space bar. See figure 3. 3 8. For address of the server, put CSAlinux 9. For directory of the installation, put pub/CSAlinux See figure 4. Figure 4: The screen where you select the server to do the network installation from. 10. When asked what disk you want to install on, select /dev/hda. This is very important; do not partition /dev/hdc, or Patrick the technician will need to stay back and re-install the operating system for the other classes; he will be very upset!!! Be very careful. 11. The lecturer will demonstrate the partitioning procedure. Make sure that you ask questions if you are unsure. If you make a mistake and partition the wrong hard disk, you will upset many people. The common fdisk commands that you will use are: command name m p n d a q w menu print delete active quit write action show a list of all the commands display the partition table delete a partition (good if you make a mistake!) make a partition active exit without saving the table. Great if you really mess it up! Write changes to the disk. w. After that, it’s very hard to undo your changes, so thing three times before pressing w. new partition create a new partition 4