LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   move boot drive to new system (https://www.linuxquestions.org/questions/linux-newbie-8/move-boot-drive-to-new-system-820658/)

ottadini 07-19-2010 05:46 AM

move boot drive to new system
 
I have been given a new system, but want to try moving my old server's system / boot drive directly to it, rather than re-install.

All of the hardware is different, what am I letting myself in for? What should I prepare for?

Existing system OS is Ubuntu 10.04 Server, non-specific install from live CD.

I've done this before on Win XP and it was a nightmare, but I suppose that's not really designed for that sort of thing. I'm hoping that linux will be easier.

ben.

onebuck 07-19-2010 06:42 AM

Hi,

Same arch?

If so you may need to polish by adding or removing drivers for subsystems. Debug some of the system configuration due to the hardware differences. You say new system. Hardware recognition will be the big issue but hopefully the install can be polished to reflect the change. Check the '/etc/fstab' and change to reflect any inherent needs for the new system.

I would first use a LiveCD or Install CD/DVD to boot the new hardware to identify everything before hand. Document so that the manual changes can be made when necessary.
:hattip:

linuxlover.chaitanya 07-19-2010 06:44 AM

Are you saying you want to take a working install of Ubuntu 10.04 and put the HDD into some other system? I did this with one of the RHEL systems I had. It took some time to boot but it eventually recognized all the new hardware and installed it and viola! it was working again after the mobo failure.

Gary beat me on typing and also some good points that I was actually assuming you knew.

saikee 07-19-2010 08:40 AM

For a new machine you need to migrate the whole system and not just the /boot partition.

A Linux will work in a new environment if the partitions and disk order have not been changed, like using the same set of hard disks. If the disks and partitions are different then the boot loader configuration and file mounting /etc/fstab specifier must be adjusted.

Some server types distros, like those based on Red Hat, will not be pleased if moved to a different partition/location and will not boot, unless the Selinux is disabled.

Ubuntu can be moved to any disk and any partition but for the optimal operation the distro warrants a re-install.

j1alu 07-19-2010 10:51 AM

I rsync my Debian-Sid OS from one PC to the other (to another PC and laptop). The main problems, most of them already said:
/etc/fstab, /etc/udev/rules/70-persistent-net.rules and, of course, grub.
There might be better tools for the job (rsnapshot, partimage, clonezilla, G4l, etc).
You might try that first to see if you run into trouble (you can still replace the hard-disk later)

saikee 07-19-2010 11:44 AM

A filing-based copying command in Linux only copies the files and does not touch the boot sector and so the boot loader will not be transferred.

Only "dd" command, which copies the binary bits of the partition, can fully transfer a bootable partition across. All Linux programs claiming able to clone partitions use "dd" which is one of the oldest command in a Bash shell.

j1alu 07-19-2010 12:03 PM

So shall it be :)
http://www.inference.phy.cam.ac.uk/s...artitions.html

As i use it mainly as a weekly backup-solution (where i want to exclude some stuff) i use rsync. That might work with dd too, i simply don't know, as i use rsync.
Re-installing grub ain't that much of trouble, but if it can be avoided: thats great.

saikee 07-19-2010 12:31 PM

dd copies binary bits so it has no concept of files or has the ability to selectively copy certain data. In fact it is so thick that it even copies all the empty space too.

Its disadvantage can be also an advantage as dd can clone any operating system or any number of operating systems in a hard disk. It produces a 100% error free cloned disk usable immediately as a replacement.

ottadini 07-19-2010 08:50 PM

Quote:

Originally Posted by onebuck (Post 4037958)
Hi,

Same arch?

Going from PIII to PIII Celeron, and a different chipset, but not too different I hope.

Quote:

Originally Posted by onebuck (Post 4037958)
I would first use a LiveCD or Install CD/DVD to boot the new hardware to identify everything before hand. Document so that the manual changes can be made when necessary.

Very good advice, thanks!

ottadini 07-19-2010 08:53 PM

Quote:

Originally Posted by linuxlover.chaitanya (Post 4037960)
Are you saying you want to take a working install of Ubuntu 10.04 and put the HDD into some other system? I did this with one of the RHEL systems I had. It took some time to boot but it eventually recognized all the new hardware and installed it and viola! it was working again after the mobo failure.


Yep, that's the idea. I'm probably just making it harder for myself in the long run... :|

Quote:

Originally Posted by linuxlover.chaitanya (Post 4037960)
Gary beat me on typing and also some good points that I was actually assuming you knew.

Ah-hah! I did post this in the 'newbie' forum :)


All times are GMT -5. The time now is 02:57 PM.