My Manjaro backup isn't working

I upgraded my ThinkPad t430 from a 500MB HDD to 2*480MB SSD (Kingston SSD A400 Solid State Drive 2.5 inch SATA 3). I made a basic system backup with timeshift on a USB beforehand to get back my Manjaro configurations.

I re-installed Manjaro on the brand new SSD and updated it, then I opened Timeshift and plugged in the USB with my backup. Selected the latest snapshot from the USB, clicked ‘Restore’ and agreed to all the disclaimers. The program was doing its thing for about 10min, after which I just got a blank DOS-like screen with a blinking cursor.

I tried restarting it and then it showed me this:

Eventually it showed this:

Did I make the backup file wrong? Is there no hope for getting back my system settings? Should I just start over with a new install? Any input would be appreciated, thanks.

When you create the partitions on your new disk, the UUIDs of all the partitions have changed from those on the other disk.When restoring the backup, you have overwritten the /etc/fstab file and now it is trying to mount partitions with a UUID that no longer exist.

You should start by finding out the new UUIDs of the partitions with the command:

lsblk -f

Then update that information in:

sudo nano /etc/fstab

Do I do this in my new Manjaro installation? Where do I input these commands? The DOS-like screen doesn’t recognise these commands.

Ok, so I have a temporary OS running from a USB. I put the USB with the backup in and entered the first command:

lsblk -f

This is what came up, what do I do now?

This is what comes up when I enter

sudo nano /etc/fstab

From the temporary OS you have to open the file explorer and in the left panel click on the root partition of your Manjaro. On the right, go into /etc/ with administrative permissions and edit the “fstab” file to update the UUID values to those given by the “lsblk -f” command.

Save the changes and reboot.

Don’t try editing your backup.
Edit the file on the installation that is supposed to be fixed.
No need to mount or use your backup!

Which disk is your Manjaro installation on?
It looks to be /dev/sdb1

if it is:

mount that partition - to /mnt for example

sudo mount /dev/sdb1 /mnt

Then use your editor and open the /etc/fstab file on /dev/sdb1
which is now accessible under /mnt/etc/fstab

sudo nano /mnt/etc/fstab

and adjust
(copy/paste from the lsblk -f output)
the UUID in that file

verify that you did the edit correctly by either opening the file again and checking or by doing
cat /mnt/etc/fstab
and printing the file to screen that way

unmount the disk from /mnt
sudo umount /mnt
or just shut down your live system and try booting Manjaro again

3 Likes

I think I did what you told me to but it still didn’t work.

I mounted the drive partition with Manjaro installed on it and I edited the /etc/fstab file with the UUID I found with lsblk -f


I used the UUID from my USB with the backup (labelled sdc, BACKUPS)

But after, when I tried to recreate from the backup using Timeshift, the computer froze for a while with the mouse moving but nothing responding. After that it went dark. When I tried restarting it and booting up the Manjaro drive it showed me this:

Incorrect UUID. Please forget the backup and disconnect that drive if you can.

The correct UUID is your Manjaro root partition, but we don’t know which one it is. We suspect it must be “sda1” (I don’t know its size) or “sdb1” which has a size of 410 GB.

“sdc” is your backup drive and “sdd” seems to be the live USB (temporary OS) you booted the machine with.

So the UUID you should use in “fstab” is the one ending in “202c” or the one ending in “84bf”.

If your Manjaro root partition is “sda1”:

  1. sudo mount /dev/sda1 /mnt
    
  2. sudo nano /mnt/etc/fstab
    
  3. Use the “sda1” partition UUID ending in “202c”.
  4. Control + S, Control + X for save and exit.

If your Manjaro root partition is “sdb1”:

  1. sudo mount /dev/sdb1 /mnt
    
  2. sudo nano /mnt/etc/fstab
    
  3. Use the “sdb1” partition UUID ending in “84bf”.
  4. Control + S, Control + X for save and exit.

Translated with www.DeepL.com/Translator (free version)

2 Likes

What do you mean

That defats the hole purpose, I want my old configuration.

Also you say to mount a partition, open a fstab file for that partition and use its own UUID which is already in that file? That doesn’t do anything, I don’t understand.

You already have it.
In your initial post you said that you
installed Manjaro
and then
restored your backup to that system

That process did overwrite the /etc/fstab file as well.
It contains the UUID of the old install
You need to change that to the UUID of the current installation.

When you re-installed, a new partition with a new UUID was created.
The /etc/fstab contains the wrong (the old) UUID now.

That is the current situation as I understand it.

To do that change you need to edit that file.
To edit that file, you need to mount that partition …

4 Likes

Where in the file should I paste the sda1 UUID?

second line
the one that says UUID=xxxx / ext4 defaults,noatime 0 1

Ok the file is edited
Before:


After:

But a problem persists.

And I definitely edited the file:

first thing:
you need to be sure which disk your Manjaro installation is on
Is it /dev/sda1 indeed?

If it is, the UUID is the one in your earlier screenshot ending in 0f202c
This has to end up in the /etc/fstab file.

