Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to take my HDD with Debian Lenny installed on it and plug it into a totally different computer.

Does my Debian will handle the hardware changes? And if not, what do I have to do?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

If this was the first drive on the old computer and you plug it in so that it's the first drive on the new computer, then as long as the hardware is compatible with your kernel, everything else should work just fine, except probably your network configuration (unless it's got the exact same network setup as well).

Otherwise, you'll probably need to create a bootable USB stick or CD (and test this on the new computer). When you move the drive to the new computer, if it fails to boot on its own, boot with the USB stick and:

  1. find what device the harddrive was assigned as
  2. mount your partition (typically to /mnt) (if you have multiple partitions mount those as well to /mnt/home, /mnt/usr, whatever)
  3. chroot to /mnt so you are working from the local drive (chroot /mnt should do it)
  4. fix /etc/fstab (inside the chroot) so all the devices point to the new device
  5. reinstall the boot loader (grub-install --recheck to force getting a new device map)
share|improve this answer
    
Great, thanks! Ill give it a try when I get home. –  Jonathan Rioux Jan 25 '11 at 19:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.