#2502 Issue closed: ReaR cannot create bootable USB stick

Labels: support / question, fixed / solved / done

dcz01 opened issue at 2020-10-15 13:24:

ReaR cannot create bootable USB stick

Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):

  • ReaR version ("/usr/sbin/rear -V"):
    rear-2.6-1

  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"):
    CentOS/RHEL 6.10 x86_64

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):

#OUTPUT=RAWDISK
OUTPUT=USB
USB_DEVICE=/dev/disk/by-label/REAR-000
OUTPUT_URL=file:///tmp/rear
BACKUP=NETFS
#BACKUP=TSM
BACKUP_PROG=tar
BACKUP_PROG_CRYPT_ENABLED=1
BACKUP_PROG_CRYPT_KEY=xxxxxxxxxxxxxx
BACKUP_PROG_CRYPT_OPTIONS="/usr/bin/openssl aes256 -salt -k"
BACKUP_PROG_DECRYPT_OPTIONS="/usr/bin/openssl aes256 -d -k"
BACKUP_URL=nfs://xxxxxxxx/Backups
#BACKUP_URL=cifs://<Server>/<Freigabe>
BACKUP_OPTIONS="nfsvers=3,nolock"
#BACKUP_OPTIONS="cred=/etc/rear/cifs,sec=ntlmsspi"
BACKUP_TYPE=incremental
FULLBACKUPDAY="Sat"
BACKUP_PROG_EXCLUDE=( '/tmp/*' '/dev/shm/*' $VAR_DIR/output/\* '/opt/tivoli/tsm/rear/*' '/mnt/*' '/media/*' '/var/lib/pgsql/*/data/base/*' '/var/lib/pgsql/*/data/global/*' '/var/lib/pgsql/*/data/pg*/*' )
USB_SUFFIX="$HOSTNAME"
USB_DEVICE_PARTED_LABEL=gpt
USB_DEVICE_FILESYSTEM=ext4
SSH_ROOT_PASSWORD='$1$HGjk3XUV$lid3Nd3k01Kht1mpMscLw1'
NON_FATAL_BINARIES_WITH_MISSING_LIBRARY='/opt/tivoli/tsm/client/ba/bin/libvixMntapi.so.1.1.0'
  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
    Hardware BareMetal Server

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
    x86

  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):
    UEFI and GRUB 0.97

  • Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
    Local Disk RAID

  • Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,SIZE,MOUNTPOINT" or "lsblk" as makeshift):

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sr0     11:0    1  1024M  0 rom
sda      8:0    0   150G  0 disk
├─sda1   8:1    0   500M  0 part /boot
├─sda2   8:2    0   200M  0 part /boot/efi
├─sda3   8:3    0     4G  0 part [SWAP]
└─sda4   8:4    0 558,8G  0 part /
  • Description of the issue (ideally so that others can reproduce it):
    rear format -- --efi /dev/sdb
    rear mkrescue

ReaR then later outputs the following:

ERROR:
====================
BUG in /usr/share/rear/output/USB/Linux-i386/850_make_USB_bootable.sh line 40:
'Filesystem for device '/dev/sdb2' could not be found'
--------------------
Please report this issue at https://github.com/rear/rear/issues
and include the relevant parts from /var/log/rear/rear-brp-server.log
preferably with full debug information via 'rear -D mkrescue'
====================
Some latest log messages since the last called script 850_make_USB_bootable.sh:
  2020-10-15 14:29:38.683015565 Including output/USB/Linux-i386/850_make_USB_bootable.sh
Aborting due to an error, check /var/log/rear/rear-brp-server.log for details
Beendet

So ReaR won't create the bootable stick because it can't find the partition.

  • Workaround, if any:
    None

  • Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):
    rear-brp-server.log

jsmeix commented at 2020-10-15 14:33:

At first glance it looks like
https://github.com/rear/rear/issues/1376
which is fixed long ago in Jun 2017 via
https://github.com/rear/rear/commit/9875ba30288634e3b2c55b26b14a726acce09252

jsmeix commented at 2020-10-15 14:39:

@dcz01
the relevant part from your rear-brp-server.log is

+++ grep -E '^/dev/disk/by-label/REAR-000 |^/dev/sdb2 ' /proc/mounts
+++ cut '-d ' -f3
+++ tail -1
++ usb_filesystem=
++ case "$usb_filesystem" in

++ BugError 'Filesystem for device '\''/dev/sdb2'\'' could not be found'

so you should inspect what /proc/mounts contains in your case.

dcz01 commented at 2020-10-20 12:51:

@jsmeix Now i tested it another time and this time it worked. I don't know why...
We haven't changed anything.
I looked at the /proc/mounts where i can't find a /dev/sdb2:

rootfs / rootfs rw 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
devtmpfs /dev devtmpfs rw,seclabel,relatime,size=16298220k,nr_inodes=4074555,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /dev/shm tmpfs rw,seclabel,relatime,size=16312304k,nr_inodes=4078076 0 0
/dev/sda4 / ext4 rw,seclabel,relatime,barrier=1,stripe=64,data=ordered 0 0
none /selinux selinuxfs rw,relatime 0 0
devtmpfs /dev devtmpfs rw,seclabel,relatime,size=16298220k,nr_inodes=4074555,mode=755 0 0
/proc/bus/usb /proc/bus/usb usbfs rw,relatime 0 0
/dev/sda2 /boot ext4 rw,seclabel,relatime,barrier=1,stripe=256,data=ordered 0 0
/dev/sda1 /boot/efi vfat rw,relatime,fmask=0077,dmask=0077,codepage=cp437,iocharset=ascii,shortname=winnt,errors=remount-ro 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0

And then i did another lsblk:

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  1,1T  0 disk
├─sda1   8:1    0  200M  0 part /boot/efi
├─sda2   8:2    0  500M  0 part /boot
├─sda3   8:3    0 15,6G  0 part [SWAP]
└─sda4   8:4    0  1,1T  0 part /
sr0     11:0    1    1G  0 rom
sdb      8:16   1  3,8G  0 disk
├─sdb1   8:17   1  400M  0 part
└─sdb2   8:18   1  3,4G  0 part

And i think now the making of an bootable USB stick worked fine looking at the log?
rear-brp-server.log

jsmeix commented at 2020-10-20 15:29:

@dcz01
thank you for your feedback that things work now (even if we don't know why).

You need to verity that this bootable USB stick actually boots
the ReaR recovery system on your replacement hardware,
cf. the section
"No disaster recovery without testing and continuous validation" in
https://en.opensuse.org/SDB:Disaster_Recovery


[Export of Github issue for rear/rear.]