#1773 Issue closed: rear format -- --efi /dev/sdb1 does not use /dev/sdb1 (but sdb2 which is not existing)

Labels: support / question, fixed / solved / done

Ronaldho80 opened issue at 2018-04-12 10:55:

Format EFI error

  • ReaR version ("/usr/sbin/rear -V"): Relax-and-Recover 2.3-git.2949.6d8a20ab.master / 2018-04-08
  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"): Ubuntu 17.10
  • ReaR configuration files ("cat /etc/rear/site.conf" or "cat /etc/rear/local.conf"):
$ cat /etc/rear/local.conf 
# Default is to create Relax-and-Recover rescue media as ISO image
# set OUTPUT to change that
# set BACKUP to activate an automated (backup and) restore of your data
# Possible configuration values can be found in /usr/share/rear/conf/default.conf
#
# This file (local.conf) is intended for manual configuration. For configuration
# through packages and other automated means we recommend creating a new
# file named site.conf next to this file and to leave the local.conf as it is. 
# Our packages will never ship with a site.conf.
#
### write the rescue initramfs to USB and update the USB bootloader
OUTPUT=USB

### create a backup using the internal NETFS method, using 'tar'
BACKUP=NETFS

### write both rescue image and backup to the device labeled REAR-000
BACKUP_URL=usb:///dev/disk/by-label/REAR-000
  • System architecture (x86 compatible or POWER and/or what kind of virtual machine): x64
  • Are you using BIOS or UEFI or another way to boot? Yes, EFI
  • Brief description of the issue:
    • I format with rear format /dev/sdb1 -> everything is ok.
    • I do rear mkrescue -v ->
$ sudo rear mkrescue -v 
Relax-and-Recover 2.3-git.2949.6d8a20ab.master / 2018-04-08
Using log file: /var/log/rear/rear-Elfriede.log
Using backup archive '/tmp/rear.TSw6Ui2cXAPjXGt/outputfs/rear/Elfriede/20180412.1244/backup.tar.gz'
Using UEFI Boot Loader for Linux (USING_UEFI_BOOTLOADER=1)
Creating disk layout
Using guessed bootloader 'EFI'
Creating root filesystem layout
Skipping 'anbox0': not bound to any physical interface.
Skipping 'virbr0': not bound to any physical interface.
To log into the recovery system via ssh set up /root/.ssh/authorized_keys or specify SSH_ROOT_PASSWORD
Trying to find what to use as UEFI bootloader...
Trying to find a 'well known file' to be used as UEFI bootloader...
Using '/boot/efi/EFI/ubuntu/grubx64.efi' as UEFI bootloader file
Copying logfile /var/log/rear/rear-Elfriede.log into initramfs as '/tmp/rear-Elfriede-partial-2018-04-12T12:44:44+02:00.log'
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Copying all files in /lib*/firmware/
Creating recovery/rescue system initramfs/initrd initrd.cgz with gzip default compression
Created initrd.cgz with gzip default compression (198545787 bytes) in 24 seconds
ERROR: /dev/disk/by-label/REAR-EFI is not block device. Use `rear format -- --efi <USB_device_file>' for correct format
Aborting due to an error, check /var/log/rear/rear-Elfriede.log for details
Exiting rear mkrescue (PID 13932) and its descendant processes
Running exit tasks
Terminated
  • I do: rear format -- --efi /dev/sdb1 and the following strange error appears:
$ sudo rear format -- --efi /dev/sdb1
ERROR: Could not label /dev/sdb2 with 'REAR-000'
Aborting due to an error, check /var/log/rear/rear-Elfriede.log for details
Terminated
  • the log has no additional information.
  • Work-around, if any: I have no work-around.

gozora commented at 2018-04-12 11:04:

Try sudo rear format -- --efi /dev/sdb

V.

jsmeix commented at 2018-04-12 11:16:

@Ronaldho80
FYI:
"rear format" does not only "format" a partition like /dev/sdb1
(i.e. create a filesystem on a partition) but
"rear format" prepares a whole disk device like /dev/sdb
by creating partitions and creating filesystems on it, cf.
the various USB_DEVICE_* config variables in default.conf

Ronaldho80 commented at 2018-04-12 12:31:

@gozora This did the trick. Thank you and also thanks to @jsmeix for the explanation.

gozora commented at 2018-04-12 14:57:

@Ronaldho80 I like the way how you've formatted this issue, both style and information you've put in it.
It was easy to read and understand, thanks for putting effort into it and saving our time!

V.

jcorriher22 commented at 2021-07-03 03:03:

Thank you @Ronaldho80 and @jsmeix! This information is still helping in 2021


[Export of Github issue for rear/rear.]