3

I have a Debian system I wish to migrate to newer, improved hardware. Over the years there have been changes to /etc both from myself and from system updates.

I would like to create a diff of my /etc changes. Are there any (hopefully easy) ways to do this?

With better forsight I would have used 'etckeeper' from the start. As that ship has sailed I was thinking of installing a clean, matching install using 'debootstrap', updating the new filesystem with my packages and then performing a diff.

Being a debootstrap novice I am worried that installing packages will also start them and conflict with their siblings in the main filesystem. Do I also have to ensure grub and other boot packages are not installed in the new filesystem?

2
  • Better place for this question could be Unix & Linux. Oct 31, 2013 at 16:33
  • I am not sure I see the need for the whole ruckus. Why don't you just dd the old disk into the new disk? You will need to install a few new drivers (wifi, ethernet, video), but that is easily taken care of. You can fix the boot sector with boot-repair, re-configure X with a single command. Udev will take care of all the rest for you. And, since you dd'ed your all disk, you don't even need to rewrite /etc/fstab, as the partitions GUID have not changed. Of course, you will need a live distro to exec these changes, because the new system will not boot before completing them. Oct 31, 2013 at 19:43

1 Answer 1

0

As Marius notes, you could simply move the disk (or an image of the disk) to the new hardware, and in most cases there would be very little left to update manually.

But if you want a fresh install, running debootstrap is the method I use when building a server: I attach the new drive to my main system, configure the partition table, configure LVM, format file systems, mount to a convenient mount point, run debootstrap to install, perform basic configuration for boot and LVM and remote access, umount, move drive to new system, boot new system, access new system using ssh, install packages, and finally configure packages as needed.

After installing packages, but before doing any configuration, you could do your diff to discover which files would need manual review.

Regarding grub and other boot packages, you most likely will want to install these to your new file system, unless you have some other method of booting your new machine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .