LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Need to migrate Ubuntu Linux system software from old computer to new one (https://www.linuxquestions.org/questions/linux-hardware-18/need-to-migrate-ubuntu-linux-system-software-from-old-computer-to-new-one-4175450684/)

LinuxLiker 02-18-2013 12:38 PM

Need to migrate Ubuntu Linux system software from old computer to new one
 
Hi -
I've purchased a new PC to replace an old one that I'm using to run Ubuntu. I purchased the new PC without an OS because I intend to run Ubuntu on it. Can anyone tell me what I need to do to migrate the Ubuntu system from the old PC to the new one?
Since I'm on the latest Ubuntu version and periodically updating it, it seems reasonable that making the new PC a clone of the old one would work but if there's better and/or preferred ways of moving to a new computer, please let me know.

Thanks:)

snowday 02-18-2013 12:44 PM

Just move the drive over, or use Clonezilla to make a copy (and then install GRUB).

the dsc 02-18-2013 11:57 PM

There's just another recent topic on essentially the same issue, moving a drive as it is vs reinstalling.

It's not 100% guaranteed that everything will work, as the installed OS isn't like a "live" system ready to run on any machine it's put on, but it has been set-up to that specific machine. In the other hand it's probably not like the OS would become unusable and the world would end, I guess (stress on guess). I think that the worst thing that could happen is that you'd end up with a console log-in, no graphics, and from there you could either try to fix it, or "re"-install. Other than that there could be some weird behaviors deriving from "leftovers", configurations from the other computer that weren't adequately updated automatically, and it could be somewhat hard to find out the specifics to solve it, or even to recall that it may be the reason.

I think that these days fresh installs are so easy that it perhaps does not even worth the "risks", however minimal. Specially if you have a separate /home partition (that one is more sure to work once you just create users with the same names I guess -- but it's safer to read more about it before doing it). In debian-based distros (like ubuntu) there's also the option of making a "meta-backup", a meta-package of your currently installed packages so you don't need to remember each one individually and go on by marking each one to be installed anew:

http://voices.yahoo.com/meta-backup-...d-7176574.html[COLOR="Silver"]

LinuxLiker 02-19-2013 07:41 AM

Thanks for the info on Clonzilla and meta backup. Even before getting the mega backup suggestion, I'd started leaning toward doing a clean install on the new PC for the reasons the dsc mentioned. The meta backup idea would expedite a clean install. I'll read up on it.

snowday 02-19-2013 08:21 AM

Ubuntu auto-detects hardware at boot.

goumba 02-19-2013 08:54 AM

the_dsc this isn't quite the bad old days of hand configuring xfree86 and such... a lot (though not quite all) of the hardware related stuff is automagically detected on modern distros.

But hey, a clean install never hurts. snowpine, if you'd like to make it real easy to install everything you can do something like this, provided you are using the same version of Ubuntu on each to avoid having multiple/conflicting versions. On the old PC:

Code:

$ dpkg --get-selections > my_packages.list
And the copy the file over the to freshly installed Ubuntu on the new PC, and (as root):

Code:

# dpkg --set-selections < my_packages.list
# aptitude install


the dsc 02-19-2013 12:23 PM

Yeah, at the same time I mentioned that it's not quite like a live distro, nowadays it's just the closest to that as it could get I guess, kinda funny when I realized, it was quite a fast development I guess, something like five or six years since live distros were something fancy, now there's barely distinction.

I would still not be surprised it it didn't work for everybody just like sometimes some live CDs don't work under a certain hardware, plus there could be some config files that weren't generated "on the fly". Until just my last install a few months ago I had a xorg.conf with different profiles and this sort of thing. I haven't managed to make my wacom tablet work properly (keeping proportions with the screen) without some sort of config file. But currently I'm using just command-line startup scripts in my user folder to deal with that. I think I could also have the equivalent of some "xorg profiles" working in a similar manner, if I decide to try it. I just thought or had read once that a rotated screen, for example, is faster/more efficient if it's set on xorg.conf rather than afterwards with xrandr or something. But I don't really know. This sort of stuff isn't the average situation though, and most people wouldn't need to worry about it, I guess.

goumba 02-22-2013 06:35 AM

True. But it's less likely than in the past (been using UNIX - AIX/Ultrix/BSD - since the 90s, Linux for 15 years starting with Red Hat 5) - I remember when hardware was painful to configure, and the scenario you mentioned initally was more likely. xfree86 had to be configured by hand, etc.

Remember when you got a stock kernel with no non-essential driver modules like for sound cards pre-built with a distro?

Typically when I have to do such a thing as this, even if on the same machine is I will do a clean install, install the packages I want to use, then cherry pick my old config files, both in ~ and /etc. Painfully slow, yes, but in my mind at least, the least likely to be painful later on.

Funny you mention the lack of distinction nowadays between live and installed systems. There was one live system that actually copied the files from the live media to the hard drive. Impending disaster for he who did not check the media before installing.


All times are GMT -5. The time now is 05:00 AM.