Can a Harddisk-installed Debian(not a Live CD) be used on different server?
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can a Harddisk-installed Debian(not a Live CD) be used on different server?
I installed Debian on ServerA. Then I unplug the harddisk and plug into ServerB, which is of different configuration than ServerA. Will ServerB boot up successfully? Or do I need to reinstall the OS?
I have done this with windows XP and worked just fine.
As linux is even better than winxp, I bet it will boot up, but you will probably have to reconfigure your hardware.
Watch out though. If the disk on server A was primary master for example, you need to set it as primary master on server B too, otherwise, the bootloader (grub, lilo) will be confused.
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441
Rep:
You might have some problems depending on your configuration. In most cases reconfiguring would do the magic.
However, didn't you notice that there are few packages in the official Debian CDs wich helps you to reinstall the same currently installed system to another machine (which would adapt to the hardware configuration changes) It uses "rsync".
Sorry that I cannot give you the name of it since I'm not at any of the Debian boxes right now.
Hey , thanks for replies. When you mentioned 'reconfigure', do you mean that I have to boot up to single user mode and run some scripts(do enlighten me what are the scripts) to reconfigure the system?
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441
Rep:
It depends. In most cases you would have to reconfigure bootloader (GRUB/LILO) settings, X (XFree86/X.org). Hope your processors are not very different, Otherwise you would have to replace the kernel, initrd images, etc.
Can you remember I told about a package which uses rsync. It's "replicator". I haven't used it. But I think should have a look at it. Its description says "it can handle differences in partitioning and hardware"
I've done this and it helps signifigantly if you are using similar hardware.
Also the kernels I've done this with were debian images, i.e I didn't compile them myself, so the kernel should load the modules neccessary to get the new mobo and hardware off the ground. Don't try AMD images with intel machines, unless you apt-get install the i386 kernel image before you remove the harddrive. This way it will be available as an option on the grub menu when you reboot. Which brings me to the next point.
Grub must be configured for the new machine. It will bork if grub used to be on disk hd0 and now it's on disk hd2. You will also have to edit fstab to reflect the new changes, and X config for new hardware. It's not too bad. Install appropriate kernel image, edit grub, fstab and X config, swap the drive and reboot.
Have a live cd available before you do this. If you make a mistake on a config file, you can boot the live cd, mount the drive and edit what you need.
Have fun.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.