[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to move debian from one drive to another and keep it working?



I just installed Debian for the first time.  I have two hard drives, one on the motherboard IDE controller and a bigger, better one on a PCI controller card.
 
I wanted to install Debian to the drive attached to the PCI controller, but the installer didn't recognize the card, so I was forced to install Debian to the old drive.  Then, the installer installed a kernel that _did_ recognize the PCI controller, so now that Debian is installed to the wrong place I am able to partition and use the drive where I wanted Debian to be in the first place!
 
I need advice from experienced users on how to move a working Debian from here:
 
  /         /dev/hda7
  swap     /dev/hda5
 
to here:
 
  /dev/hdg5    /
  /dev/hdg2    /boot
  /dev/hdg6    /usr
  /dev/hdg7    /tmp
  /dev/hdg8    /var
  /dev/hdg9    /home
 
As a newbie, I'm in danger of doing some real stupid things.  My first guess at a solution would involve the following steps:
 
1.  Copy (recursive) each corresponding directory to the appropriate partitions
2.  Modify certain config files to point at the new partitions
3.  Modify grub settings, especially 'menu.lst' and use grub-install to write the MBR on
the new drive.  (I am going to alter the BIOS settings so that the new drive boots first -- the controller card has its own BIOS and supports this feature -- but that means the original install of grub to the old drive's MBR will no longer operate.)
 
Help, either in the form of recommended steps or references to the appropriate documents, would be much appreciated!
 
 
Thanks,
Dave Witbrodt

Reply to: