"Linux Gazette...making Linux just a little more fun!"


Adding a Second IDE Hard Drive to Your System

By Mendel Leo Cooper


Consider the advantages of adding a second drive to your system. True, replacing your present drive with a new, low cost, high capacity one would seem a better alternative, but... If you can pick up a used 1.3 gig drive for a coupla bucks at a flea market or you local computer dealer (he might have accepted it as a trade-in), then this is indeed the cheapest way to upgrade your storage capacity. If you are planning to update the kernel on a production system, but are afraid of breaking some of your apps, then it is a simple matter to copy your entire ~/, /etc, and /usr directories to the second drive, where they would remain pristine and untouched by the upgrade. If a few hundred megs would tide you over for a few months, until you finish paying off your new patio or gambling debts, then save those bucks until next year, when 20 gig IDE drives will be a loss leader at your local "Five 'n Dime".



  1. The physical mount.
         Copy down the specs from the label on the drive.
         Make sure it's jumpered as "slave".
         Mount the drive in a spare drive bay, securing it with several screws.
         Attach an IDE cable from the IDE port on the motherboard.
    
  2. Update the BIOS with the info for the new drive.
         It may autodetect, but don't count on it. Check the BIOS settings to make
         certain. Setting the 'LBA' option not necessary.
    
  3. Partitioning.
         Boot up Linux and partition the new drive:
         As root, fdisk /dev/hdb.
         [primary partition, Linux native]
    
  4. Format the new drive.
         mke2fs -cv /dev/hdb1
         [verbose output and check for bad blocks]
    
  5. Create a mount point.
         Decide where you will be mounting it and create a mount point.
         For example, if you will mount it as /mnt/drive2, as root,
             cd /mnt
             mkdir drive2
             chmod 777 drive 2
             [makes the new drive accessible to ordinary users.]
    
  6. Testing.
         As root, mount -t ext2 /dev/hdb1 /mnt/drive2.
         If no error messages, cd /mnt/drive2, and try creating a directory and
         writing a couple of files.
         If it works, hurray!
         Continue to the final steps.
    
  7. Modify /etc/fstab.
         Add the following line to /etc/fstab:
         /dev/hdb1         /mnt/drive2          ext2    defaults     1 1
    
  8. Reboot and see if the new drive automounts.



The Hard-Disk-Upgrade miniHOWTO, by Yves Bellefeuille contains some of the above info, but in a somewhat different context. In any case, the author of this article figured out how to do it mostly by trial and error and read the miniHOWTO after the fact.


Copyright © 1999, Mendel Leo Cooper
Published in Issue 38 of Linux Gazette, March 1999


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next