I want to restore a complete tar backup of Ubuntu 12.04 with all my customizations, documents, installed software, etc. to a different machine.
I made the backup with the following commands:
sudo su
cd /
tar cvpzf ububackup.tgz --exclude=/ububackup.tgz --exclude=/proc --exclude=/lost+found --exclude=/sys --exclude=/mnt --exclude=/tmp --exclude=/media /
On the new computer I did a fresh install of Ubuntu 12.04, moved the backup file to it and then restored with the backup file with the following:
tar xvpfz backup.tgz -C /
As expected (see Mike Whatever's answer to this question: Copy Ubuntu distro with all settings from one computer to a different one) this broke grub. When I turn on the computer I get an error:
error: no such device: ...
press any key to continue ...
I believe the reason that Grub is broken is that the UUID it is looking for matches on the old hard drive not on the hard-drive for the computer.
How can I fix my grub to recognize the new hard-drive? I looked online for help "Fix GRUB UUID" but the steps seemed either out of date or complex. The response from Mike I linked to above gives me hope that there is a fairly simple way to repair this.