1

I'm running a dual-boot Ubuntu & Windows 10 Pro configuration. Before re-installing Windows I made 2 full backups with TAR and SquashFS of / with the following commands:

SquashFs:

sudo mksquashfs / /media/dennis/Backup_SSD/Ubuntu_N580VD_Backup.sqsh -e media dev run mnt proc sys tmp

TAR:

sudo tar czf /media/dennis/Backup_SSD/Ubuntu_N580VD_Backup.tar.gz --exclude=/backup.tar.gz --exclude=/dev --exclude=/mnt --exclude=/media --exclude=/proc --exclude=/sys --exclude=/tmp --exclude=/lost+found /

squashfs_log and tar.gz_log

After re-installing Windows Ubuntu failed to boot:

tpm_crb MSFT0101:00: [Firmware Bug]: ACPI region does not cover the entire command/response buffer. [mem 0xfed40000-0xfed4087f flags 0x201] vs fed40080 f80
Couldn't get size: 0x800000000000000e
PKCS#7 signature not signed with a trusted key

So I re-installed Ubuntu on sda6 and now it's booting again. But how do I replace the content of the fresh install on partition sda6 with the content of my .tar.gz or .squashfs backup files?

sda            238.5G                                   
├─sda1 ntfs      499M | Recovery
├─sda2 vfat      100M | Boot (EFI)                                  
├─sda3            16M | Microsoft reserved                                
├─sda4 ntfs    137.4G | Windows                                  
├─sda5 swap        4G | SWAP                          
└─sda6 ext4     96.5G | Ubuntu
grooveplex
  • 2,486
Denisuu
  • 37
  • 1
  • 2
  • 8
  • 1
    Thanks! After setting up all my preferences I made a backup of sda2 (boot) and sda6 (root) with Clonezilla this turned out to be only 5,7GB so it's a very good method to make backups! – Denisuu Jan 01 '19 at 20:08
  • Hi! Welcome to Ask Ubuntu! Here it is not necessary to update your post when your problem has been solved. Instead, the answer counter will be filled in with a particularly nice shade of green. :) – grooveplex Jan 02 '19 at 01:47
  • @Denisuu: CloneZilla is perfect to make cold system backups (/boot and / if on separate partitions, but a bad system for data files. I use borgbackup but backintime and dejadup are good as well and were my previous data backup programs)borgbackup` is a compressing deduplicating* backup program, and a PPA was created a short while ago... – Fabby Jan 02 '19 at 11:25

1 Answers1

1

Looking at your logs, you made a hot system backup instead of a cold system backup, which means that files were being modified while you were making your backup. On top of this, your OS (/) and data (/home) are not separated, so under these, far from ideal circumstances, I would:

  1. log into the console as root, not the GUI nor your admin user
  2. Mount the squash file system:

    mkdir /media/restore
    mount /media/dennis/Backup_SSD/Ubuntu_N580VD_Backup.sqsh /media/restore -t squashfs -o loop
    
  3. Copy your data:

    cp --recursive --preserve=all /media/restore/home/* /home/
    
  4. Shut down the machine in its working state
  5. Take a CloneZilla live cold backup of your system in its current state.

For the following steps, it'll depend on your luck and the kind of applications you were running at the time you made the hot backup.

  1. Copy everything from your hot backup except /run which is a virtual file system set up in memory by the kernel:

    rsync --archive --verbose --progress /media/restore/* / --exclude /media/restore/run
    
  2. Reboot and pray to the gods of Torvalds and Stallman that this'll work. ¯\_(ツ)_/¯

  3. If it doesn't work:
    1. Restore your CloneZilla Live cold backup
    2. Reinstall all your applications. (Individual configurations of these applications are still available in your /home from the data restore.)
    3. For heaven's sake: don't take hot system backups and put the CloneZilla Live ISO file in your grub menu and take cold backups from now on.
  4. If it does work: Remove root login please. Congratulations! I never thought you would reach this step as hot backups are notoriously unreliable.
Fabby
  • 34,259
  • Please don’t use emoticons or emojis on Ask Ubuntu, that’s considered noise by the community. – dessert Dec 31 '18 at 08:17
  • Thank you! I guess I'll just start from scratch then, there's really not much important in there. It was just meant as a clean install + apps & configurations backup. I actually tried to make a backup with Clonezilla before I did the .tar and .squashfs backups. But got an error: The partition table in this disk is illegal/invalid: /dev/sda It's not supported by parted. Parted is used in Clonezilla to parse the filesystem in the partition table. This partition table is detected as WRONG by parted! – Denisuu Dec 31 '18 at 12:56
  • I'm just looking for a good way to make a full system backup that is also compressed. I will add Clonezilla to grub as you described and try again. Can I make a backup of the bootloader too? Because the problem described here and here always keeps coming back. Thanks again and happy NY! – Denisuu Dec 31 '18 at 13:04
  • 1
    @dessert as per your link: "So no, please don't include emojis in AU questions or answers *unless they really are necessary for some reason." [Emphasis mine]. As Linus and RMS are not really gods, the emoji conveys emphasis and is therefore necessary* ;-) :D – Fabby Dec 31 '18 at 16:28
  • @Denisuu Yes: CloneZilla even allows copying the empty sector between the boot sector and the first partition, which is sometimes used by copy-protected programs to store data. On the error: you have a corrupted partition table and should not try to restore that: create anew (as you already did) – Fabby Dec 31 '18 at 16:35