I was recently trying to backup my Ubuntu server using this guide. I am restoring a backup of my entire server from the / directory using a tar.gz compressed file. The guide worked up until the last step involving restoration, when I tried restoring grub from Ubuntu Live using the command "dpkg-reconfigure grub-pc". I get an error message in the terminal saying: "Cannot find list of partitions! Try mounting /sys." I tried mounting /sys but when I try running the command it says /sys is already mounted.
When I unplug the USB and reboot Grub menu appears, and I can login to my server backup using the old username and password, however after logging in I find that everything has read only file permissions, and none of the original user permissions are stored, so essentially the whole system is broken.
I went into Live Ubuntu, reformatted my /dev/sda2 partition with gparted, and then restored my tar.gz backup using the following commands:
sudo mkdir /media/backup sudo mount /dev/sda2 /media/backup sudo tar -xvpzf /path/to/backup.tar.gz -C /media/backup --numeric-owner
sudo -s for f in dev dev/pts proc ; do mount --bind /$f /media/whatever/$f ; done chroot /media/whatever dpkg-reconfigure grub-pc
Any idea what I am doing wrong?