Web site developers - 162Part IIRunning the ShowAdding a Hard DiskAdding a

162Part IIRunning the ShowAdding a Hard DiskAdding a new hard disk to your computer so that it can be used by Linux requires acombination of steps described in previous sections. Here s the general procedure: 1.Install the new hard disk hardware. 2.Identify the partitions on the new disk. 3.Create the file systems on the new disk. 4.Mount the file systems. The easiest way to add a hard disk to Linux is to have the entire disk devoted to asingle Linux partition. You can have multiple partitions, however, and assign themeach to different types of file systems and different mount points, if you like. Thefollowing process takes you through adding a hard disk containing a single Linuxpartition. Along the way, it also notes which steps you need to repeat to have multi- ple file systems with multiple mount points. This procedure assumes that Linux is already installed and working on the com- puter. If this is not the case, follow the instructions for adding a hard disk on yourcurrent operating system. Later, when you install Linux, you can identify this diskwhen you are asked to partition your hard disk(s). 1.Follow the manufacturer s instructions for physically installing and connect- ing the new hard disk in your computer. If, presumably, this is a second harddisk, you may need to change jumpers on the hard disk unit itself to have itoperate as a slave hard disk (if it s on the same cable as your first hard disk). You may also need to change the BIOS settings. 2.Boot your computer to Linux. 3.Determine the device name for the hard disk. As root user from a shell, type: # dmesg | less4.From the output, look for an indication that the new disk was found. For exam- ple, if it s a second IDE hard disk, you should see hdb:in the output. For a second SCSI drive, you d see sdb:instead. Be sure you identify the correctdisk, or you will erase all the data from disks you probably want to keep! 5.Use the fdiskcommand to create partitions on the new disk. For example, ifyou are formatting the second IDE disk (hdb), you could type the following: # fdisk /dev/hdb1Now you are in fdiskcommand mode, where you can use the fdisksingle- letter command set to work with your partitions. If the disk had existing partitions on it, you can change or delete those partitions now. Or, you cansimply reformat the whole disk to blow everything away. Use pto view all partitions and dto delete a partition. Note10_

Leave a Reply