On Sat, 04 Oct 2003 00:00:44 -0600, Jacob Anawalt <[EMAIL PROTECTED]> penned: > Joyce, Matthew wrote: >> Hi, >> >> I have an old pc running Debian Woody and I have 2 questions. >> >> Firstly, the hard drive ios quite old and become quite noisy, I suspect it >> is on the way out. What is the easiest way to replace it ? It only have 2 >> partions, one of them a swap. The new drive is slightly bigger. >> >> >
These are my notes from when I moved my old 2 gig install to a 20 gigger. Please let me know if it's helpful (or just confusing). 1. Partition the new hard drive. GNU's "parted" is pretty spiff. http://www.gnu.org/software/parted/parted.html http://www.gnu.org/manual/parted-1.6.1/html_mono/parted.html 2. Boot using a linux floppy. You don't want to deal with trying to copy a system that's in motion. Copy your stuff over. Use "cp -a orig/* new" to preserve symbolic links. 3. Edit lilo.conf carefully. All device values should be set to where they *will* be after you boot, not to where they are now on the IDE chain. (Maybe the new drive is currently at /dev/hdc, but if it will be on the first IDE slot in the finished state, set the value to /dev/hda.) Set "boot" to the drive to which you'll be writing the MBR. Set "root" to the partition that will be set to "/". Make sure that "image" points to a file that will point to a real location and will be within the first 2G of the drive. (Not sure that is necessary, but why take chances?) If the new hard drive is not on the same spot on the IDE as it will be when you're through, use the "-b" argument to lilo. (I.E., if your lilo.conf says "boot=/dev/hda" but at the moment the new drive is on /dev/hdc, use "lilo -b /dev/hdc" so that you don't clobber your old drive.) 4. Edit fstab carefully. All device values should be set to where they *will* be after you boot, not where they are now on the IDE chain. 5. Mount the new root partition somewhere. Mount any other partitions that you will need for lilo (i.e., /etc and /boot) beneath it. Run "chroot /new_root /sbin/lilo" (if the drive isn't in the location specified in "boot" of lilo.conf, use the "-b" argument). 6. Reboot. Make sure the new drive is in the place specified in fstab and lilo.conf. Errors: If you get a lilo error, doublecheck "boot" and "root" in lilo.conf. dd will cause the partition to think it's the size of the original partition -- don't do this unless you're creating an identical copy on an identical drive. -- monique Please respond to the group OR to my email, but not both. (Group preferred.) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]