The error message you got indicates that either you mixed up your before and after screenshots
or you didn’t do the edit.
Either way, you used the wrong UUID - they are both incorrect.

Neither the before nor the after UUID is correct.
one ends in 0a8c, the other in 5e47

Again, IF your disk is /dev/sda1 then the UUID is the one in ending with 0f202c

btw - screenshots are a pain in the butt - can you please just copy/paste the output as text

pay attention, try to understand what you are doing
have two terminals open - one where you list the UUID, so that you can copy/paste from there
and one where you edit the file in.

You can use
lsblk -f
or
sudo blkid
to list the UUIDs

Verify what is actually in the file after you edited it:
cat /mnt/etc/fstab

To make things easy
you can also just write /dev/sda1 instead of using the UUID
but this is not robust and may give you problems later on.
But as a quick fix, to get your system booted, it should work.

The line would then read:
/dev/sda1 / ext4 defaults,noatime 0 1

and one more thing:
the UUID of your swap partition may also need to be changed later - if you did a fresh installation and didn’t tell the installer to use the one you already had.
But this is not critical - it will complain, but it will still boot.

3 Likes

Sorry the picture with the lsblk -f output isn’t up to date. I tried re-installing the backup to fix the issue and that caused the UUIDs to change. Right now the output looks like this:

NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
loop0
squash 4.0 0 100% /rofs
sda
└─sda1
ext4 1.0 66c14f8f-0e16-4a7e-84cf-2ee6555f5e47
sdb
└─sdb1
ext4 1.0 6315169a-3acb-4db6-bad0-0e82c9a29ae5
sdc iso966 Jolie Pop_OS 20.10 amd64 Nvidia
│ 2021-03-30-16-29-39-00
├─sdc1
│ iso966 Jolie Pop_OS 20.10 amd64 Nvidia
│ 2021-03-30-16-29-39-00 0 100% /cdrom
├─sdc2
│ vfat FAT12 1DBD-B670
└─sdc3
ext4 1.0 writable
27987232-a838-4d5d-acc3-00a0c57a83ba 4.1G 1% /var/crash

So the UUID I pasted into the /etc/fstab file is definitely correct since I installed my backup on sda1. This is what the file looks like now:

UUID=B040-761E /boot/efi vfat umask=0077 0 2
UUID=66c14f8f-0e16-4a7e-84cf-2ee6555f5e47 / ext4 defaults,noatime 0 1
UUID=546711ca-ae82-41db-b07e-7191d85015e5 swap swap defaults,noatime 0 0

What doesn’t make sense is why during boot the kernel doesn’t seem to notice any of the changes I’ve made. It still displays the old UUID on the error message, like this:

error: no such device: 1a8a81f8-5c36-4643-a54a-715291970a8c.
error: disk ‘hd0,gpt2’ not found.
error: you need to load the kernel first.

P.s When I try to mount sdb and open /etc/fstab file it says : [ Directory '/mnt/etc' does not exist ] so my backup is most likely not there.

I’m also new to linux and i could be possible wrong here, but that looks like alot of hassle what you doing here, maybe the easy way could be reinstall Manjaro and only replace your Home folder (where all the settings from Manjaro are saved) and you good to go?

Maybe someone with more experience can verify this… because i never did this way and i don’t know if this causes other issues.

Never use device names like /dev/sda2 - systemd loads the devices in arbitrary order - you must use a persistent identification like UUID or LABEL to avoid possible load order issues.

After you have adjusted your fstab - did you check your default grub config /etc/default/grub?

If you are/were using hibernation you may have an invalid reference to the system swap.

In any case you will need to rebuild your grub configuration

sudo grub-mkconfig -o /boot/grub/grub.cfg

While timeshift is handy to recover from when you run into intermediate update errors - it is not the best tool for restoring to bare metal (in case of disk exchange).

Other tools are better suited.

A rule of thumb - packages can always be reinstalled - when you have made system specific changes to a few specific system files - document the change so you will know what to look out for.

Backup only your home folder - everything else can be installed.

Consider using separate storage for your data - either on the same disk or more preferable on a secondary disk.

There is a couple of topics in the #contributions:tutorials section covering these scenarios e.g.

1 Like

This might work but I can’t get to my old home folder. The only existing version of it is on that backup which doesn’t work. Do you think I should try to find a PC with a HDD just to restore the backup there and copy over my home folder to my laptop?


This is very good advice for the future thank you.

I think its much more easy than you expected :wink:

Just boot with your created usb live image on usb drive and browse in your timeshift location and just copy/paste from there into your fresh installed and working Manjaro drive and replace this home folder.

But just in case, i saw you have other Distribution installed and i hope you don’t overwritte something that you miss later, possible you are using a seperate partition for your home folder… i just wanted to warn you again that im still a linux noob and there could be some issues and problems that i can’t solve :wink:

I expected it to be that easy when I created the backup, but to see that happens when I tried that go to the beginning of this thread. My laptop just doesn’t wanna work with that backup ever since I switched from HDD to SSD.