rockstor / rockstor-installer

The kiwi-ng configuration used to create Rockstor 4 'Built on openSUSE' installers.
GNU General Public License v3.0
35 stars 15 forks source link

Installed system does not boot on EFI only systems #82

Open HTPC-Schrauber opened 2 years ago

HTPC-Schrauber commented 2 years ago

I tried to install the build image on a system, which is set to EFI. So CSM is disabled on this system.

The USB strick bootet without any problem. Installation went fine. But after reboot the installed system does not boot. The UEFI firmware does not even find any bootable disk.

So I think there is a problem with the grub installation on this system.

phillxnet commented 2 years ago

@HTPC-Schrauber Thanks for the report. Re:

The USB strick bootet without any problem. Installation went fine.

Was the USB key booted in EFI mode?

Our installer basically senses to install in EFI or otherwise depending on how it was booted. Many systems will a non EFI boot of USB and then 'flag' our installer to install a non EFI install.

Definitely worth a try as I've seen this behaviour myself.

HTPC-Schrauber commented 2 years ago

As I said, the System has CSM disabled. So it can only boot in EFI mode. So it must be booted from USB in EFI mode. Or am I wrong?

phillxnet commented 2 years ago

@HTPC-Schrauber I'm assuming here you are referencing our v4 "Built on openSUSE" DIY installer:

https://github.com/rockstor/rockstor-installer

Our old 2017 CentOS based installer from SourceForge is now pretty dated and we last release an update for that around a year and a half ago.

phillxnet commented 2 years ago

Or am I wrong?

Not necessarily but possibly. Some systems still allow for external/usb boot by older methods. You could check.

See my last comment for a question about the installer as our old one was known to be a bit duff on EFI !!

HTPC-Schrauber commented 2 years ago

I am on V4 DIY installer.

OK, I will check if I bootet in EFI mode for sure.

phillxnet commented 2 years ago

I am on V4 DIY installer.

OK, that's good then. Linking to an issue for our legacy CentOS based installer in case folks come across this thread for a v3 installer: https://github.com/rockstor/rockstor-iso/issues/19

Yes, some bios firmware allows for you to pick the boot mode for 'external' media of which a USB key is often singled out dur to it's common place use in os installs. On a system I remember seeing this anomaly on I had two choices with which to boot the installer. Choosing the wrong one caused a boot error about not being able to find a efi file of some sort. In your case this may be different due to boot differences. Also some systems are pretty picky with regard to add in sata cards/adapters etc. Definitely worth playing around a tad. But yes the installer, build by kiwi-ng is dual capable but we may have had a recent bug of sorts of course.

HTPC-Schrauber commented 2 years ago

OK, this was strange.

I checked and the system booted from USB in EFI mode. After the install was finished (but before rebooting) I checked the partitions and all looked fine. The EFI parition was there. What I was wondering, it has only 64 MiB. Mostly it is created with at least 100 MiB. Also the EFI partition was mounted on /boot/efi.

Then I tried to run: grub2-install --target=x86_64-efi --efi-directory=/boot/efi /dev/sda

This worked without an error. And after this the system was bootable in EFI mode without CSM.

Thanks for your support.

phillxnet commented 2 years ago

@HTPC-Schrauber Hello again, and glad you've found a work around but this should not be necessary and definitely represents a bug or anomaly in the installer build. Do you still have the kiwi-ng log from when you build the installer?

Re:

What I was wondering, it has only 64 MiB. Mostly it is created with at least 100 MiB.

this size is intentional and should be just fine. We are not accomodating any other OS's here and our upstream of kiwi-ng did have an issue with this partition being too small but that was resolved when they moved from 15 MB to 20 MB here:

https://github.com/OSInside/kiwi/pull/1886/commits/e9935d01ee5626fadd791b4aa27126b3f022a003

And we specify 64MB across all our profiles to be safe and consistent.

I'm going to re-open this issue as although you found a work around for the failure this failure may still be caused by a bug somewhere along the line.

phillxnet commented 2 years ago

@HTPC-Schrauber If you still have your kiwi-ng build log then we can more easily/usefully submit this to upstream as a new issue as our own config has not changed in this regard for a long time. So it may be relevant / observable by them.

I'm unfortunately unable to re-produce myself as I'm in the process of moving and have non of my prior test hardware available so have no UEFI/EFI hardware to test install/reboot an install on.

I've had a look over their recent issues and pull requests in kiwi-ng and although they have made some changes in this area (grub), they are a super active project, there is nothing that looks just like your own report. But it may be a new thing that they have yet to have reported.

https://github.com/OSInside/kiwi

Let us know if you still have the kiwi-ng build log or if you are able to reproduce this again with a fresh build, grabbing it's log, as then we can report upstream with some more information that may help them work our what may have caused this.

Also having this issue open should help with other users of our own finding and filling in more info.

Thanks again for the report and hopefully we can get to why this happened as it certainly is not intended that you have to re-install grub by-hand at the end of the install.

The log you are looking for would be called image-root.log and is likely located, for our DIY build instructions: here:

/home/kiwi-images/build

From example my last build I have the following grub mentions lines:

