Do I need to "generalize" too when Clonezillaing a Ubuntu installation?

riahc3

Senior member
Apr 4, 2014
640
0
0
When making a Clonezilla copy from a HDD to another HDD, I have to sysprep and generalize Windows before if I move that HDD to another PC.

Do I have to do the same thing in Ubuntu? How do I do it? Im setting the system up in a VM and then moving it to a actual physical system using Clonezilla.
 

ultimatebob

Lifer
Jul 1, 2001
25,134
2,450
126
When making a Clonezilla copy from a HDD to another HDD, I have to sysprep and generalize Windows before if I move that HDD to another PC.

Do I have to do the same thing in Ubuntu? How do I do it? Im setting the system up in a VM and then moving it to a actual physical system using Clonezilla.

I've never tried this with Ubuntu (I'm a CentOS guy), but you might want to check your network configuration files (like ifcfg-eth0) and make sure that they do not have hard coded MAC addresses in there. If they do, the network service will fail to come up on the second system because the MAC will be different.

Likewise, you might run into problems with Xorg if the video card is different. If you're lucky, Xorg will gracefully fail and prompt you to reconfigure X. If you're not, the system will lock up and you'll have to boot into a lower runlevel to manually fix the issue.
 

lxskllr

No Lifer
Nov 30, 2004
59,326
9,847
126
I'd try it without doing anything first, it might work. I put my laptop hd in my work desktop, and everything worked fine. The machines could hardly be anymore different while staying in the same general architecture family.
 
Feb 25, 2011
16,991
1,620
126
Yeah, like others have said, it'll probably work ok.

But if you were making a "proper" Ubuntu template, besides what others have said, I'd also remove anything from stab that requires a network connection. Mountd hangs and it's annoying.
 

riahc3

Senior member
Apr 4, 2014
640
0
0
The only thing I have is I think I set manually a static IP in Ubuntu....

But it would be from VM to physical so in theory I would just shut off the VM and that's it.
 

manly

Lifer
Jan 25, 2000
13,059
3,817
136
No. (Which is natural considering sysprep/generalize are specific to Windows.)

ultimatebob raised a good point about networking. Red Hat's default ifcfg files do reference the hardware MAC, but IIRC it doesn't actually mean what we think it means (enforcement of IP<->MAC of a specific NIC). Debian's interfaces file does not normally reference any hardware MAC identifiers. By habit, I usually strip down network config files down to the minimal necessary lines.

Nevertheless, there are mappings from MAC to network device, and these are automatically determined and statically referenced in:
/etc/udev/rules.d/70-persistent-net.rules

So to move an OS to a different machine and have it discover the new NICs, just delete this file at any time (and reboot if already running on the new machine).

I only use Linux as a server OS nowadays, so I can't speak to client stuff like X Windows.
 

Red Squirrel

No Lifer
May 24, 2003
70,068
13,522
126
www.anyf.ca
I've always had issues with the networking when doing this regardless of if the mac is in there. Linux does not seem to like having the network card type get changed. So if the new machine has the same card it should be fine but if it's another it wont work. All the times I've tried to virtualize a Linux system I ended up having to reinstall from scratch on new machine and reconfigure everything.

Worth a shot though, it's been a long time since I tried it, and I'm actually going to be trying it some time with my main server which I want to virtualize, so maybe things are better now.