#1824 Issue closed: Recovery failed - 'disk layout recreation script failed'

Labels: support / question, fixed / solved / done

malvinas2 opened issue at 2018-06-06 00:14:

Hello,

my recovery from an USB-stick failed, but MBR of the SSD has already been erased.
Is there anything I can do to restore the backup successfully ?

  • ReaR version ("/usr/sbin/rear -V"): rear_2.3-0_amd64
  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"): Ubuntu 16.04 LTS
  • ReaR configuration files ("cat /etc/rear/site.conf" or "cat /etc/rear/local.conf"):
# OUTPUT defines kind and location of rescue image
# BACKUP defines kind and locaiton of backup data
#  It is important that the BACKUP_URL and OUTPUT_URL variables are different.
#  BACKUP_URL=iso://       To include the backup within the ISO image.

######################
#                    #
# Backup-Variante 1: #
#                    #
######################

OUTPUT=USB
BACKUP=NETFS 
BACKUP_URL=usb:///dev/disk/by-label/REAR-000

######################
#                    #
# Backup-Variante 2: #
#                    #
######################

 # OUTPUT=ISO
 # BACKUP=NETFS
 # OUTPUT_URL=file:///media/relax
#  BACKUP_URL=iso://

## BACKUP_URL=file:///media/usb1
BACKUP_PROG_EXCLUDE=( "${BACKUP_PROG_EXCLUDE[@]}" '/meinesachen/Artwork_EPG/*' '/meinesachen/Artwork_Music/*')

##EXCLUDE_RECREATE=( "${EXCLUDE_RECREATE[@]}" "/dev/backup" )

EXCLUDE_MOUNTPOINTS=(/media/disc)
EXCLUDE_MD=("/dev/md0" "/dev/md1")
EXCLUDE_VG=(lvraid)
  • System architecture (x86 compatible or POWER and/or what kind of virtual machine): x86-64
  • Are you using BIOS or UEFI or another way to boot? UEFI

diskrestore.sh
rear-ubuntu.log
df.txt
disklayout.conf

Screenshots

My recovery from an USB-stick failed, but MBR of the SSD has already been erased.
A few seconds after the start of rear recover it quits with the error message "disk layout recreation script failed'
During the boot procedure of rear I see the message -don't know how to make device "nvmen"-. (I don't know if this is important)

jsmeix commented at 2018-06-06 14:04:

@malvinas2
your rear-ubuntu.log contains

+++ parted -s /dev/nvme0n1 mkpart 'EFI System Partition' 1048576B 537919487B
parted: invalid token: System
Error: Expecting a file system type.

so that this issue is a duplicate of
https://github.com/rear/rear/issues/1563
which was fixed after the ReaR 2.3 release.

The workaround in your case is to manually adapt the diskrestore.sh script
inside the ReaR recovery system while "rear recover" runs via the UserInput
3) Edit disk recreation script (/var/lib/rear/layout/diskrestore.sh) choice.

You need to replace in the diskrestore.sh script all

... 'EFI System Partition' ...

values with a value without blanks like

... 'EFI_System_Partition' ...

or alternatively use duplicated quoting as described here
https://github.com/rear/rear/issues/1563#issuecomment-359774531

To use a ReaR version where this issue should be already fixed:

I recommend to use our current ReaR upstream GitHub master code
because that is the only place where we fix bugs - i.e. bugs in released
ReaR versions are not fixed by us (i.e. by ReaR upstream).
Bugs in released ReaR versions that got fixed in current ReaR upstream
GitHub master code might be fixed (if the fix can be backported)
by the Linux distributor wherefrom you got your ReaR version.

To use our current ReaR upstream GitHub master code
do the following:

Basically "git clone" it into a separated directory and then
configure and run ReaR from within that directory like:

# git clone https://github.com/rear/rear.git

# mv rear rear.github.master

# cd rear.github.master

# vi etc/rear/local.conf

# usr/sbin/rear -D mkbackup

Note the relative paths "etc/rear/" and "usr/sbin/".

malvinas2 commented at 2018-06-06 22:12:

It worked!
Thank you very much for your quick and detailed answer!

jsmeix commented at 2018-06-08 12:47:

@malvinas2
you are welcome!
Thanks for your explicit positive feedback.
It helps (at least me) a lot to have an explicit feedback
that there is no possibly other still unknown issue in ReaR.


[Export of Github issue for rear/rear.]