INFO: 15:47:27 | --> package: grub2
INFO: 15:47:27 | --> package: grub2-branding-upstream
INFO: 15:47:27 | --> package: grub2-i386-pc
INFO: 15:47:27 | --> package: grub2-snapper-plugin
INFO: 15:47:27 | --> package: grub2-x86_64-efi
...
DEBUG: 15:49:57 | system: Retrieving package grub2-2.04-22.3.1.x86_64 (227/405),   3.0 MiB ( 24.3 MiB unpacked)
DEBUG: 15:49:59 | system: Retrieving: grub2-2.04-22.3.1.x86_64.rpm [..done (1.7 MiB/s)]
...
DEBUG: 15:50:28 | system: Retrieving package grub2-i386-pc-2.04-22.3.1.noarch (247/405), 816.4 KiB (  2.2 MiB unpacked)
DEBUG: 15:50:29 | system: Retrieving: grub2-i386-pc-2.04-22.3.1.noarch.rpm [.done (439.2 KiB/s)]
...
DEBUG: 15:51:37 | system: Retrieving package grub2-x86_64-efi-2.04-22.3.1.noarch (269/405), 994.0 KiB (  6.2 MiB unpacked)
DEBUG: 15:51:38 | system: Retrieving: grub2-x86_64-efi-2.04-22.3.1.noarch.rpm [.done (1.5 MiB/s)]
DEBUG: 15:51:38 | system: Retrieving package grub2-snapper-plugin-2.04-22.3.1.noarch (270/405),  66.5 KiB (  8.4 KiB unpacked)
DEBUG: 15:51:38 | system: Retrieving: grub2-snapper-plugin-2.04-22.3.1.noarch.rpm [done]
DEBUG: 15:51:38 | system: Retrieving package grub2-branding-upstream-2.04-22.3.1.x86_64 (271/405),   2.1 MiB (  2.7 MiB unpacked)
DEBUG: 15:51:40 | system: Retrieving: grub2-branding-upstream-2.04-22.3.1.x86_64.rpm [..done (1.4 MiB/s)]
...
DEBUG: 15:54:32 | system: (227/405) Installing: grub2-2.04-22.3.1.x86_64 [............done]
DEBUG: 15:54:32 | system: Additional rpm output:
DEBUG: 15:54:32 | system: warning: /var/cache/kiwi/packages/repo-sle-update/x86_64/grub2-2.04-22.3.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 39db7c82: NOKEY
...
DEBUG: 15:54:38 | system: (247/405) Installing: grub2-i386-pc-2.04-22.3.1.noarch [............done]
DEBUG: 15:54:38 | system: Additional rpm output:
DEBUG: 15:54:38 | system: warning: /var/cache/kiwi/packages/repo-sle-update/noarch/grub2-i386-pc-2.04-22.3.1.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 39db7c82: NOKEY
...
DEBUG: 15:54:48 | system: You may need to setup and install the boot loader using the
DEBUG: 15:54:48 | system: available bootloader for your platform (e.g. grub, lilo, zipl, ...).
...
DEBUG: 15:54:49 | system: (269/405) Installing: grub2-x86_64-efi-2.04-22.3.1.noarch [............done]
DEBUG: 15:54:49 | system: Additional rpm output:
DEBUG: 15:54:49 | system: warning: /var/cache/kiwi/packages/repo-sle-update/noarch/grub2-x86_64-efi-2.04-22.3.1.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 39db7c82: NOKEY
DEBUG: 15:54:49 | system: (270/405) Installing: grub2-snapper-plugin-2.04-22.3.1.noarch [.....done]
DEBUG: 15:54:49 | system: Additional rpm output:
DEBUG: 15:54:49 | system: warning: /var/cache/kiwi/packages/repo-sle-update/noarch/grub2-snapper-plugin-2.04-22.3.1.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 39db7c82: NOKEY
DEBUG: 15:54:49 | system: (271/405) Installing: grub2-branding-upstream-2.04-22.3.1.x86_64 [............done]
DEBUG: 15:54:49 | system: Additional rpm output:
DEBUG: 15:54:49 | system: warning: /var/cache/kiwi/packages/repo-sle-update/x86_64/grub2-branding-upstream-2.04-22.3.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 39db7c82: NOKEY
...
DEBUG: 15:55:12 | --> kiwi_Volume_6='boot_grub2_i386-pc|freespace:30|boot/grub2/i386-pc'
DEBUG: 15:55:12 | --> kiwi_Volume_7='boot/grub2/x86_64-efi|freespace:30|boot/grub2/x86_64-efi'
DEBUG: 15:55:12 | --> kiwi_Volume_8='usr_local|freespace:30|usr/local'
DEBUG: 15:55:12 | --> kiwi_Volume_9='var|freespace:30|var'
DEBUG: 15:55:12 | --> kiwi_align='1048576'
DEBUG: 15:55:12 | --> kiwi_boot_timeout=''
DEBUG: 15:55:12 | --> kiwi_bootkernel=''
DEBUG: 15:55:12 | --> kiwi_bootloader='grub2'
DEBUG: 15:55:12 | --> kiwi_bootloader_console=''
...
Created symlink /etc/systemd/system/multi-user.target.wants/grub_config.service -> /usr/lib/systemd/system/grub_config.service.
...
INFO: 15:57:28 | Creating btrfs sub volumes
DEBUG: 15:57:28 | EXEC: [mkdir -p /home/kiwi-images/build/image-root/boot/grub2/i386-pc]
DEBUG: 15:57:28 | EXEC: [mkdir -p /home/kiwi-images/build/image-root/boot/grub2/x86_64-efi]
INFO: 15:57:28 | --> sub volume home
...
INFO: 15:57:28 | --> sub volume boot/grub2/i386-pc
DEBUG: 15:57:28 | EXEC: [mkdir -p /tmp/kiwi_volumes.hlcqx9po/@/boot/grub2]
DEBUG: 15:57:28 | EXEC: [btrfs subvolume create /tmp/kiwi_volumes.hlcqx9po/@/boot/grub2/i386-pc]
INFO: 15:57:28 | --> sub volume boot/grub2/x86_64-efi
DEBUG: 15:57:28 | EXEC: [btrfs subvolume create /tmp/kiwi_volumes.hlcqx9po/@/boot/grub2/x86_64-efi]
...
DEBUG: 15:57:28 | EXEC: [mkdir -p /tmp/kiwi_volumes.hlcqx9po/@/.snapshots/1/snapshot/boot/grub2/i386-pc]
DEBUG: 15:57:28 | EXEC: [mountpoint -q /tmp/kiwi_volumes.hlcqx9po/@/.snapshots/1/snapshot/boot/grub2/i386-pc]
DEBUG: 15:57:28 | EXEC: [mount -o subvol=@/boot/grub2/i386-pc,noatime /dev/mapper/loop0p4 /tmp/kiwi_volumes.hlcqx9po/@/.snapshots/1/snapshot/boot/grub2/i386-pc]
DEBUG: 15:57:28 | EXEC: [mkdir -p /tmp/kiwi_volumes.hlcqx9po/@/.snapshots/1/snapshot/boot/grub2/x86_64-efi]
DEBUG: 15:57:28 | EXEC: [mountpoint -q /tmp/kiwi_volumes.hlcqx9po/@/.snapshots/1/snapshot/boot/grub2/x86_64-efi]
DEBUG: 15:57:28 | EXEC: [mount -o subvol=@/boot/grub2/x86_64-efi,noatime /dev/mapper/loop0p4 /tmp/kiwi_volumes.hlcqx9po/@/.snapshots/1/snapshot/boot/grub2/x86_64-efi]
...
DEBUG: 15:57:28 | --> kiwi_Volume_6='boot_grub2_i386-pc|freespace:30|boot/grub2/i386-pc'
DEBUG: 15:57:28 | --> kiwi_Volume_7='boot/grub2/x86_64-efi|freespace:30|boot/grub2/x86_64-efi'
DEBUG: 15:57:28 | --> kiwi_Volume_8='usr_local|freespace:30|usr/local'
DEBUG: 15:57:28 | --> kiwi_Volume_9='var|freespace:30|var'
DEBUG: 15:57:28 | --> kiwi_align='1048576'
DEBUG: 15:57:28 | --> kiwi_boot_timeout=''
DEBUG: 15:57:28 | --> kiwi_bootkernel=''
DEBUG: 15:57:28 | --> kiwi_bootloader='grub2'
...
INFO: 15:58:10 | Creating grub2 bootloader configuration
DEBUG: 15:58:10 | EXEC: [blkid /dev/mapper/loop0p4 -s UUID -o value]
DEBUG: 15:58:10 | EXEC: [blkid /dev/mapper/loop0p4 -s UUID -o value]
INFO: 15:58:10 | Creating grub2 bootloader images
DEBUG: 15:58:10 | EXEC: [mkdir -p /home/kiwi-images/build/image-root/boot/efi/EFI/BOOT]
DEBUG: 15:58:10 | EXEC: [mkdir -p /home/kiwi-images/build/image-root/boot/grub2/fonts]
DEBUG: 15:58:10 | EXEC: [cp /home/kiwi-images/build/image-root/usr/share/grub2/unicode.pf2 /home/kiwi-images/build/image-root/boot/grub2/fonts]
DEBUG: 15:58:10 | EXEC: [mkdir -p /home/kiwi-images/build/image-root/boot/grub2/themes]
WARNING: 15:58:10 | Theme /home/kiwi-images/build/image-root/boot/grub2/themes/upstream not found
WARNING: 15:58:10 | Set bootloader terminal to console mode
DEBUG: 15:58:10 | EXEC: [rsync -a --exclude /*.module /home/kiwi-images/build/image-root/usr/share/grub2/i386-pc/ /home/kiwi-images/build/image-root/boot/grub2/i386-pc]
INFO: 15:58:10 | --> Using prebuilt unsigned efi image
DEBUG: 15:58:10 | EXEC: [cp /home/kiwi-images/build/image-root/usr/share/grub2/x86_64-efi/grub.efi /home/kiwi-images/build/image-root/boot/efi/EFI/BOOT/bootx64.efi]
DEBUG: 15:58:10 | EXEC: [rsync -a --exclude /*.module /home/kiwi-images/build/image-root/usr/share/grub2/x86_64-efi/ /home/kiwi-images/build/image-root/boot/grub2/x86_64-efi]
DEBUG: 15:58:10 | EXEC: [grep -q GRUB_USE_LINUXEFI /home/kiwi-images/build/image-root/usr/sbin/grub2-mkconfig]
DEBUG: 15:58:10 | EXEC: [grep -q GRUB_ENABLE_BLSCFG /home/kiwi-images/build/image-root/usr/sbin/grub2-mkconfig]
INFO: 15:58:10 | Writing grub2 defaults file
INFO: 15:58:10 | --> GRUB_CMDLINE_LINUX_DEFAULT:"plymouth.enable=0 rd.kiwi.oem.maxdisk=5000G"
INFO: 15:58:10 | --> GRUB_GFXMODE:auto
INFO: 15:58:10 | --> GRUB_TERMINAL:"console"
INFO: 15:58:10 | --> GRUB_THEME:/boot/grub2/themes/upstream/theme.txt
INFO: 15:58:10 | --> GRUB_TIMEOUT:10
INFO: 15:58:10 | --> GRUB_USE_INITRDEFI:true
INFO: 15:58:10 | --> GRUB_USE_LINUXEFI:true
INFO: 15:58:10 | --> SUSE_BTRFS_SNAPSHOT_BOOTING:true
INFO: 15:58:10 | Writing sysconfig bootloader file
INFO: 15:58:10 | --> DEFAULT_APPEND:"plymouth.enable=0 rd.kiwi.oem.maxdisk=5000G root=UUID=90ae303d-95b4-4884-b3b5-b9e707228bac rw "
INFO: 15:58:10 | --> FAILSAFE_APPEND:"plymouth.enable=0 rd.kiwi.oem.maxdisk=5000G root=UUID=90ae303d-95b4-4884-b3b5-b9e707228bac rw  ide=nodma apm=off noresume edd=off nomodeset 3 "
INFO: 15:58:10 | --> LOADER_LOCATION:none
INFO: 15:58:10 | --> LOADER_TYPE:grub2-efi
...
DEBUG: 15:58:19 | EXEC: [mountpoint -q /tmp/kiwi_volumes.hlcqx9po/@/.snapshots/1/snapshot/boot/grub2/x86_64-efi]
DEBUG: 15:58:19 | EXEC: [mountpoint -q /tmp/kiwi_volumes.hlcqx9po/@/.snapshots/1/snapshot/boot/grub2/x86_64-efi]
DEBUG: 15:58:19 | EXEC: [umount /tmp/kiwi_volumes.hlcqx9po/@/.snapshots/1/snapshot/boot/grub2/x86_64-efi]
DEBUG: 15:58:19 | EXEC: [mountpoint -q /tmp/kiwi_volumes.hlcqx9po/@/.snapshots/1/snapshot/boot/grub2/i386-pc]
DEBUG: 15:58:19 | EXEC: [mountpoint -q /tmp/kiwi_volumes.hlcqx9po/@/.snapshots/1/snapshot/boot/grub2/i386-pc]
DEBUG: 15:58:19 | EXEC: [umount /tmp/kiwi_volumes.hlcqx9po/@/.snapshots/1/snapshot/boot/grub2/i386-pc]
...
DEBUG: 15:58:20 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.zwgmjuh7//boot/grub2/i386-pc]
DEBUG: 15:58:20 | EXEC: [mount -o subvol=@/boot/grub2/i386-pc,noatime /dev/mapper/loop0p4 /tmp/kiwi_mount_manager.zwgmjuh7//boot/grub2/i386-pc]
DEBUG: 15:58:21 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.zwgmjuh7//boot/grub2/x86_64-efi]
DEBUG: 15:58:21 | EXEC: [mount -o subvol=@/boot/grub2/x86_64-efi,noatime /dev/mapper/loop0p4 /tmp/kiwi_mount_manager.zwgmjuh7//boot/grub2/x86_64-efi]
DEBUG: 15:58:21 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.zwgmjuh7/dev]
DEBUG: 15:58:21 | EXEC: [mount -n --bind /dev /tmp/kiwi_mount_manager.zwgmjuh7/dev]
DEBUG: 15:58:21 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.zwgmjuh7/proc]
DEBUG: 15:58:21 | EXEC: [mount -n --bind /proc /tmp/kiwi_mount_manager.zwgmjuh7/proc]
DEBUG: 15:58:21 | EXEC: [chroot /tmp/kiwi_mount_manager.zwgmjuh7 grub2-mkconfig -o /boot/grub2/grub.cfg]
INFO: 15:58:21 | Copying /home/kiwi-images/build/image-root/boot/efi/EFI/BOOT/grub.cfg -> /tmp/kiwi_mount_manager.zwgmjuh7/boot/efi/EFI/BOOT/grub.cfg to be found by EFI
INFO: 15:58:21 | Cleaning up BootLoaderConfigGrub2 instance
DEBUG: 15:58:21 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.zwgmjuh7//boot/grub2/x86_64-efi]
DEBUG: 15:58:21 | EXEC: [umount /tmp/kiwi_mount_manager.zwgmjuh7//boot/grub2/x86_64-efi]
DEBUG: 15:58:21 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.zwgmjuh7//boot/grub2/i386-pc]
DEBUG: 15:58:21 | EXEC: [umount /tmp/kiwi_mount_manager.zwgmjuh7//boot/grub2/i386-pc]
...
DEBUG: 15:58:21 | custom arguments for bootloader installation {'boot_device': '/dev/mapper/loop0p4', 'root_device': '/dev/mapper/loop0p4', 'firmware': <kiwi.firmware.FirmWare object at 0x7fdaa4de0f60>, 'target_removable': None, 'efi_device': '/dev/mapper/loop0p2', 'system_volumes': {'/.snapshots': {'volume_options': 'subvol=@/.snapshots,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/home': {'volume_options': 'subvol=@/home,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/opt': {'volume_options': 'subvol=@/opt,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/root': {'volume_options': 'subvol=@/root,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/srv': {'volume_options': 'subvol=@/srv,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/tmp': {'volume_options': 'subvol=@/tmp,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/var': {'volume_options': 'subvol=@/var,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/usr/local': {'volume_options': 'subvol=@/usr/local,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/boot/grub2/i386-pc': {'volume_options': 'subvol=@/boot/grub2/i386-pc,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/boot/grub2/x86_64-efi': {'volume_options': 'subvol=@/boot/grub2/x86_64-efi,noatime', 'volume_device': '/dev/mapper/loop0p4'}}}
INFO: 15:58:21 | Installing grub2 on disk /dev/loop0
...
DEBUG: 15:58:21 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.wo5wxosj//boot/grub2/i386-pc]
DEBUG: 15:58:21 | EXEC: [mount -o subvol=@/boot/grub2/i386-pc,noatime /dev/mapper/loop0p4 /tmp/kiwi_mount_manager.wo5wxosj//boot/grub2/i386-pc]
DEBUG: 15:58:21 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.wo5wxosj//boot/grub2/x86_64-efi]
DEBUG: 15:58:21 | EXEC: [mount -o subvol=@/boot/grub2/x86_64-efi,noatime /dev/mapper/loop0p4 /tmp/kiwi_mount_manager.wo5wxosj//boot/grub2/x86_64-efi]
DEBUG: 15:58:21 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.wo5wxosj/dev]
DEBUG: 15:58:21 | EXEC: [mount -n --bind /dev /tmp/kiwi_mount_manager.wo5wxosj/dev]
DEBUG: 15:58:21 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.wo5wxosj/proc]
DEBUG: 15:58:22 | EXEC: [mount -n --bind /proc /tmp/kiwi_mount_manager.wo5wxosj/proc]
DEBUG: 15:58:22 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.wo5wxosj/sys]
DEBUG: 15:58:22 | EXEC: [mount -n --bind /sys /tmp/kiwi_mount_manager.wo5wxosj/sys]
DEBUG: 15:58:22 | EXEC: [rm -r -f /tmp/kiwi_mount_manager.wo5wxosj/boot/grub2/grubenv]
DEBUG: 15:58:22 | EXEC: [chroot /tmp/kiwi_mount_manager.wo5wxosj grub2-install --skip-fs-probe --directory /usr/share/grub2/i386-pc --boot-directory /boot --target i386-pc --modules ext2 iso9660 linux echo configfile search_label search_fs_file search search_fs_uuid ls normal gzio png fat gettext font minicmd gfxterm gfxmenu all_video xfs btrfs lvm luks gcry_rijndael gcry_sha256 gcry_sha512 crypto cryptodisk test true loadenv multiboot part_gpt part_msdos biosdisk vga vbe chain boot /dev/loop0]
INFO: 15:58:28 | Cleaning up BootLoaderInstallGrub2 instance
DEBUG: 15:58:28 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.wo5wxosj//boot/grub2/x86_64-efi]
DEBUG: 15:58:28 | EXEC: [umount /tmp/kiwi_mount_manager.wo5wxosj//boot/grub2/x86_64-efi]
DEBUG: 15:58:28 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.wo5wxosj//boot/grub2/i386-pc]
DEBUG: 15:58:28 | EXEC: [umount /tmp/kiwi_mount_manager.wo5wxosj//boot/grub2/i386-pc]
...
DEBUG: 15:58:40 | EXEC: [mountpoint -q /tmp/kiwi_volumes.hlcqx9po/@/.snapshots/1/snapshot/boot/grub2/x86_64-efi]
DEBUG: 15:58:40 | EXEC: [mountpoint -q /tmp/kiwi_volumes.hlcqx9po/@/.snapshots/1/snapshot/boot/grub2/i386-pc]
...
INFO: 16:07:21 | Creating grub2 bootloader images
DEBUG: 16:07:21 | EXEC: [mkdir -p /home/kiwi-images/kiwi_install_media.2ws06wrn/EFI/BOOT]
INFO: 16:07:21 | --> Creating identifier file 0x01d1d61b
DEBUG: 16:07:21 | EXEC: [mkdir -p /home/kiwi-images/kiwi_install_media.2ws06wrn/boot/grub2]
DEBUG: 16:07:21 | EXEC: [mkdir -p /home/kiwi-images/kiwi_install_media.2ws06wrn/boot/x86_64/loader/grub2/fonts]
DEBUG: 16:07:21 | EXEC: [cp /home/kiwi-images/build/image-root/usr/share/grub2/unicode.pf2 /home/kiwi-images/kiwi_install_media.2ws06wrn/boot/x86_64/loader/grub2/fonts]
DEBUG: 16:07:21 | EXEC: [mkdir -p /home/kiwi-images/kiwi_install_media.2ws06wrn/boot/grub2/themes]
WARNING: 16:07:21 | Theme /home/kiwi-images/kiwi_install_media.2ws06wrn/boot/grub2/themes/upstream not found
WARNING: 16:07:21 | Set bootloader terminal to console mode
DEBUG: 16:07:21 | EXEC: [rsync -a --exclude /*.module /home/kiwi-images/build/image-root/usr/share/grub2/i386-pc/ /home/kiwi-images/kiwi_install_media.2ws06wrn/boot/grub2/i386-pc]
INFO: 16:07:21 | --> Creating bios image
DEBUG: 16:07:21 | EXEC: [grub2-mkimage -O i386-pc -o /home/kiwi-images/build/image-root/usr/share/grub2/i386-pc/core.img -c /home/kiwi-images/kiwi_install_media.2ws06wrn/boot/grub2/earlyboot.cfg -p /boot/grub2 -d /home/kiwi-images/build/image-root/usr/share/grub2/i386-pc ext2 iso9660 linux echo configfile search_label search_fs_file search search_fs_uuid ls normal gzio png fat gettext font minicmd gfxterm gfxmenu all_video xfs btrfs lvm luks gcry_rijndael gcry_sha256 gcry_sha512 crypto cryptodisk test true loadenv part_gpt part_msdos biosdisk vga vbe chain boot]
DEBUG: 16:07:21 | EXEC: [bash -c cat /home/kiwi-images/build/image-root/usr/share/grub2/i386-pc/cdboot.img /home/kiwi-images/build/image-root/usr/share/grub2/i386-pc/core.img > /home/kiwi-images/build/image-root/usr/share/grub2/i386-pc/eltorito.img]
DEBUG: 16:07:21 | EXEC: [rsync -a /home/kiwi-images/build/image-root/boot/efi/ /home/kiwi-images/kiwi_install_media.2ws06wrn]
INFO: 16:07:21 | --> Using prebuilt unsigned efi image
DEBUG: 16:07:21 | EXEC: [cp /home/kiwi-images/build/image-root/usr/share/grub2/x86_64-efi/grub.efi /home/kiwi-images/kiwi_install_media.2ws06wrn/EFI/BOOT/bootx64.efi]
DEBUG: 16:07:21 | EXEC: [rsync -a --exclude /*.module /home/kiwi-images/build/image-root/usr/share/grub2/x86_64-efi/ /home/kiwi-images/kiwi_install_media.2ws06wrn/boot/grub2/x86_64-efi]
DEBUG: 16:07:22 | EXEC: [mkdir -p /home/kiwi-images/build/image-root/image/loader/]
DEBUG: 16:07:22 | Copying loader files to /home/kiwi-images/build/image-root/image/loader/
DEBUG: 16:07:22 | --> Copying /home/kiwi-images/build/image-root/usr/share/grub2/i386-pc/eltorito.img
DEBUG: 16:07:22 | --> Copying /home/kiwi-images/build/image-root/usr/share/grub2/i386-pc/boot_hybrid.img
...
DEBUG: 16:07:22 | EXEC: [grep -q GRUB_USE_LINUXEFI /home/kiwi-images/build/image-root/usr/sbin/grub2-mkconfig]
DEBUG: 16:07:22 | EXEC: [grep -q GRUB_ENABLE_BLSCFG /home/kiwi-images/build/image-root/usr/sbin/grub2-mkconfig]
INFO: 16:07:22 | Writing grub2 defaults file
INFO: 16:07:22 | --> GRUB_CMDLINE_LINUX_DEFAULT:"plymouth.enable=0 rd.kiwi.oem.maxdisk=5000G"
INFO: 16:07:22 | --> GRUB_GFXMODE:auto
INFO: 16:07:22 | --> GRUB_TERMINAL:"console"
INFO: 16:07:22 | --> GRUB_THEME:/boot/grub2/themes/upstream/theme.txt
INFO: 16:07:22 | --> GRUB_TIMEOUT:10
INFO: 16:07:22 | --> GRUB_USE_INITRDEFI:true
INFO: 16:07:22 | --> GRUB_USE_LINUXEFI:true
INFO: 16:07:22 | --> SUSE_BTRFS_SNAPSHOT_BOOTING:true
INFO: 16:07:22 | Writing sysconfig bootloader file
INFO: 16:07:22 | --> DEFAULT_APPEND:"plymouth.enable=0 rd.kiwi.oem.maxdisk=5000G "
INFO: 16:07:22 | --> FAILSAFE_APPEND:"plymouth.enable=0 rd.kiwi.oem.maxdisk=5000G  ide=nodma apm=off noresume edd=off nomodeset 3 "
INFO: 16:07:22 | --> LOADER_LOCATION:none
INFO: 16:07:22 | --> LOADER_TYPE:grub2-efi
INFO: 16:07:22 | Creating grub2 install config file from template
INFO: 16:07:22 | --> Using standard boot install template
INFO: 16:07:22 | Writing KIWI template grub.cfg file
...
DEBUG: 16:07:22 | --> kiwi_Volume_6='boot_grub2_i386-pc|freespace:30|boot/grub2/i386-pc'
DEBUG: 16:07:22 | --> kiwi_Volume_7='boot/grub2/x86_64-efi|freespace:30|boot/grub2/x86_64-efi'
DEBUG: 16:07:22 | --> kiwi_Volume_8='usr_local|freespace:30|usr/local'
DEBUG: 16:07:22 | --> kiwi_Volume_9='var|freespace:30|var'
DEBUG: 16:07:22 | --> kiwi_align='1048576'
DEBUG: 16:07:22 | --> kiwi_boot_timeout=''
DEBUG: 16:07:22 | --> kiwi_bootkernel=''
DEBUG: 16:07:22 | --> kiwi_bootloader='grub2'
...
DEBUG: 16:08:04 | EXEC: [/usr/bin/xorriso -application_id 0x01d1d61b -volid INSTALL -joliet on -padding 0 -outdev /home/kiwi-images/Rockstor-Leap15.3-generic.x86_64-4.0.9-0.install.iso -map /home/kiwi-images/kiwi_install_media.2ws06wrn / -chmod 0755 / -- -boot_image grub bin_path=boot/x86_64/loader/eltorito.img -boot_image grub grub2_mbr=/home/kiwi-images/kiwi_install_media.2ws06wrn/boot/x86_64//loader/boot_hybrid.img -boot_image grub grub2_boot_info=on -boot_image any partition_offset=16 -boot_image any cat_path=boot/x86_64/boot.catalog -boot_image any cat_hidden=on -boot_image any boot_info_table=on -boot_image any platform_id=0x00 -boot_image any emul_type=no_emulation -boot_image any load_size=2048 -append_partition 2 0xef /home/kiwi-images/kiwi_install_media.2ws06wrn/boot/x86_64/efi -boot_image any next -boot_image any efi_path=--interval:appended_partition_2:all:: -boot_image any platform_id=0xef -boot_image any emul_type=no_emulation]
INFO: 16:08:07 | Cleaning up FileSystemSquashFs instance
INFO: 16:08:07 | Cleaning up BootLoaderConfigGrub2 instance

As you can be seen there are a lot of entries. I'm noting mine down here for reference but I think I'm due to update my kiwi-ng as it goes. But I'm not able to do this until we are past our beta testing of the images I've created with this version. Which to date have not had this reported issue.

So in short if your can attache a build log of a failing installer then that would be fantastic as we can them more legitimately bother the good folks at kiwi-ng with something for them to look over as our expertise basically ends with kiwi-ng config file in this repo and our testing of the resulting images. Our Readme in this repo encourages the use of the latest version but I have to take care with my own version use reliant on the timing of our pending Stable release and it's associated installers which are currently being closed beta tested by folks on the forum. Once we have known good installers our I and then update and further investigate myself assuming I have test hardware available again soon.

HTPC-Schrauber commented 2 years ago

I will look into this futher. I do not have the log. But I will recreate an ISO, check if that shows the same behaviour. Hopefully I will be able to reproduce this and then can grab the log.

HTPC-Schrauber commented 2 years ago

Hi, I have updated my OpenSuse 15.3 and build the installer again. The result was the same. After installation a not bootable system. Attached you find the log.

image-root.log

phillxnet commented 2 years ago

@HTPC-Schrauber Cheers. So from that build log we have, via grep:

 grep 'grub' image-root.log 
INFO: 21:50:55 | --> package: grub2
INFO: 21:50:55 | --> package: grub2-branding-upstream
INFO: 21:50:55 | --> package: grub2-i386-pc
INFO: 21:50:55 | --> package: grub2-snapper-plugin
INFO: 21:50:55 | --> package: grub2-x86_64-efi
DEBUG: 21:50:55 | EXEC: [chroot /home/maik/kiwi-images/build/image-root zypper --non-interactive --gpg-auto-import-keys --pkg-cache-dir /var/cache/kiwi/packages --reposd-dir /var/cache/kiwi/zypper/repos --solv-cache-dir /var/cache/kiwi/zypper/solv --cache-dir /var/cache/kiwi/zypper --raw-cache-dir /var/cache/kiwi/zypper/raw --config /kiwi_4lzdq5wd install --download in-advance --auto-agree-with-licenses --no-recommends -- NetworkManager NetworkManager-branding-upstream adaptec-firmware at avahi bash-completion bind-utils btrfsmaintenance btrfsprogs checkmedia chrony cifs-utils cronie cryptsetup cyrus-sasl-plain dhcp-client dmraid dnf-plugins-core dnf-yum docker dosfstools dracut dracut-kiwi-oem-dump dracut-kiwi-oem-repart fbiterm firewalld fontconfig fonts-config gfxboot-branding-upstream gio-branding-upstream group(mail) group(wheel) grub2 grub2-branding-upstream grub2-i386-pc grub2-snapper-plugin grub2-x86_64-efi haveged hdparm htop iproute2 iputils jeos-firstboot kernel-default keyutils krb5-client less lsof nano net-snmp nfs-client nfs-kernel-server nginx ntp nut nut-drivers-net open-iscsi openssh parted patterns-base-base postfix postgresql10 postgresql10-server python-xml python2-chardet python2-distro python2-psycopg2 python2-pyzmq python2-requests python2-setuptools python2-six python3-distro python3-python-dateutil realmd realmd-lang rockstor-4.0.8-0 rpcbind rsync samba samba-winbind shellinabox shim smartmontools snapper snapper-zypp-plugin syslinux systemd systemd-presets-branding systemd-sysvinit systemtap-runtime tar timezone vim which ypbind]
DEBUG: 21:50:58 | system:   NetworkManager NetworkManager-branding-upstream adaptec-firmware adcli apparmor-parser at avahi bash-completion bc bind-utils branding-openSUSE btrfsmaintenance btrfsprogs btrfsprogs-udev-rules catatonit check-create-certificate checkmedia chrony chrony-pool-openSUSE cifs-utils containerd cron cronie cryptsetup cups-config curl cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-plain deltarpm device-mapper dhcp dhcp-client dialog dmraid dnf dnf-data dnf-plugins-core dnf-yum docker dosfstools dracut dracut-kiwi-lib dracut-kiwi-oem-dump dracut-kiwi-oem-repart e2fsprogs ebtables efibootmgr elfutils fbiterm file firewalld fontconfig fonts-config gamin-server gettext-runtime gfxboot gfxboot-branding-upstream gio-branding-upstream girepository-1_0 glib2-tools gptfdisk grub2 grub2-branding-upstream grub2-i386-pc grub2-snapper-plugin grub2-x86_64-efi haveged hdparm hostname htop hwdata hwloc-data iproute2 ipset iptables iputils jeos-firstboot kernel-default kexec-tools keyutils kpartx krb5-client less libHX28 libX11-6 libX11-data libXau6 libXfont1 libXpm4 libaio1 libarchive13 libasm1 libatm1 libavahi-client3 libavahi-common3 libavahi-core7 libbasicobjects0 libbind9-1600 libbluetooth3 libbtrfs0 libcares2 libcbor0 libcollection4 libcomps0 libcups2 libdaemon0 libdb-4_8 libdcerpc-binding0 libdcerpc0 libdevmapper-event1_03 libdhash1 libdialog14 libdnf2 libdns1605 libdns_sd libebtc0 libedit0 libefivar1 libevent-2_1-8 libext2fs2 libfam0-gamin libfido2-1 libfido2-udev libfl2 libfontenc1 libfreebl3 libfreeipmi17 libfreetype6 libfribidi0 libfuse2 libgd3 libgdbm4 libgio-2_0-0 libgirepository-1_0-1 libgmodule-2_0-0 libgnutls30 libgobject-2_0-0 libhavege1 libhogweed4 libhwloc15 libicu-suse65_1 libicu60_2 libicu60_2-ledata libicu65_1-ledata libidn11 libini_config5 libip4tc2 libip6tc2 libipmimonitoring6 libipset11 libirs1601 libisc1606 libisccc1600 libisccfg1600 libiterm1 libjansson4 libjbig2 libjpeg8 libldb2 liblmdb-0_9_17 libltdl7 liblvm2cmd2_03 liblzo2-2 libmediacheck5 libmm-glib0 libmnl0 libmodulemd2 libmozjs-60 libndp0 libndr-krb5pac0 libndr-nbt0 libndr-standard0 libndr1 libneon27 libnetapi0 libnetfilter_conntrack3 libnettle6 libnewt0_52 libnfnetlink0 libnftables1 libnftnl11 libnl-config libnl3-200 libnm0 libns1604 libnscd1 libnss_nis2 libnss_usrfiles2 libopeniscsiusr0_2_0 libparted0 libpath_utils1 libpcap1 libpciaccess0 libpgm-5_2-0 libpng16-16 libpolkit0 libpowerman0 libpq5 libpwquality1 libpython2_7-1_0 libpython3_6m1_0 libref_array1 libreiserfscore0 librepo0 libsamba-credentials0 libsamba-errors0 libsamba-hostconfig0 libsamba-passdb0 libsamba-util0 libsamdb0 libsensors4 libslang2 libsmbclient0 libsmbconf0 libsmbldap2 libsnapper5 libsnmp30 libsodium23 libsoftokn3 libsss_certmap0 libsss_idmap0 libsss_nss_idmap0 libsss_simpleifp0 libtalloc2 libtdb1 libteamdctl0 libtevent-util0 libtevent0 libtextstyle0 libtiff5 libunwind libupsclient1 liburing1 libusb-0_1-4 libuv1 libwbclient0 libwebp7 libwrap0 libxcb1 libxml2-tools libxslt1 libxtables12 libyajl2 libyaml-0-2 libzck1 libzmq5 live-langset-data logrotate lsof lvm2 mailx mdadm mozilla-nspr mozilla-nss mozilla-nss-certs mtools nano net-snmp nfs-client nfs-kernel-server nfsidmap nftables nginx nss-mdns ntp nut nut-drivers-net open-iscsi openSUSE-build-key openslp openssh openssh-clients openssh-common openssh-server openssl parted patterns-base-base patterns-base-minimal_base perl perl-Bootloader perl-HTML-Parser perl-HTML-Tagset perl-SNMP perl-Term-ReadKey pigz polkit postfix postgresql postgresql-server postgresql10 postgresql10-server ppp purge-kernels-service pv python python-base python-enum34 python-ipaddress python-rpm-macros python-xml python2-appdirs python2-asn1crypto python2-certifi python2-cffi python2-chardet python2-cryptography python2-dbus-python python2-distro python2-gobject python2-idna python2-packaging python2-psycopg2 python2-py python2-pyOpenSSL python2-pyasn1 python2-pycparser python2-pyparsing python2-pyzmq python2-requests python2-setuptools python2-six python2-urllib3 python3 python3-base python3-bind python3-curses python3-dbus-python python3-decorator python3-distro python3-dnf python3-dnf-plugins-core python3-firewall python3-gobject python3-gpg python3-hawkey python3-ldb python3-libcomps python3-libdnf python3-libmodulemd python3-nftables python3-ply python3-python-dateutil python3-rpm python3-six python3-slip python3-slip-dbus python3-sssd-config python3-talloc realmd realmd-lang rockstor rpcbind rsync runc samba samba-client samba-libs samba-libs-python3 samba-winbind shared-mime-info shellinabox shim smartmontools snapper snapper-zypp-plugin snmp-mibs sssd sssd-ad sssd-common sssd-dbus sssd-krb5-common sssd-ldap sssd-tools sudo sysconfig sysconfig-netconfig syslinux system-group-wheel system-user-daemon system-user-lp system-user-mail system-user-nobody system-user-upsd systemd-sysvinit systemtap-runtime tar thin-provisioning-tools timezone typelib-1_0-Modulemd-2_0 typelib-1_0-NM-1_0 usbutils util-linux-systemd vim vim-data-common which wicked wicked-service wpa_supplicant xen-libs xfsprogs xtables-plugins xz yp-tools ypbind
DEBUG: 21:51:06 | system: In cache grub2-2.04-22.3.1.x86_64.rpm (234/405),   3.0 MiB ( 24.3 MiB unpacked)
DEBUG: 21:51:10 | system: In cache grub2-i386-pc-2.04-22.3.1.noarch.rpm (257/405), 816.4 KiB (  2.2 MiB unpacked)
DEBUG: 21:51:21 | system: In cache grub2-x86_64-efi-2.04-22.3.1.noarch.rpm (268/405), 994.0 KiB (  6.2 MiB unpacked)
DEBUG: 21:51:21 | system: In cache grub2-snapper-plugin-2.04-22.3.1.noarch.rpm (269/405),  66.5 KiB (  8.4 KiB unpacked)
DEBUG: 21:51:21 | system: In cache grub2-branding-upstream-2.04-22.3.1.x86_64.rpm (270/405),   2.1 MiB (  2.7 MiB unpacked)
DEBUG: 21:51:53 | system: (234/405) Installing: grub2-2.04-22.3.1.x86_64 [............done]
DEBUG: 21:51:53 | system: warning: /var/cache/kiwi/packages/repo-sle-update/x86_64/grub2-2.04-22.3.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 39db7c82: NOKEY
DEBUG: 21:51:57 | system: (257/405) Installing: grub2-i386-pc-2.04-22.3.1.noarch [............done]
DEBUG: 21:51:57 | system: warning: /var/cache/kiwi/packages/repo-sle-update/noarch/grub2-i386-pc-2.04-22.3.1.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 39db7c82: NOKEY
DEBUG: 21:52:03 | system: available bootloader for your platform (e.g. grub, lilo, zipl, ...).
DEBUG: 21:52:04 | system: (268/405) Installing: grub2-x86_64-efi-2.04-22.3.1.noarch [............done]
DEBUG: 21:52:04 | system: warning: /var/cache/kiwi/packages/repo-sle-update/noarch/grub2-x86_64-efi-2.04-22.3.1.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 39db7c82: NOKEY
DEBUG: 21:52:04 | system: (269/405) Installing: grub2-snapper-plugin-2.04-22.3.1.noarch [.....done]
DEBUG: 21:52:04 | system: warning: /var/cache/kiwi/packages/repo-sle-update/noarch/grub2-snapper-plugin-2.04-22.3.1.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 39db7c82: NOKEY
DEBUG: 21:52:04 | system: (270/405) Installing: grub2-branding-upstream-2.04-22.3.1.x86_64 [............done]
DEBUG: 21:52:04 | system: warning: /var/cache/kiwi/packages/repo-sle-update/x86_64/grub2-branding-upstream-2.04-22.3.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 39db7c82: NOKEY
DEBUG: 21:52:20 | --> kiwi_Volume_6='boot_grub2_i386-pc|freespace:30|boot/grub2/i386-pc'
DEBUG: 21:52:20 | --> kiwi_Volume_7='boot/grub2/x86_64-efi|freespace:30|boot/grub2/x86_64-efi'
DEBUG: 21:52:20 | --> kiwi_bootloader='grub2'
Created symlink /etc/systemd/system/multi-user.target.wants/grub_config.service -> /usr/lib/systemd/system/grub_config.service.
DEBUG: 21:53:00 | EXEC: [mkdir -p /home/maik/kiwi-images/build/image-root/boot/grub2/i386-pc]
DEBUG: 21:53:00 | EXEC: [mkdir -p /home/maik/kiwi-images/build/image-root/boot/grub2/x86_64-efi]
INFO: 21:53:00 | --> sub volume boot/grub2/i386-pc
DEBUG: 21:53:00 | EXEC: [mkdir -p /var/tmp/kiwi_volumes.wdm22ii6/@/boot/grub2]
DEBUG: 21:53:00 | EXEC: [btrfs subvolume create /var/tmp/kiwi_volumes.wdm22ii6/@/boot/grub2/i386-pc]
INFO: 21:53:00 | --> sub volume boot/grub2/x86_64-efi
DEBUG: 21:53:00 | EXEC: [btrfs subvolume create /var/tmp/kiwi_volumes.wdm22ii6/@/boot/grub2/x86_64-efi]
DEBUG: 21:53:00 | EXEC: [mkdir -p /var/tmp/kiwi_volumes.wdm22ii6/@/.snapshots/1/snapshot/boot/grub2/i386-pc]
DEBUG: 21:53:00 | EXEC: [mountpoint -q /var/tmp/kiwi_volumes.wdm22ii6/@/.snapshots/1/snapshot/boot/grub2/i386-pc]
DEBUG: 21:53:00 | EXEC: [mount -o subvol=@/boot/grub2/i386-pc,noatime /dev/mapper/loop0p4 /var/tmp/kiwi_volumes.wdm22ii6/@/.snapshots/1/snapshot/boot/grub2/i386-pc]
DEBUG: 21:53:00 | EXEC: [mkdir -p /var/tmp/kiwi_volumes.wdm22ii6/@/.snapshots/1/snapshot/boot/grub2/x86_64-efi]
DEBUG: 21:53:00 | EXEC: [mountpoint -q /var/tmp/kiwi_volumes.wdm22ii6/@/.snapshots/1/snapshot/boot/grub2/x86_64-efi]
DEBUG: 21:53:00 | EXEC: [mount -o subvol=@/boot/grub2/x86_64-efi,noatime /dev/mapper/loop0p4 /var/tmp/kiwi_volumes.wdm22ii6/@/.snapshots/1/snapshot/boot/grub2/x86_64-efi]
DEBUG: 21:53:00 | --> kiwi_Volume_6='boot_grub2_i386-pc|freespace:30|boot/grub2/i386-pc'
DEBUG: 21:53:00 | --> kiwi_Volume_7='boot/grub2/x86_64-efi|freespace:30|boot/grub2/x86_64-efi'
DEBUG: 21:53:00 | --> kiwi_bootloader='grub2'
INFO: 21:53:27 | Creating grub2 bootloader configuration
INFO: 21:53:27 | Creating grub2 bootloader images
DEBUG: 21:53:27 | Searching grub file: unicode.pf2
DEBUG: 21:53:27 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/unicode.pf2
DEBUG: 21:53:27 | --> Found in: /home/maik/kiwi-images/build/image-root/usr/share/grub2/unicode.pf2
DEBUG: 21:53:27 | EXEC: [mkdir -p /home/maik/kiwi-images/build/image-root/boot/grub2/fonts]
DEBUG: 21:53:27 | EXEC: [cp /home/maik/kiwi-images/build/image-root/usr/share/grub2/unicode.pf2 /home/maik/kiwi-images/build/image-root/boot/grub2/fonts]
DEBUG: 21:53:27 | EXEC: [mkdir -p /home/maik/kiwi-images/build/image-root/boot/grub2/themes]
DEBUG: 21:53:27 | Searching grub file: themes/upstream
DEBUG: 21:53:27 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/themes/upstream
DEBUG: 21:53:27 | --> /home/maik/kiwi-images/build/image-root/usr/lib/grub2/themes/upstream
DEBUG: 21:53:27 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub/themes/upstream
DEBUG: 21:53:27 | --> /home/maik/kiwi-images/build/image-root/usr/lib/grub/themes/upstream
WARNING: 21:53:27 | Theme /home/maik/kiwi-images/build/image-root/boot/grub2/themes/upstream not found
DEBUG: 21:53:27 | Searching grub file: i386-pc
DEBUG: 21:53:27 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:53:27 | --> Found in: /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:53:27 | EXEC: [rsync -a --exclude /*.module /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc/ /home/maik/kiwi-images/build/image-root/boot/grub2/i386-pc]
DEBUG: 21:53:27 | EXEC: [cp /home/maik/kiwi-images/build/image-root/usr/share/grub2/x86_64-efi/grub.efi /home/maik/kiwi-images/build/image-root/boot/efi/EFI/BOOT/bootx64.efi]
DEBUG: 21:53:27 | Searching grub file: x86_64-efi
DEBUG: 21:53:27 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/x86_64-efi
DEBUG: 21:53:27 | --> Found in: /home/maik/kiwi-images/build/image-root/usr/share/grub2/x86_64-efi
DEBUG: 21:53:27 | EXEC: [rsync -a --exclude /*.module /home/maik/kiwi-images/build/image-root/usr/share/grub2/x86_64-efi/ /home/maik/kiwi-images/build/image-root/boot/grub2/x86_64-efi]
DEBUG: 21:53:27 | EXEC: [grep -q GRUB_USE_LINUXEFI /home/maik/kiwi-images/build/image-root/usr/sbin/grub2-mkconfig]
DEBUG: 21:53:27 | EXEC: [grep -q GRUB_ENABLE_BLSCFG /home/maik/kiwi-images/build/image-root/usr/sbin/grub2-mkconfig]
INFO: 21:53:27 | Writing grub2 defaults file
INFO: 21:53:27 | --> GRUB_THEME:/boot/grub2/themes/upstream/theme.txt
INFO: 21:53:27 | --> LOADER_TYPE:grub2-efi
DEBUG: 21:53:39 | EXEC: [mountpoint -q /var/tmp/kiwi_volumes.wdm22ii6/@/.snapshots/1/snapshot/boot/grub2/x86_64-efi]
DEBUG: 21:53:39 | EXEC: [mountpoint -q /var/tmp/kiwi_volumes.wdm22ii6/@/.snapshots/1/snapshot/boot/grub2/x86_64-efi]
DEBUG: 21:53:39 | EXEC: [umount /var/tmp/kiwi_volumes.wdm22ii6/@/.snapshots/1/snapshot/boot/grub2/x86_64-efi]
DEBUG: 21:53:39 | EXEC: [mountpoint -q /var/tmp/kiwi_volumes.wdm22ii6/@/.snapshots/1/snapshot/boot/grub2/i386-pc]
DEBUG: 21:53:39 | EXEC: [mountpoint -q /var/tmp/kiwi_volumes.wdm22ii6/@/.snapshots/1/snapshot/boot/grub2/i386-pc]
DEBUG: 21:53:39 | EXEC: [umount /var/tmp/kiwi_volumes.wdm22ii6/@/.snapshots/1/snapshot/boot/grub2/i386-pc]
DEBUG: 21:53:40 | EXEC: [mountpoint -q /var/tmp/kiwi_mount_manager.108acb7k//boot/grub2/i386-pc]
DEBUG: 21:53:40 | EXEC: [mount -o subvol=@/boot/grub2/i386-pc,noatime /dev/mapper/loop0p4 /var/tmp/kiwi_mount_manager.108acb7k//boot/grub2/i386-pc]
DEBUG: 21:53:40 | EXEC: [mountpoint -q /var/tmp/kiwi_mount_manager.108acb7k//boot/grub2/x86_64-efi]
DEBUG: 21:53:40 | EXEC: [mount -o subvol=@/boot/grub2/x86_64-efi,noatime /dev/mapper/loop0p4 /var/tmp/kiwi_mount_manager.108acb7k//boot/grub2/x86_64-efi]
DEBUG: 21:53:40 | EXEC: [chroot /var/tmp/kiwi_mount_manager.108acb7k grub2-mkconfig -o /boot/grub2/grub.cfg]
DEBUG: 21:53:40 | EXEC: [bash -c strings /home/maik/kiwi-images/build/image-root/usr/share/efi/x86_64/grub.efi | grep EFI\/]
INFO: 21:53:40 | Copying /home/maik/kiwi-images/build/image-root/boot/efi/EFI/BOOT/grub.cfg -> /var/tmp/kiwi_mount_manager.108acb7k/boot/efi/EFI/BOOT/grub.cfg to be found by EFI
DEBUG: 21:53:40 | EXEC: [mountpoint -q /var/tmp/kiwi_mount_manager.108acb7k//boot/grub2/x86_64-efi]
DEBUG: 21:53:40 | EXEC: [umount /var/tmp/kiwi_mount_manager.108acb7k//boot/grub2/x86_64-efi]
DEBUG: 21:53:40 | EXEC: [mountpoint -q /var/tmp/kiwi_mount_manager.108acb7k//boot/grub2/i386-pc]
DEBUG: 21:53:40 | EXEC: [umount /var/tmp/kiwi_mount_manager.108acb7k//boot/grub2/i386-pc]
DEBUG: 21:53:41 | custom arguments for bootloader installation {'boot_device': '/dev/mapper/loop0p4', 'root_device': '/dev/mapper/loop0p4', 'firmware': <kiwi.firmware.FirmWare object at 0x7fac5fa688d0>, 'target_removable': None, 'efi_device': '/dev/mapper/loop0p2', 'system_volumes': {'/.snapshots': {'volume_options': 'subvol=@/.snapshots,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/home': {'volume_options': 'subvol=@/home,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/opt': {'volume_options': 'subvol=@/opt,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/root': {'volume_options': 'subvol=@/root,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/srv': {'volume_options': 'subvol=@/srv,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/tmp': {'volume_options': 'subvol=@/tmp,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/var': {'volume_options': 'subvol=@/var,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/usr/local': {'volume_options': 'subvol=@/usr/local,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/boot/grub2/i386-pc': {'volume_options': 'subvol=@/boot/grub2/i386-pc,noatime', 'volume_device': '/dev/mapper/loop0p4'}, '/boot/grub2/x86_64-efi': {'volume_options': 'subvol=@/boot/grub2/x86_64-efi,noatime', 'volume_device': '/dev/mapper/loop0p4'}}}
INFO: 21:53:41 | Installing grub2 on disk /dev/loop0
DEBUG: 21:53:41 | EXEC: [mountpoint -q /var/tmp/kiwi_mount_manager.68wzcygv//boot/grub2/i386-pc]
DEBUG: 21:53:41 | EXEC: [mount -o subvol=@/boot/grub2/i386-pc,noatime /dev/mapper/loop0p4 /var/tmp/kiwi_mount_manager.68wzcygv//boot/grub2/i386-pc]
DEBUG: 21:53:41 | EXEC: [mountpoint -q /var/tmp/kiwi_mount_manager.68wzcygv//boot/grub2/x86_64-efi]
DEBUG: 21:53:41 | EXEC: [mount -o subvol=@/boot/grub2/x86_64-efi,noatime /dev/mapper/loop0p4 /var/tmp/kiwi_mount_manager.68wzcygv//boot/grub2/x86_64-efi]
DEBUG: 21:53:41 | Searching grub file: i386-pc
DEBUG: 21:53:41 | --> /var/tmp/kiwi_mount_manager.68wzcygv/usr/share/grub2/i386-pc
DEBUG: 21:53:41 | --> Found in: /var/tmp/kiwi_mount_manager.68wzcygv/usr/share/grub2/i386-pc
DEBUG: 21:53:41 | EXEC: [rm -r -f /var/tmp/kiwi_mount_manager.68wzcygv/boot/grub2/grubenv]
DEBUG: 21:53:41 | EXEC: [chroot /var/tmp/kiwi_mount_manager.68wzcygv grub2-install --skip-fs-probe --directory /usr/share/grub2/i386-pc --boot-directory /boot --target i386-pc --modules ext2 iso9660 linux echo configfile search_label search_fs_file search search_fs_uuid ls normal gzio png fat gettext font minicmd gfxterm gfxmenu all_video xfs btrfs lvm luks gcry_rijndael gcry_sha256 gcry_sha512 crypto cryptodisk test true loadenv multiboot part_gpt part_msdos biosdisk vga vbe chain boot /dev/loop0]
DEBUG: 21:53:43 | EXEC: [mountpoint -q /var/tmp/kiwi_mount_manager.68wzcygv//boot/grub2/x86_64-efi]
DEBUG: 21:53:43 | EXEC: [umount /var/tmp/kiwi_mount_manager.68wzcygv//boot/grub2/x86_64-efi]
DEBUG: 21:53:43 | EXEC: [mountpoint -q /var/tmp/kiwi_mount_manager.68wzcygv//boot/grub2/i386-pc]
DEBUG: 21:53:43 | EXEC: [umount /var/tmp/kiwi_mount_manager.68wzcygv//boot/grub2/i386-pc]
DEBUG: 21:53:56 | EXEC: [mountpoint -q /var/tmp/kiwi_volumes.wdm22ii6/@/.snapshots/1/snapshot/boot/grub2/x86_64-efi]
DEBUG: 21:53:56 | EXEC: [mountpoint -q /var/tmp/kiwi_volumes.wdm22ii6/@/.snapshots/1/snapshot/boot/grub2/i386-pc]
INFO: 21:57:58 | Creating grub2 bootloader images
DEBUG: 21:57:58 | EXEC: [mkdir -p /home/maik/kiwi-images/kiwi_install_media.o4zmjd3y/boot/grub2]
DEBUG: 21:57:58 | Searching grub file: unicode.pf2
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/unicode.pf2
DEBUG: 21:57:58 | --> Found in: /home/maik/kiwi-images/build/image-root/usr/share/grub2/unicode.pf2
DEBUG: 21:57:58 | EXEC: [mkdir -p /home/maik/kiwi-images/kiwi_install_media.o4zmjd3y/boot/x86_64/loader/grub2/fonts]
DEBUG: 21:57:58 | EXEC: [cp /home/maik/kiwi-images/build/image-root/usr/share/grub2/unicode.pf2 /home/maik/kiwi-images/kiwi_install_media.o4zmjd3y/boot/x86_64/loader/grub2/fonts]
DEBUG: 21:57:58 | EXEC: [mkdir -p /home/maik/kiwi-images/kiwi_install_media.o4zmjd3y/boot/grub2/themes]
DEBUG: 21:57:58 | Searching grub file: themes/upstream
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/themes/upstream
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/lib/grub2/themes/upstream
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub/themes/upstream
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/lib/grub/themes/upstream
WARNING: 21:57:58 | Theme /home/maik/kiwi-images/kiwi_install_media.o4zmjd3y/boot/grub2/themes/upstream not found
DEBUG: 21:57:58 | Searching grub file: i386-pc
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:57:58 | --> Found in: /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:57:58 | EXEC: [rsync -a --exclude /*.module /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc/ /home/maik/kiwi-images/kiwi_install_media.o4zmjd3y/boot/grub2/i386-pc]
DEBUG: 21:57:58 | Copy earlyboot to media path: /home/maik/kiwi-images/build/image-root/boot/grub2/earlyboot.cfg
DEBUG: 21:57:58 | Searching grub file: i386-pc
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:57:58 | --> Found in: /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:57:58 | Searching grub file: i386-pc
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:57:58 | --> Found in: /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:57:58 | EXEC: [chroot /home/maik/kiwi-images/build/image-root grub2-mkimage -O i386-pc -o /usr/share/grub2/i386-pc/core.img -c /boot/grub2/earlyboot.cfg -p /boot/grub2 -d /usr/share/grub2/i386-pc ext2 iso9660 linux echo configfile search_label search_fs_file search search_fs_uuid ls normal gzio png fat gettext font minicmd gfxterm gfxmenu all_video xfs btrfs lvm luks gcry_rijndael gcry_sha256 gcry_sha512 crypto cryptodisk test true loadenv part_gpt part_msdos biosdisk vga vbe chain boot]
DEBUG: 21:57:58 | Searching grub file: i386-pc
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:57:58 | --> Found in: /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:57:58 | Searching grub file: i386-pc
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:57:58 | --> Found in: /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:57:58 | Searching grub file: i386-pc
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:57:58 | --> Found in: /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:57:58 | Searching grub file: i386-pc
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:57:58 | --> Found in: /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc
DEBUG: 21:57:58 | EXEC: [bash -c cat /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc/cdboot.img /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc/core.img > /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc/eltorito.img]
DEBUG: 21:57:58 | EXEC: [cp /home/maik/kiwi-images/build/image-root/usr/share/grub2/x86_64-efi/grub.efi /home/maik/kiwi-images/kiwi_install_media.o4zmjd3y/EFI/BOOT/bootx64.efi]
DEBUG: 21:57:58 | Searching grub file: x86_64-efi
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/x86_64-efi
DEBUG: 21:57:58 | --> Found in: /home/maik/kiwi-images/build/image-root/usr/share/grub2/x86_64-efi
DEBUG: 21:57:58 | EXEC: [rsync -a --exclude /*.module /home/maik/kiwi-images/build/image-root/usr/share/grub2/x86_64-efi/ /home/maik/kiwi-images/kiwi_install_media.o4zmjd3y/boot/grub2/x86_64-efi]
DEBUG: 21:57:58 | Searching grub file: i386-pc/eltorito.img
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc/eltorito.img
DEBUG: 21:57:58 | --> Found in: /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc/eltorito.img
DEBUG: 21:57:58 | Searching grub file: i386-pc/boot_hybrid.img
DEBUG: 21:57:58 | --> /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc/boot_hybrid.img
DEBUG: 21:57:58 | --> Found in: /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc/boot_hybrid.img
DEBUG: 21:57:58 | --> Copying /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc/eltorito.img
DEBUG: 21:57:58 | --> Copying /home/maik/kiwi-images/build/image-root/usr/share/grub2/i386-pc/boot_hybrid.img
DEBUG: 21:57:58 | EXEC: [grep -q GRUB_USE_LINUXEFI /home/maik/kiwi-images/build/image-root/usr/sbin/grub2-mkconfig]
DEBUG: 21:57:58 | EXEC: [grep -q GRUB_ENABLE_BLSCFG /home/maik/kiwi-images/build/image-root/usr/sbin/grub2-mkconfig]
INFO: 21:57:58 | Writing grub2 defaults file
INFO: 21:57:58 | --> GRUB_THEME:/boot/grub2/themes/upstream/theme.txt
INFO: 21:57:58 | --> LOADER_TYPE:grub2-efi
INFO: 21:57:58 | Creating grub2 install config file from template
DEBUG: 21:57:58 | EXEC: [bash -c strings /home/maik/kiwi-images/build/image-root/usr/share/efi/x86_64/grub.efi | grep EFI\/]
INFO: 21:57:58 | Writing KIWI template grub.cfg file
DEBUG: 21:57:58 | --> kiwi_Volume_6='boot_grub2_i386-pc|freespace:30|boot/grub2/i386-pc'
DEBUG: 21:57:58 | --> kiwi_Volume_7='boot/grub2/x86_64-efi|freespace:30|boot/grub2/x86_64-efi'
DEBUG: 21:57:58 | --> kiwi_bootloader='grub2'
DEBUG: 21:58:26 | EXEC: [/usr/bin/xorriso -application_id 0xc1d1cc11 -volid INSTALL -joliet on -padding 0 -outdev /home/maik/kiwi-images/Rockstor-NAS.x86_64-4.0.8-0.install.iso -map /home/maik/kiwi-images/kiwi_install_media.o4zmjd3y / -chmod 0755 / -- -boot_image grub bin_path=boot/x86_64/loader/eltorito.img -boot_image grub grub2_mbr=/home/maik/kiwi-images/kiwi_install_media.o4zmjd3y/boot/x86_64//loader/boot_hybrid.img -boot_image grub grub2_boot_info=on -boot_image any partition_offset=16 -boot_image any cat_path=boot/x86_64/boot.catalog -boot_image any cat_hidden=on -boot_image any boot_info_table=on -boot_image any platform_id=0x00 -boot_image any emul_type=no_emulation -boot_image any load_size=2048 -append_partition 2 0xef /home/maik/kiwi-images/kiwi_install_media.o4zmjd3y/boot/x86_64/efi -boot_image any next -boot_image any efi_path=--interval:appended_partition_2:all:: -boot_image any platform_id=0xef -boot_image any emul_type=no_emulation]
phillxnet commented 2 years ago

Noting elements as I read through the log.

At the stage when the grub is being installed on the target image /dev/loop0 i.e. the line just before:

INFO: 21:53:41 | Installing grub2 on disk /dev/loop0

we have:

DEBUG: 21:53:41 | custom arguments for bootloader installation 
{
    'boot_device': '/dev/mapper/loop0p4',
    'root_device': '/dev/mapper/loop0p4',
    'firmware': < kiwi.firmware.FirmWare object at 0x7fac5fa688d0 > ,
    'target_removable': None,
    'efi_device': '/dev/mapper/loop0p2',
    'system_volumes': {
        '/.snapshots': {
            'volume_options': 'subvol=@/.snapshots,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/home': {
            'volume_options': 'subvol=@/home,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/opt': {
            'volume_options': 'subvol=@/opt,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/root': {
            'volume_options': 'subvol=@/root,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/srv': {
            'volume_options': 'subvol=@/srv,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/tmp': {
            'volume_options': 'subvol=@/tmp,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/var': {
            'volume_options': 'subvol=@/var,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/usr/local': {
            'volume_options': 'subvol=@/usr/local,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/boot/grub2/i386-pc': {
            'volume_options': 'subvol=@/boot/grub2/i386-pc,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/boot/grub2/x86_64-efi': {
            'volume_options': 'subvol=@/boot/grub2/x86_64-efi,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        }
    }
}

so we have

'efi_device': '/dev/mapper/loop0p2',

And

        '/boot/grub2/x86_64-efi': {
            'volume_options': 'subvol=@/boot/grub2/x86_64-efi,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        }

A btrfs subvol. And from our config we have:

<type
                image="oem"
                primary="true"
                initrd_system="dracut"
                filesystem="btrfs"
                fsmountoptions="noatime"
                bootloader="grub2"
                firmware="efi"
                installiso="true"
                kernelcmdline="plymouth.enable=0 rd.kiwi.oem.maxdisk=5000G"
                bootpartition="false"
                devicepersistency="by-label"
                btrfs_root_is_snapshot="true"
                btrfs_quota_groups="false"
                efipartsize="64"
        >
...
<systemdisk>
                <volume name="home"/>
                <volume name="root"/>
                <volume name="tmp"/>
                <volume name="opt"/>
                <volume name="srv"/>
                <volume name="boot/grub2/i386-pc"/>
                <volume name="boot/grub2/x86_64-efi"
                        mountpoint="boot/grub2/x86_64-efi"/>
                <volume name="usr/local"/>
                <volume name="var" copy_on_write="false"/>
            </systemdisk>

Which is unchanged from prior working efi boots.

phillxnet commented 2 years ago

From you own earlier build log, whose resulting image is untested in efi boot (moving so hardware access issues currently) is identical configured:

{
    'boot_device': '/dev/mapper/loop0p4',
    'root_device': '/dev/mapper/loop0p4',
    'firmware': < kiwi.firmware.FirmWare object at 0x7fdaa4de0f60 > ,
    'target_removable': None,
    'efi_device': '/dev/mapper/loop0p2',
    'system_volumes': {
        '/.snapshots': {
            'volume_options': 'subvol=@/.snapshots,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/home': {
            'volume_options': 'subvol=@/home,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/opt': {
            'volume_options': 'subvol=@/opt,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/root': {
            'volume_options': 'subvol=@/root,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/srv': {
            'volume_options': 'subvol=@/srv,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/tmp': {
            'volume_options': 'subvol=@/tmp,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/var': {
            'volume_options': 'subvol=@/var,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/usr/local': {
            'volume_options': 'subvol=@/usr/local,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/boot/grub2/i386-pc': {
            'volume_options': 'subvol=@/boot/grub2/i386-pc,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        },
        '/boot/grub2/x86_64-efi': {
            'volume_options': 'subvol=@/boot/grub2/x86_64-efi,noatime',
            'volume_device': '/dev/mapper/loop0p4'
        }
    }
}

So looking earlier in the log of my build here for /dev/loop0p2 we have:

DEBUG: 15:57:17 | Initialize gpt disk
DEBUG: 15:57:17 | EXEC: [sgdisk --zap-all /dev/loop0]
INFO: 15:57:19 | --> creating EFI CSM(legacy bios) partition
DEBUG: 15:57:19 | EXEC: [sgdisk -n 1:2048:+2M -c 1:p.legacy /dev/loop0]
DEBUG: 15:57:20 | EXEC: [sgdisk -t 1:EF02 /dev/loop0]
INFO: 15:57:21 | --> creating EFI partition
DEBUG: 15:57:21 | EXEC: [sgdisk -n 2:0:+64M -c 2:p.UEFI /dev/loop0]
DEBUG: 15:57:22 | EXEC: [sgdisk -t 2:EF00 /dev/loop0]
INFO: 15:57:23 | --> creating SWAP partition
DEBUG: 15:57:23 | EXEC: [sgdisk -n 3:0:+2048M -c 3:p.swap /dev/loop0]
DEBUG: 15:57:24 | EXEC: [sgdisk -t 3:8200 /dev/loop0]
INFO: 15:57:25 | --> creating root partition
DEBUG: 15:57:25 | EXEC: [sgdisk -n 4:0:0 -c 4:p.lxroot /dev/loop0]
DEBUG: 15:57:26 | EXEC: [sgdisk -t 4:8300 /dev/loop0]
DEBUG: 15:57:28 | EXEC: [kpartx -s -a /dev/loop0]
INFO: 15:57:28 | Creating EFI(fat16) filesystem on /dev/mapper/loop0p2
DEBUG: 15:57:28 | EXEC: [mkdosfs -F16 -I -n EFI /dev/mapper/loop0p2]
DEBUG: 15:57:28 | EXEC: [mkfs.btrfs -L ROOT /dev/mapper/loop0p4]

I.e. second partition, equivalent of say sda2, for the fat16 part of the boot image. With our resulting install as:

rleap15-3:~ # parted /dev/sda print
Model: ATA QEMU HARDDISK (scsi)
Disk /dev/sda: 25.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name      Flags
 1      1049kB  3146kB  2097kB                  p.legacy  bios_grub
 2      3146kB  70.3MB  67.1MB  fat16           p.UEFI    boot, esp
 3      70.3MB  2218MB  2147MB  linux-swap(v1)  p.swap    swap
 4      2218MB  25.8GB  23.6GB  btrfs           p.lxroot

and the fstab of this install:

rleap15-3:~ # cat /etc/fstab 
LABEL=SWAP swap swap defaults 0 0
LABEL=ROOT / btrfs noatime 0 0
LABEL=ROOT /.snapshots btrfs noatime,subvol=@/.snapshots 0 0
LABEL=ROOT /home btrfs noatime,subvol=@/home 0 0
LABEL=ROOT /opt btrfs noatime,subvol=@/opt 0 0
LABEL=ROOT /root btrfs noatime,subvol=@/root 0 0
LABEL=ROOT /srv btrfs noatime,subvol=@/srv 0 0
LABEL=ROOT /tmp btrfs noatime,subvol=@/tmp 0 0
LABEL=ROOT /var btrfs noatime,subvol=@/var 0 0
LABEL=EFI /boot/efi vfat defaults 0 0
LABEL=ROOT /usr/local btrfs noatime,subvol=@/usr/local 0 0
LABEL=ROOT /boot/grub2/i386-pc btrfs noatime,subvol=@/boot/grub2/i386-pc 0 0
LABEL=ROOT /boot/grub2/x86_64-efi btrfs noatime,subvol=@/boot/grub2/x86_64-efi 0 0

And @HTPC-Schrauber earlier image partitions also look to be identically arrangted:

DEBUG: 21:52:50 | Initialize gpt disk
DEBUG: 21:52:50 | EXEC: [sgdisk --zap-all /dev/loop0]
INFO: 21:52:51 | --> creating EFI CSM(legacy bios) partition
DEBUG: 21:52:51 | EXEC: [sgdisk -n 1:2048:+2M -c 1:p.legacy /dev/loop0]
DEBUG: 21:52:52 | EXEC: [sgdisk -t 1:EF02 /dev/loop0]
INFO: 21:52:53 | --> creating EFI partition
DEBUG: 21:52:53 | EXEC: [sgdisk -n 2:0:+64M -c 2:p.UEFI /dev/loop0]
DEBUG: 21:52:55 | EXEC: [sgdisk -t 2:EF00 /dev/loop0]
INFO: 21:52:56 | --> creating SWAP partition
DEBUG: 21:52:56 | EXEC: [sgdisk -n 3:0:+2048M -c 3:p.swap /dev/loop0]
DEBUG: 21:52:57 | EXEC: [sgdisk -t 3:8200 /dev/loop0]
INFO: 21:52:58 | --> creating root partition
DEBUG: 21:52:58 | EXEC: [sgdisk -n 4:0:0 -c 4:p.lxroot /dev/loop0]
DEBUG: 21:52:59 | EXEC: [sgdisk -t 4:8300 /dev/loop0]
DEBUG: 21:53:00 | EXEC: [kpartx -s -a /dev/loop0]
INFO: 21:53:00 | Creating EFI(fat16) filesystem on /dev/mapper/loop0p2
DEBUG: 21:53:00 | EXEC: [mkdosfs -F16 -I -n EFI /dev/mapper/loop0p2]
DEBUG: 21:53:00 | EXEC: [mkfs.btrfs -L ROOT /dev/mapper/loop0p4]

So all looks to be OK assuming the 'efi_device': '/dev/mapper/loop0p2', bit is being enacted as expected.

Very sorry folks I'm a little hampered by my current circumstance re no 'real' EFI hardware to test on as we need confirmation that this is not a single machine, i.e. custom efi path in bios type thing. But as indicated the resulting EFI fat16 partition is in fstab at /boot/efi as @HTPC-Schrauber ended up passing to grub in order to achieve a successful boot via a grub re-install:

Then I tried to run: grub2-install --target=x86_64-efi --efi-directory=/boot/efi /dev/sda

This worked without an error. And after this the system was bootable in EFI mode without CSM.

I'll have another look upstream for some potential changes as we definitely used to be able to boot in EFI if our installer was similarly booted in EFI mode.

In anyone can ship in with some more analysis then great. I'm reluctant to take this upstream to the kiwi-ng until we have a more concrete understanding of what may have gone wrong. I'm thinking myself that we have a failure to write the fat16 contents to the target 64MB /dev/mapper/loop0p2 which is our eventual sda2 EFI partition. And that maybe the required files are instead ending up in the btrfs subvol of "@/boot/grub2/x86_64-efi". But we clearly see the 'efi_device': '/dev/mapper/loop0p2', passed to grub at least apparently from the log.

phillxnet commented 2 years ago

An install I have here has:

rleap15-3:~ # ls -la /boot/efi/EFI/BOOT/
total 1200
drwxr-xr-x 2 root root    2048 Aug  3 18:13 .
drwxr-xr-x 3 root root    2048 Aug  3 18:13 ..
-rwxr-xr-x 1 root root 1222656 Aug  3 18:13 bootx64.efi
-rwxr-xr-x 1 root root     164 Aug  3 18:13 grub.cfg

With /boot/efi containing only the "EFI" directory and in turn this contains only the directory "BOOT".

FroggyFlox commented 2 years ago

Thanks a lot for the dissection, @phillxnet! In case it helps, the equivalent of the grub2-install that @HTPC-Schrauber had to manually run seems to be done at: https://github.com/OSInside/kiwi/blob/89ba240b3b35aec4c203ccac0ff6de685fcc6060/kiwi/bootloader/install/grub2.py#L129

            Command.run(
                [
                    'chroot', self.root_mount.mountpoint,
                    self._get_grub2_install_tool_name(
                        self.root_mount.mountpoint
                    )
                ] + self.install_arguments + [
                    '--directory', module_directory,
                    '--boot-directory', boot_directory,
                    '--target', self.target,
                    '--modules', self.modules,
                    self.install_device
                ]
            )

From there the target seems defined below for the x86_64 arch:

        if Defaults.is_x86_arch(self.arch):
            self.target = 'i386-pc'
            self.install_device = self.device

i386-pc seems to be the default for grub2... ... but I'm not sure if this is overwritten somewhere or if this is even the problem. I'll have to see if I can reproduce/try on real hardware when I get a decent block of time for it.

Hopefully this helps.

FroggyFlox commented 2 years ago

I could build a new ISO using the Leap15.3_x86 profile but I have not had time to test it yet. For reference, here's the info:

# sudo zypper info python3-kiwi
Loading repository data...
Reading installed packages...

Information for package python3-kiwi:
-------------------------------------
Repository     : Virtualization_Appliances_Builder
Name           : python3-kiwi
Version        : 9.24.1-lp152.1.1
Arch           : x86_64
Vendor         : obs://build.opensuse.org/Virtualization:Appliances
Installed Size : 3.3 MiB
Installed      : Yes
Status         : up-to-date
Source package : python-kiwi-9.24.1-lp152.1.1.src
Summary        : KIWI - Appliance Builder Next Generation
Description    : 
    Python 3 library of the KIWI Image System. Provides an operating system
    image builder for Linux supported hardware platforms as well as for
    virtualization and cloud systems like Xen, KVM, VMware, EC2 and more.

The "simple" kiwi log (stdout, helpful to locate timestamps of interest) is: Kiwi-build-log.txt

The full build log: image-root.log

I'll try to find some time later today to test this ISO on real hardware.

slowhand93 commented 2 years ago

Then I tried to run: grub2-install --target=x86_64-efi --efi-directory=/boot/efi /dev/sda

Hello guys, I'm having the same situation. How did you manage to run "grub2-install..." ? I'm only getting in dracut-emergency shell and can't run any grub command.

What's also strange in my situation is, that the root label is missing when i look into blkid, the sda4 which would be my root partition, it's missing. -> lsblk shows sda4 with 110G, sda2 which is labeled as efi is 64M, sda3 is SWAP and sta1 is install. Any idea? I can't run fdisk a.s.o.

Thanks a lot.

Edit: CSM is turned off

phillxnet commented 2 years ago

@slowhand93 Thanks for the confirmation. Much appreciated. Re:

How did you manage to run "grub2-install..." ? I'm only getting in dracut-emergency shell and can't run any grub command.

I believe @HTPC-Schrauber ran the grub re-install command at the very end of the installation process; that is before the first reboot. At that point the system is pretty much fully functional, it just doesn't appear to have had it's efi grub configured correctly. Hence the first reboot (from the new install) failing and dropping you to the dracut-emergency shell.

Your other issues re labels size etc may all be resolve once this first successful boot is accomplished.

Let us know how it goes. And thanks again for confirming this bug.

FroggyFlox commented 2 years ago

I'll try to find some time later today to test this ISO on real hardware.

I disabled CSM (I believe) on my motherboard, forced UEFI only as boot mode, and booted the USB containing that ISO in UEFI mode. Very first boot, we have:

localhost:~ # parted /dev/sda print
Model: ATA ACJC2M032mSA (scsi)
Disk /dev/sda: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name      Flags
 1      1049kB  3146kB  2097kB                  p.legacy  bios_grub
 2      3146kB  70.3MB  67.1MB  fat16           p.UEFI    boot, esp
 3      70.3MB  2218MB  2147MB  linux-swap(v1)  p.swap    swap
 4      2218MB  32.0GB  29.8GB  btrfs           p.lxroot

and

localhost:~ # cat /etc/fstab
LABEL=SWAP swap swap defaults 0 0
LABEL=ROOT / btrfs noatime 0 1
LABEL=ROOT /.snapshots btrfs noatime,subvol=@/.snapshots 0 0
LABEL=ROOT /home btrfs noatime,subvol=@/home 0 0
LABEL=ROOT /opt btrfs noatime,subvol=@/opt 0 0
LABEL=ROOT /root btrfs noatime,subvol=@/root 0 0
LABEL=ROOT /srv btrfs noatime,subvol=@/srv 0 0
LABEL=ROOT /tmp btrfs noatime,subvol=@/tmp 0 0
LABEL=ROOT /var btrfs noatime,subvol=@/var 0 0
LABEL=EFI /boot/efi vfat defaults 0 0
LABEL=ROOT /usr/local btrfs noatime,subvol=@/usr/local 0 0
LABEL=ROOT /boot/grub2/i386-pc btrfs noatime,subvol=@/boot/grub2/i386-pc 0 0
LABEL=ROOT /boot/grub2/x86_64-efi btrfs noatime,subvol=@/boot/grub2/x86_64-efi 0 0

and

localhost:~ # lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0  29.8G  0 disk 
├─sda1   8:1    0     2M  0 part 
├─sda2   8:2    0    64M  0 part /boot/efi
├─sda3   8:3    0     2G  0 part [SWAP]
└─sda4   8:4    0  27.8G  0 part /
sdb      8:16   1   3.7G  0 disk 
├─sdb1   8:17   1 569.5M  0 part 
└─sdb2   8:18   1    20M  0 part 

sdb is the USB drive used to install the ISO.

Finally:

localhost:~ # btrfs fi show
Label: 'ROOT'  uuid: b2ded9cd-18b2-4b73-9a77-a5aa1eead975
        Total devices 1 FS bytes used 1.52GiB
        devid    1 size 27.75GiB used 2.02GiB path /dev/sda4

and

localhost:~ # ls -la /boot/efi/EFI/BOOT/
total 1200
drwxr-xr-x 2 root root    2048 Nov  6 04:37 .
drwxr-xr-x 3 root root    2048 Nov  6 04:37 ..
-rwxr-xr-x 1 root root 1222656 Nov  6 04:37 bootx64.efi
-rwxr-xr-x 1 root root     164 Nov  6 04:37 grub.cfg

localhost:~ # tree /boot -d
/boot
├── efi
│   └── EFI
│       └── BOOT
└── grub2
    ├── fonts
    ├── i386-pc
    ├── themes
    │   └── starfield
    └── x86_64-efi

9 directories
phillxnet commented 2 years ago

@FroggyFlox Thanks for the additional test: Re:

Very first boot, we have:

So we have a successful uefi boot of an install resulting from one of our 4.0.9-0 iso's. Can you confirm that this boot was actually from the resulting install as the USB key (the installer) has the ability to boot an installed system. I don't think it would work in this case however but given the USB key (installer) is still in play here it would be good to completely rule this out.

Also upon an assumed drive only efi/uefi boot do you have contents in:

ls -la /sys/firmware/efi/

Which I'm assuming is proof of an effective efi boot? As I understand it the efi dir will only exist if a system is booted in efi mode.

Thanks for this. Initially reassuring but we now have a some do and some don't type arrangement!! Assuming no anomalies in your system drive only boot of the resulting install.

phillxnet commented 2 years ago

@FroggyFlox Thanks for a back-channel conversation it seems I have again got the wrong end of the stick.

So @FroggyFlox's info above represents the boot of the installer, i.e. end of install state post reboot. Not a resulting reboot state of the resulting install. I'll try and emulate a uefi/efi boot here soon so I can keep up :). Sorry for the noise folks.

slowhand93 commented 2 years ago

@slowhand93 Thanks for the confirmation. Much appreciated. Re:

How did you manage to run "grub2-install..." ? I'm only getting in dracut-emergency shell and can't run any grub command.

I believe @HTPC-Schrauber ran the grub re-install command at the very end of the installation process; that is before the first reboot. At that point the system is pretty much fully functional, it just doesn't appear to have had it's efi grub configured correctly. Hence the first reboot (from the new install) failing and dropping you to the dracut-emergency shell.

Your other issues re labels size etc may all be resolve once this first successful boot is accomplished.

Let us know how it goes. And thanks again for confirming this bug.

@phillxnet Thanks for your answer. I wasn't able to get it booting up. Then I saw that the rockstor download page links to a 15.3 iso which did work for me. I noticed, that for whatever reason in my previous attempts the installer didn't went through completely. It just stopped after the copying process and led me to dracut shell. With the official iso it went through without any problems. Looks good so far.

Please allow me an OT question: Why is the btrfsprogs version still very old? There have been many changes in the last few years

FroggyFlox commented 2 years ago

i386-pc seems to be the default for grub2... ... but I'm not sure if this is overwritten somewhere or if this is even the problem. I'll have to see if I can reproduce/try on real hardware when I get a decent block of time for it.

@phillxnet, I just another quick look at the build log I uploaded above and looking at the grub2-install command, it seems it is indeed using the i386-pc target:

DEBUG: 08:37:51 | EXEC: [chroot /var/tmp/kiwi_mount_manager.es9bzr0h grub2-install --skip-fs-probe --directory /usr/share/grub2/i386-pc --boot-directory /boot --target i386-pc --modules ext2 iso9660 linux echo configfile search_label search_fs_file search search_fs_uuid ls normal gzio png fat gettext font minicmd gfxterm gfxmenu all_video xfs btrfs lvm luks gcry_rijndael gcry_sha256 gcry_sha512 crypto cryptodisk test true loadenv multiboot part_gpt part_msdos biosdisk vga vbe chain boot /dev/loop7]
HTPC-Schrauber commented 2 years ago

I did a fresh Install with the new ISO from rockstor website. The result ist the same: a not booting system.

Directly after the installer I looked at the output from the commands from @FroggyFlox. All looks the same on my system.

After my grub2-install command there is only one change:

localhost:~ # tree /boot -d
/boot
├── efi
│   └── EFI
│       ├── BOOT
│       └── rockstor
└── grub2
    ├── fonts
    ├── i386-pc
    ├── themes
    │   └── starfield
    └── x86_64-efi

10 directories

So now there is a /boot/efi/EFI/rockstor directory. The system is bootable again.

phillxnet commented 2 years ago

I've now added an installer-uefi test instance to our test setup. This is a pure UEFI only qemu libvirt system running TianoCore ovmf firmware which is said to be unable to boot bios images. See: Does OVMF support legacy booting, legacy option ROMs, CSM?

setup via:

Our kvm-pool setup

mkdir /home/kvm-pool
virsh pool-define-as --name kvm-pool --type dir --target /home/kvm-pool
virsh pool-autostart kvm-pool
virsh pool-start kvm-pool

Our target system disk

virsh vol-create-as kvm-pool installer-uefi.qcow2 20G --format qcow2

Machine definition file

<domain type="kvm">
    <name>installer-uefi</name>
    <vcpu>2</vcpu>
    <memory unit="MiB">2048</memory>
    <os firmware="efi">
        <type arch='x86_64' machine='q35'>hvm</type>
        <loader secure="no"/> <!--Still has secure boot enabled in older libvirt-->
        <!--https://bugzilla.redhat.com/show_bug.cgi?id=1929357-->
    </os>
    <features>
        <acpi/>
        <apic/>
    </features>
    <cpu mode='host-model'/>
    <pm>
        <suspend-to-mem enabled='no'/>
        <suspend-to-disk enabled='no'/>
    </pm>
    <devices>
        <emulator>/usr/bin/qemu-system-x86_64</emulator>
        <disk type="file" device="cdrom">
            <driver name="qemu" type="raw"/>
            <source file="/home/kiwi-images/Rockstor-Leap15.3-generic.x86_64-4.0.9-0.install.iso"/>
            <target dev="sda" bus="sata"/>
            <boot order='1'/>
            <readonly/>
        </disk>
        <disk type='file' device='disk'>
            <driver name='qemu' type='qcow2'/>
            <source file='/home/kvm-pool/installer-uefi.qcow2'/>
            <target dev='sdb' bus='sata'/>
            <boot order='2'/>
            <serial>112358</serial>
        </disk>
        <interface type='network'>
            <source network='host-bridge'/>
            <model type='virtio'/>
            <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
        </interface>
        <serial type="pty">
            <target type="isa-serial" port="0">
                <model name="isa-serial"/>
            </target>
        </serial>
        <console type='pty'>
            <target type="serial" port="0"/>
        </console>
        <graphics type="vnc" port="-1" tlsPort="-1" autoport="yes" listen='127.0.0.1'>
            <listen type='address' address='127.0.0.1'/>
            <image compression="off"/>
        </graphics>
        <video>
            <model type="virtio"/>
        </video>
    </devices>
</domain>

Machine create

virsh define /home/buildbot/master/config/virt/installer-uefi.xml

First boot (defaults to secure boot)

secure-boot-setting-on And our installer is not bootable: secure-boot-fail-on-installer-and-installed

Post secure boot disable

Device Manager -> Secure Boot Configuration (post the required un-tick change and reset)

tiano-secure-boot-disabled

We have a successful installer UEFI boot with the following pre-initial reboot state:

localhost:~ # efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,0002,0000,0003,0004,0005,0006
Boot0000* UiApp FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(462caa21-7614-4503-836e-8ab6f4662331)
Boot0001* UEFI QEMU DVD-ROM QM00001     PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)N.....YM....R,Y.
Boot0002* UEFI QEMU HARDDISK 112358     PciRoot(0x0)/Pci(0x1f,0x2)/Sata(1,65535,0)N.....YM....R,Y.
Boot0003* UEFI PXEv4 (MAC:5254005A550E) PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(5254005a550e,1)/IPv4(0.0.0.00.0.0.0,0,0)N.....YM....R,Y.
Boot0004* UEFI PXEv6 (MAC:5254005A550E) PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(5254005a550e,1)/IPv6([::]:<->[::]:,0,0)N.....YM....R,Y.
Boot0005* UEFI HTTPv4 (MAC:5254005A550E)        PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(5254005a550e,1)/IPv4(0.0.0.00.0.0.0,0,0)/Uri()N.....YM....R,Y.
Boot0006* UEFI HTTPv6 (MAC:5254005A550E)        PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(5254005a550e,1)/IPv6([::]:<->[::]:,0,0)/Uri()N.....YM....R,Y.

But most noteworthy re this issue is we can also boot, in UEFI, the resulting install. Details to follow.

phillxnet commented 2 years ago

Continuing on from above UEFI proof of boot on Tiano ovmf.

Select HDD from boot manager:

Pressing escape at Grub first screen and then "exit" at the grub command line and we are in the EUFI interface. If we then force boot from the HDD via: Boot Manager -> Hightlight UEFI QEMU HARDDISK 112358

boot-hdd-directly

We are presented with our installed grub setup:

UEFI-boot-of-install Press Enter key.

This proceeds as expected and we have not had to re-install grub on a UEFI only system.

localhost:~ # efibootmgr -v
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0001,0002,0000,0003,0004,0005,0006
Boot0000* UiApp FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(462caa21-7614-4503-836e-8ab6f4662331)
Boot0001* UEFI QEMU DVD-ROM QM00001     PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)N.....YM....R,Y.
Boot0002* UEFI QEMU HARDDISK 112358     PciRoot(0x0)/Pci(0x1f,0x2)/Sata(1,65535,0)N.....YM....R,Y.
Boot0003* UEFI PXEv4 (MAC:5254005A550E) PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(5254005a550e,1)/IPv4(0.0.0.00.0.0.0,0,0)N.....YM....R,Y.
Boot0004* UEFI PXEv6 (MAC:5254005A550E) PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(5254005a550e,1)/IPv6([::]:<->[::]:,0,0)N.....YM....R,Y.
Boot0005* UEFI HTTPv4 (MAC:5254005A550E)        PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(5254005a550e,1)/IPv4(0.0.0.00.0.0.0,0,0)/Uri()N.....YM....R,Y.
Boot0006* UEFI HTTPv6 (MAC:5254005A550E)        PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(5254005a550e,1)/IPv6([::]:<->[::]:,0,0)/Uri()N.....YM....R,Y.

and:

localhost:~ # ls -la /sys/firmware/efi/
total 0
drwxr-xr-x  6 root root    0 Nov 20 15:03 .
drwxr-xr-x  7 root root    0 Nov 20 15:03 ..
-r--r--r--  1 root root 4096 Nov 20 15:08 config_table
drwxr-xr-x  2 root root    0 Nov 20 15:03 efivars
-r--r--r--  1 root root 4096 Nov 20 15:08 fw_platform_size
-r--r--r--  1 root root 4096 Nov 20 15:08 fw_vendor
-r--r--r--  1 root root 4096 Nov 20 15:08 runtime
drwxr-xr-x 14 root root    0 Nov 20 15:08 runtime-map
drwxr-xr-x  2 root root    0 Nov 20 15:08 secret-key
-r--------  1 root root 4096 Nov 20 15:08 systab
drwxr-xr-x 39 root root    0 Nov 20 15:08 vars

@FroggyFlox has reproduced @HTPC-Schrauber 's experience and proved the work around but due to the above proof of concept on a uefi only system I think we are seeing something else here other than a non uefi bootable install as the result of at least a 4.0.9-0 image. I don't know quite what yet, unless this is some interplay on some motherboard firmware. We are not currently secure boot compatible so maybe there is some firmware setting that is causing some issues here on some hardware setups. As seen my test system has secure boot disabled but is not capable of booting anything non UEFI by design, from the given referenced anyway.

More input on this issue is welcome as always but I'm currently putting this down to a hardware/firmware anomaly which would be great to find but I don't think we can do much about it given we have a proven uefi boot here. At least on the reference ovmf firmware and the given machine definition. I will endeavour to now test on this machine also before releasing x86_64 installers as I had previously only test installed on a bios KVM. However we predominantly rely on the expertise of our upstream kiwi-ng for the details of our installer boot capabilities. And with this Tiano firmware proof of boot in UEFI I'm not sure we have much to take upstream currently.

phillxnet commented 2 years ago

A potentially important caveat with my prior proof of concept posts:

Using the installers grub boot hdd option ends up sending us to the UEFI (i.e. it fails to boot hdd from installer). But UEFI boot manager initiated hdd boot works as stated. And removing the 'cdrom' installer file (ejecting the installer medium) also works for auto boot fail through.

Noting in case this rings-a-bell for our observations here.

phillxnet commented 2 years ago

Linking to a potentially interesting upstream report. Although in the linked report issue the base os is debian not a JeOS Leap such as in our case.

Given we now have at least 2 reports of failed uefi boot of the resulting install but proven uefi boot within a kvm/libvirt Tiano ovmf based system (detailed earlier) the linked issue may be contextually interesting as it expresses a uefi boot failure (with grub-install work-around) expressed in a virtual box uefi instantiation.

https://github.com/OSInside/kiwi/issues/1991

Apologies if this is just noise. But we are still struggling with this one.

phillxnet commented 2 years ago

Linking to another upstream issue, this time for CentOS Stream 9 (as apposed to our openSUSE Leap 15.3 base), where UEFI fails to boot. This time it shares our expandable OEM install profile:

"efibootmgr is not called on the OEM expandable image" https://github.com/OSInside/kiwi/issues/2140

Apologies again if this is just noise. But we are still struggling with this one.

As we have set/known partitions we may well be able to hard-code a config for a call to efibootmgr via a oneshot post-install run. Or incorporate something a little more fancy such as is referenced in the sited issue. We do the like (and need-not any longer I suspect) for our "Rebuild dracut initrd for this host" service. Or we could incorporate something a little more fancy such as is referenced in the sited issue, but ideally this does look to be an upstream issue.

But the discrepancy between 'some' real hardware uefi boot failures and the above ".. UEFI proof of boot on Tiano ovmf" remains, and is likely a pointer to fussiness or work-around capability differences in UEFI implementations.