Reproduce existing system on new machine

Hello,

In the near future I will be obliged to change my computer. Currently, my system is OpenSuse 11.2 with KDE 4.5.3 on a dual-boot (with WinVista) laptop. I plan to have the new machine again be dual-boot (Win7).

First question: Is there a way to “describe” the current system in a way that, after the initial partitioning and probably a basic installation of OpenSuse 11.2, makes it easy to reproduce the current OpenSuse 11.2 installation (i.e., installed packages, profiles; more?) on the new machine? This would reduce manual work to copying some system files (e.g., /etc/csh.cshrc and similar) and of course /home/username etc.

Second question: Same as first, but this time with a change to OpenSuse 11.3 or the soon to come OpenSuse 11.4. A potential initial installation of OpenSuse 11.2 would be possible.

In your reply, please be specific since I have quite limited experience in these matters.

Thanks in advance for your help.

Firstly, you have to be aware that, unless the hardware is identical, the installation will not be anyway because it will be tailored to your hardware.

Secondly, a lot depends on how much you have done to system files such as those in /etc. If it is relatively little, then you can copy those files you have changed to a suitable place in /home along with any mysql databases and backup /home. This will save all your personal settings. You can then transfer /home to your new computer and use the system files you have copied as templates or replacements for the relevant files on your new computer.

If you have made a lot of changes to files outside /home, the question becomes more difficult to answer because you may need to give specific information about the changes you have made in order for people to give you specific advice.

Hey john_hudson. Do you think it would be feasible to copy the root partition over to the new computer after careful placement of partitions to preserve the basic structure of fstab.
Paschuller could then edit grub and fstab to change strings like /dev/disk/by-id/ata-WDC_WD5000BEVT-60ZAT1_WD-WXN509S27952-part5 to like /dev/sda5
The partition copying could be done from a live CD using any of the applications dd, Gparted or partimage

The home partition transfer could be done as a simple file transfer procedure.

My only concern is that new users would need step by step guidance for these steps and even so it might be too difficult?

It is not complicated to entirely move Linux (unlike Windows) to another computer with different hardware - or at least it is do-able. In the worst case, you’ll have to boot in text mode and reinstall the graphic driver. If you’re using UUIDs (and not /dev/disk/by-uuid or /dev/disk/by-id) in /etc/fstab, there is no need to modify it. Although it is rather simple when you’re used to it, there are still different things to worry about (e.g. the new netcard will likely become “eth1” and the network might not respond as expected).

Yes, I tend to agree. However the difficulty under Linux is at the user level (lack of knowledge), while under Windows it is at the system level (just impossible or illegal… or both).

It works pretty well, but will need some (quite minor) adjustment. It is possible to (for example) make an image via a clone-programm such as →Clonezilla (which also is able to clone from device to device and adjusting partition sizes afterwards if needed). If one is using /dev/disk/by-id/, one will find out the new ID by simply booting a live-system and looking into that very path, then you can edit the /etc/fstab and /boot/grub/menu.lst according to it. This should make the system be able to boot at least.

After that, one might have to adjust the network settings, GFX-driver and the soundcard settings - things that can be done quickly if one knows how to do it.

I have been able to throw a harddrive with a working system into a new machine with different motherboard, cpu, RAM etc., and the above adjustments did the trick. I have been using Clonezilla clones many times, and they also worked without causing trouble. The Kernel is quite good at recognizing new hardware and cooperating with it. In fact, when booting up, the Kernel will look for the present hardware every time instead of relying to some settings (with the mentioned exceptions).

Yes - but in view of the final sentence of the post, that was also my concern - hence the request for more specific information.

Autoyast could be an option too, though I’m lacking knowledge about it. AFAIK it’s possible to create an autoyast file on the, let’s say, source machine, then use that to create a similar install on another machine.

Hello all,

Thank you for you comments so far which really showed me that I might have gotten myself into something much bigger than I had thought and wanted. john_hudson’s first sentence was an eye-opener:

For what it’s worth, the current machine is a Dell Latitude D630 (for now, no further details necessary!?) purchased ~Nov. 2007, the next one will be a Dell Latitude E6410. And my changes to files in /etc were relatively minor ones, i.e., some aliases in csh.cshrc resp. bash.bashrc and some entries in mailcap and mime.types.

My main thought asking the question was: After the initial installation of OpenSuse 11.2 (which of course nicely took care of all the “hidden” hardware stuff) I had to manually select a long list of additional software packages. I did keep track of all the changes that I made (system files, packages etc.) in a log file, but was hoping that at least the selection of those additional packages could be simplified.

I realized that having the right repositories installed also enters into the picture. For example, I remember that in order to install VLC, it was recommended on a wiki page to take only one specific library from the VLC repository and the rest from Packman.

Maybe these clarifications inspire more of your useful comments. Thanks in advance!

AFAIK the easiest way to do want you want would be to set up a series of zypper scripts which pulled in everything you need automatically after you had done the initial install; your only problem would be that, for example, you may prefer to download LibreOffice this time rather than OpenOffice and the multimedia repos have recently been reorganised; so you will get the multimedia codecs in a different way this time. So you would need to edit the last set of scripts to take these sorts of changes into account.

I take these situations as a time to clean the cruft out of the OS. We all tend to collect software. Some we use some we don’t. A new machine or OS is a great opportunity to clean out all that stuff we tried but never use. It is not like it is hard to go to Yast and install what we need, when we recall that we need it. Why blindly reinstall all the old junk?

Like Gogalthorp I think it best to install 11.3/11.4 as a new install if you have a separate /home for 11.2. That should take care of your repositories. You should can use YaST2 now to list your installed packages and export the list.

Or you can do it the hard way with sort:


rpm -qa | sort -u > rpm_installed_list.txt 
##
sort -k3 -u -t\|   /var/log/zypp/history > zypper_installed.txt

As Swerdna mentioned, you can use DiscWizard, Gparted, PartedMagic, Clonezilla to copy your partitions to another drive.
Like a USB external drive partition that has enough space to hold the copied partitions, then copy those partitions to your new laptop.
GPARTED DOCUMENTATION - COPYING

Hello,

Thank you for your replies so far. I do see clearer now and why it might even be an advantage to go over the installed software packages.

As a follow-up question: Something that does stay the same even with a new OpenSuse version is the fact that I use my laptop in different environments: home, work, repeated business trips to certain locations etc. I therefore created a number of system profiles and change between them with SUMF/ SCPM. They take care mostly of the different printer environments, but in part also of the way email is sent (maybe more, I don’t remember off hand).

Where and how are these profiles stored in my current 11.2 system, and how can I transfer them to a new 11.3/ 11.4 system?

Thanks again in advance for your replies.

Sorry not sure but I’d look at /etc/sysconfig/scpm first, then if that does find them try a search.


sudo find /etc/ ~/  -iname "*.scpm  -iname "profile*"  -ls 

On 2011-01-25 06:36, gropiuskalle wrote:

> I have been able to throw a harddrive with a working system into a new
> machine with different motherboard, cpu, RAM etc., and the above
> adjustments did the trick.

I concur.

It is simple to do, perhaps tedious. It is more difficult to explain than
to do.

I like to start by creating a new, small install, that I use to investigate
what settings the new install uses on the new machine, and as a future
rescue system. Running this one, I duplicate the old machine into new
partitions, adjust fstab, grub, and I attempt to boot it, in text mode.
First adjust network, hostname, then video if needed. Sound perhaps.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)