SABAYON USERS in particular, but other Users can take note.
...So at #18 I flagged a potential problem, which is to do with
restoring from a Timeshift snapshot.
TARGET PARTITION - Left as is or deleted?
When you restore a snapshot, you can choose to restore it to the same partition your Distro was on, or to a different partition you have prepared in advance.
If the former, you can make a choice of whether to :
- Delete the partition using eg GParted and create a new one in the same spot, or
- Simply restore over the top of the Distro that you had in place, working or otherwise.
EXAMPLE 1
My Sabayon, on my /dev/sda17, has had an adverse reaction to an update. I can leave /dev/sda17 intact, launch Timeshift, choose /dev/sda17 to restore to, and rollback to where I was before the update/s.
EXAMPLE 2
Same as the above, but I choose to delete /dev/sda17 using GParted (or else I deleted it accidentally whilst in GParted), which leaves me Unallocated Space, I then right-click that and choose New and duplicate the partition size for a new but empty /dev/sda17. I then run my Timeshift Restore.
EXAMPLE 3
Same as the above two, but this time I create a new Partition same size or not (only has to be a couple of GB larger than the snapshot), and "Restore" to that new partition, I'll call it /dev/sda20 because I have a couple more Linux at 18 and 19.
Can we expect any problems from any of these scenario?
No for many Distros (you might get a warning or message at bootup), but YES for some, and
Sabayon is one of them.
Example 1 works fine with Sabayon. (This was what I had done prior to writing the previous Posts).
Example 2 - it fails to boot properly.
The use of GParted generates a new UUID (Universal Unique IDentifier) for my /dev/sda17, and the restored snapshot, even though it "updates bootloader configuration", does not accommodate that change. The screenshot from boot shows.
SCREENSHOT 1 - BOOT FAILURE
In order to remedy this, I was able to do the following:
1. At my Grub Menu, down the bottom of the screen, I chose 'e' to edit the startup commands. Screenshot 2 illustrates what that looks like, and look for the three (3) references to UUID
SCREENSHOT 2 - Startup Edit Commands
2. Having armed myself (from another Distro I booted, but you could use a USB stick or CD/DVD with GParted on it) with the UUID of the
new partition, I replaced all three instances of the old UUID with the new, and then successfully booted.
NOTE that this will only hold for the current session, and will not be sustained with reboots.
3. In Sabayon, I then went to Terminal and performed the following:
Code:
sudo grub2-install /dev/sda
#and
sudo grub2-mkconfig -o /boot/grub/grub.cfg
Note that with that second string of code - the file /etc/default/grub
erroneously has
Code:
# To populate all changes in this file you need to regenerate your
# grub configuration file afterwards:
# 'grub2-mkconfig -o /boot/grub2/grub.cfg'
That is not so, I have added
Code:
#CRAP - 1ST PART RIGHT, 2ND PART IS grub, not grub2, also
#'grub2-mkconfig' is interchangeable with 'grub-mkconfig'
... but that's just me
4. Reboot once grub is updated, and all is good.
I have yet to check against Example 3, but will report back here with my outcome.
Cheers
Wizard