#2687 Issue closed: The "rear mkrescue" command does not put all of the neccessary files in the ISO image.

Labels: support / question, fixed / solved / done

DamaniN opened issue at 2021-09-30 07:41:

Relax-and-Recover (ReaR) Issue Template

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 -V
Relax-and-Recover 2.6-git.4542.3cf7b8e7.master / 2021-09-28

  • OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):
cat /etc/redhat-release
Red Hat Enterprise Linux release 8.2 (Ootpa)

lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: RedHatEnterprise
Description:    Red Hat Enterprise Linux release 8.2 (Ootpa)
Release:    8.2
Codename:   Ootpa

cat /etc/rear/os.conf
OS_VENDOR=RedHatEnterpriseServer
OS_VERSION=8.2
  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
cat /etc/rear/local.conf /etc/rear/site.conf
OUTPUT=ISO
BACKUP=NETFS
BACKUP_URL=nfs://<redacted>/file_transfer/rear-backup
cat: /etc/rear/site.conf: No such file or directory
  • Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR):

vSphere Virtual Machine, HW Version 6.7

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

x86_64

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

Secure UEFI

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

Local disk

  • Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,SIZE,MOUNTPOINT"):
lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,SIZE,MOUNTPOINT
NAME                      KNAME     PKNAME    TRAN   TYPE FSTYPE        SIZE MOUNTPOINT
/dev/sda                  /dev/sda                   disk               100G
|-/dev/sda1               /dev/sda1 /dev/sda         part vfat          600M /boot/efi
|-/dev/sda2               /dev/sda2 /dev/sda         part xfs             1G /boot
`-/dev/sda3               /dev/sda3 /dev/sda         part LVM2_member  98.4G
  |-/dev/mapper/rhel-root /dev/dm-0 /dev/sda3        lvm  xfs            50G /
  |-/dev/mapper/rhel-swap /dev/dm-1 /dev/sda3        lvm  swap          2.1G [SWAP]
  `-/dev/mapper/rhel-home /dev/dm-2 /dev/sda3        lvm  xfs          46.4G /home
/dev/sr0                  /dev/sr0            sata   rom  udf         814.7M
  • Description of the issue (ideally so that others can reproduce it):

When rear -vdD mkrescue is run it does not put all of the required files for boot in the ISO image. Directories like /usr, /var and /etc are missing. If I mount the iso file I see the following:

ree /cdrom
/cdrom
├── boot
│   ├── efiboot.img
│   └── grub
│       └── grub.cfg
├── EFI
│   └── BOOT
│       ├── BOOTX64.efi
│       ├── fonts
│       ├── grub.cfg
│       └── locale
└── isolinux
    ├── boot.cat
    ├── chain.c32
    ├── hdt.c32
    ├── initrd.cgz
    ├── isolinux.bin
    ├── isolinux.cfg
    ├── kernel
    ├── ldlinux.c32
    ├── libcom32.c32
    ├── libgpl.c32
    ├── libmenu.c32
    ├── libutil.c32
    ├── menu.c32
    ├── message
    ├── pci.ids
    ├── poweroff.c32
    ├── rear.help
    ├── reboot.c32
    └── vesamenu.c32
  • Workaround, if any:

none

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

Log from rear -vdD mkrescue

rear-dn-rhel-8-2-uefi-rear-1.log.netfs.mkbackup.log

DamaniN commented at 2021-09-30 07:53:

As an additional note, the temporary directory that ReaR creates does appear to have the correct files and directories.

tree -L 1 /var/tmp/rear.f6IF2hMJEcm8Ag9/rootfs/
/var/tmp/rear.f6IF2hMJEcm8Ag9/rootfs/
├── bin
├── boot
├── dev
├── etc
├── init -> bin/init
├── lib -> usr/lib
├── lib64 -> usr/lib64
├── md5sums.txt
├── mnt
├── proc
├── root
├── run
├── sbin -> bin
├── selinux
├── sys
├── tmp
├── usr
└── var

16 directories, 2 files

jsmeix commented at 2021-09-30 08:00:

The files of the ReaR recovery system
i.e. the contents of /var/tmp/rear.XXX/rootfs/
are inside the initrd.cgz

Inspect what is in your isolinux/initrd.cgz
If the contents of your /var/tmp/rear.XXX/rootfs/
are not inside your initrd.cgz then there is something wrong.

DamaniN commented at 2021-09-30 18:38:

I'm not familiar with cgz files. How can I inspect the contents?

jsmeix commented at 2021-10-01 13:04:

Assume you have the ISO image as file rear-localhost.iso then

# mount -o loop rear-localhost.iso /mnt

# file /mnt/isolinux/initrd.cgz
/mnt/isolinux/initrd.cgz: gzip compressed data

# mkdir /tmp/rear.initrd

# cd /tmp/rear.initrd

# zcat /mnt/isolinux/initrd.cgz | cpio -idmv
...

# umount /mnt

# ls
bin  boot  dev  etc  init  lib  lib64  md5sums.txt  mnt  proc  root  run  sbin  selinux  sys  tmp  usr  var

For the zcat /mnt/isolinux/initrd.cgz command it is a requirement
that initrd.cgz is "gzip compressed data".

DamaniN commented at 2021-10-01 22:19:

Thanks for the steps. I reviewed the contents and everything seems to be there. My ISO won't boot though. I'll open a new Issue for that.


[Export of Github issue for rear/rear.]