1

I have two identical Lenovo T420 laptops. Both are triple boot - Windows 10 and the last two versions of Ubuntu. The Linux partitions on each look like this: sda1 30G / for oldest Ubuntu, sda2 30G / for newest Ubuntu, sda3 Linux swap, and sda4 /home 200G shared by both of the Ubuntu installations.

Sometimes, I would like to take a timeshift snapshot of sda1 and sda4 on one Lenovo laptop and restore it to sda1 and sda4 of the 2nd Lenovo laptop, but when I try to do that, the result is unbootable. I have tried reinstalling grub after the restore, but that does not help.

timeshift seems to work perfectly if I restore to the same partition that the snapshot was taken. Other times, I would like to restore a snapshot of sda1 to sda2 of the same laptop. If anyone can point me to something I should read or suggest what I need to be careful about - that would be great.

Thanks everyone - Have a wonderful day. -- Ed Doyle

Ed Doyle
  • 11
  • 1
  • 3

1 Answers1

1

Each parititon has its own uniqe ID (UUID). GRUB is probably unable to boot because it can't see other parition, because it still looking for the old UUID, which is saved in the /boot/grub/grub.cfg.

Another thing is /etc/fstab. If you're using block devices name (i.e. /dev/sdX), the system won't boot from another parititon. Use UUID's in your fstab instead.

You can look for partition UUIDs with:

sudo blkid | grep -v ^/dev/loop

Example /etc/fstab with UUIDs:

UUID=3e77522d-9de5-4f88-9331-f0af2ace3f80 /               ext4    errors=remount-ro 0       1
UUID=b00e75b8-8a39-11e9-bc42-526af7764f64 /boot           ext4    defaults        0       2

Solution 1

Make sure that your partition snapshot is full binary copy of the parition, with the same UUID. But in this case you'll need to change the old parition UUID, because otherwise you'll end up with two parititons with same UUID, that will conflict with each other.

Solution 2

Boot live CD and try to chroot into your new parition, using this wiki. Edit /etc/fstab and /boot/grub/grub.cfg, replace your old UUID to the new one. Then you should be able to boot. But you have to make sure that GRUB is installed on the device and it's first to boot in your BIOS configuration.

Other solutions

There are also similar QA on askubuntu that might be helpful:

Comar
  • 1,485
  • Thank you soooo much. I believe you hit the nail on the head. I am still testing, but it looks like everything is working perfectly now. I changed my procedure just slightly. Assuming a starting point of / is sda1 and /home is sda4, as explained initially, I run timeshift booted in sda1 and save the snapshot to an external drive. I boot from a CD and install Ubuntu in sda2. I boot in sda2 and install timeshift. I restore the snapshot from the external hard drive to sda2. I reboot and test the copy of sda1 system now in sda2. So far, everything is working perfectly. THANK YOU very much – Ed Doyle Jun 10 '19 at 17:18