#1174 Issue closed: "rear recover" fails on RHEL 7.3 beta with xfs on / and on /boot with "grub2-install: error: unknown filesystem."

Labels: bug, fixed / solved / done

gdha opened issue at 2017-01-19 10:22:

  • rear version (/usr/sbin/rear -V): 1.17.2
  • OS version (cat /etc/rear/os.conf or lsb_release -a): RHEL 7.3beta
  • rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf):
    OUTPUT=ISO
    OUTPUT_URL=file:///backup
    BACKUP=NETFS
    BACKUP_URL=nfs://192.168.0.XX/backup
  • Are you using legacy BIOS of UEFI boot? BIOS
  • Brief description of the issue: during recovery it halts with:
RedHatEnterpriseServer/7 on Linux-i386 (based on Fedora/7/i386)
there is no code to install a boot loader on the recovered system or the code
that we have failed to install the boot loader correctly.

Please contribute this code to the Relax-and-Recover project. To do so
please take a look at the scripts in /usr/share/rear/finalize,
for an example you can use the script for Fedora (and RHEL/CentOS/SL) in
/usr/share/rear/finalize/Linux-i386/21_install_grub.sh or
/usr/share/rear/finalize/Linux-i386/22_install_grub2.sh

--------------------  ATTENTION ATTENTION ATTENTION -------------------
|                                                                     |
|          IF YOU DO NOT INSTALL A BOOT LOADER MANUALLY,              |
|                                                                     |
|          THEN YOUR SYSTEM WILL N O T BE ABLE TO BOOT !              |
|                                                                     |
-----------------------------------------------------------------------

part of the debug log where it fails:

++ bootdisk=/dev/sda
++ partnr=1
++ partnr=1
++ partnr=0
++ [[ /dev/sda == \/\d\e\v\/\s\d\a ]]
++ grub2-install --root-directory=/mnt/local/ /dev/sda
Installing for i386-pc platform.
grub2-install: warning: cannot open directory `/usr/share/locale': No such file or directory.
grub2-install: error: unknown filesystem.
++ ((  1 == 0  ))
++ [[ -n 1 ]]
++ chroot /mnt/local grub2-install /dev/sda
Installing for i386-pc platform.
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
grub2-install: error: unknown filesystem.
++ umount /mnt/local/proc

Initial RH BugZilla report is https://bugzilla.redhat.com/show_bug.cgi?id=1390855

  • Work-around, if any: none

jsmeix commented at 2017-01-20 13:25:

I hope

grub2-install: warning: cannot open directory `/usr/share/locale': No such file or directory.

is what it tells - only a warning but not an error,
cf. "Character encoding" in
https://github.com/rear/rear/wiki/Coding-Style
i.e. "grub2-install" must "just work" in POSIX/C locale.

Therefore I assume

grub2-install: error: unknown filesystem.

is the actual reason why it fails.

The initial RH BugZilla report attachment
https://bugzilla.redhat.com/attachment.cgi?id=1216361
contains

+++ echo -e 'Creating xfs-filesystem / on /dev/mapper/rhel-root'
+++ mkfs.xfs -f /dev/mapper/rhel-root
+++ xfs_admin -U b0746cb3-4a26-473a-b340-6b32d9819e67 /dev/mapper/rhel-root
Clearing log and setting UUID
writing all SBs
new UUID = b0746cb3-4a26-473a-b340-6b32d9819e67
+++ LogPrint 'Mounting filesystem /'
...
+++ echo -e 'Creating xfs-filesystem /boot on /dev/sda1'
+++ mkfs.xfs -f /dev/sda1
+++ xfs_admin -U b1340823-3773-4a76-a78a-acb645ecad21 /dev/sda1
Clearing log and setting UUID
writing all SBs
new UUID = b1340823-3773-4a76-a78a-acb645ecad21
+++ LogPrint 'Mounting filesystem /boot'
+++ Log 'Mounting filesystem /boot'

gozora commented at 2017-01-20 13:32:

@gdha @jsmeix,
Ain't this issue and https://github.com/rear/rear/issues/1065 same?

See https://github.com/rear/rear/issues/1065#issuecomment-259990803

jsmeix commented at 2017-01-23 09:34:

@gozora
yes, I think this one is the same as
https://github.com/rear/rear/issues/1065
and I wonder why
@gdha
uses "rear version (/usr/sbin/rear -V): 1.17.2"
and not the current GitHub master code
where this issue should be fixed.

gdha commented at 2017-01-23 12:58:

@jsmeix @gozora @phracek It could be that https://bugzilla.redhat.com/show_bug.cgi?id=1399487 (ReaR issue #1065) and https://bugzilla.redhat.com/show_bug.cgi?id=1390855 (ReaR issue #1174) are the same, but I think it is up to RHEL engineering to come to the same conclusion. I created this issue to have a direct link to the BugZilla entries of RedHat so we could back-trace (and vice versa), and it was logged against rear-1.17.2 (so that explains this older version number, but still the only RH supported version).
And, you are right that both issues were fixed in rear-2.00 that is now officially available in the main repo's of EPEL 5 and f234, f25 too. I do hope that RedHat considers to upgrade as well to version 2.00 (and they have a BugZilla for it https://bugzilla.redhat.com/show_bug.cgi?id=1355667).

jsmeix commented at 2017-01-23 13:41:

It is perfectly fine for me to have such issues here as reference.
But I think it should be marked as "fixed" for ReaR v2.00 here.
Nevertheless we can keep it open as long as needed.

gdha commented at 2017-02-24 10:10:

RH confirmed they will re-base ReaR with version 2.00

jsmeix commented at 2017-02-24 11:00:

To the Red Hat people who may listening here:
Note several (minor) behavioural changes and
one possibly major change that may cause
real regressions for some users in ReaR 2.0 in
https://github.com/rear/rear/issues/1073


[Export of Github issue for rear/rear.]