moving a working fedora install from old to new hardware?

Ryan Lynch ryan.b.lynch at
Mon Aug 24 13:09:21 UTC 2009

Two routes that have worked OK for me in similar circumstances:

1) KVM virtualization: If your hardware supports VT, the old image
will basically work with zero changes. Do a basic install w/ libvirt
on the new hardware, then 'dd' the whole physical drive image to a
file on the new box, and create a new virt guest.
    Editing ifcfg-eth* files is about the only change you'll make, and
the performance is quite good. (For bonus points, switch it to
'virtio' disks/nics--a little extra work, which boosts IO

2) Manual w/ 'rsync' assistance: Manually migrating isn't hard--it's
not like Windows, there's no install-time HAL magic that you can't
change. Plus, there are tools (like rsync, and the install ISO) that
make it a lot easier. Here's the steps:

 - Partitioning/formatting: Boot the new machine with an install ISO
and get your LVM partitons set up. Its easiest to just let it install
a quick, barebones setup, accepting defaults except for the LVM you
need. (If you know manual fdisk, LVM, and makefs.* usage, any old boot
disk will do, and you can just partition/format it.)

 - Creating mount points: (still on the new machine running the
boot/install disk) Create any mount point dirs in your new LVM root,
and mount the LVM volumes on them. Update your existing ftstab on the
old box, at this point, to remove any old mounts and add these new

 - Copying filesystem(s): (back on the new machine, but leave the new
one booted w/ that ISO and network-accessible) Run 'rsync' (over GigE,
ideally) with the (I think) -a, -H, -A, and -X options, plus the
option to copy SElinux context (I forget it, but it's in the man
page). Copy from the existing root to the new box's dir that is the
new root's temp mount point.

(After this, all on the new box.)

 - Initrd creation: Fedora creates initrds at kernel install time,
usually in the RPM post script, using the 'mkinitrd' script. Exact
usage depends on your version, but it's not hard--google has some
examples, as does FedoraForum. Or, if using the install ISO, you can
enter a Chroot and use 'rpm -E ...' to remove the existing kernel
package, followed by 'rpm -ih ...' to re-install it.

 - GRUB installation: Again, you'll have to look up the exact method
for you version, but the install ISO and Chroot make this pretty easy.

After rebooting the new box, you should be in business--just modify
your ifcfg-eth* files and off you go.

(I realize #2 is a bit more than your question asked for--apologies if
I overran your needs, there.)

On 2009-08-24, Robert P. J. Day <rpjday at> wrote:
>   what is the preferred way to migrate a working fedora install from
> an aging box to a newer one?  an extra complication is that the old
> server has a single root filesystem with everything in it, while the
> new, super-fast box is a dual drive system that will be using LVM.  so
> a simple byte-for-byte clone using "dd" isn't an option.
>   so is there a fedora way to say, "make *this* box look just like
> *that* box, but do it intelligently"?
> rday
> --
> ========================================================================
> Robert P. J. Day                               Waterloo, Ontario, CANADA
>         Linux Consulting, Training and Annoying Kernel Pedantry.
> Web page:                                
> Twitter:                             
> ========================================================================
> --
> fedora-list mailing list
> fedora-list at
> To unsubscribe:
> Guidelines:

Ryan B. Lynch
ryan.b.lynch at

More information about the users mailing list