About --- From fc42 mock chroot, build a pvgrub2 blob for pvh using the new xen modules provided by grub2: grub2-xen_pvh-i386-modules <-- this is used here grub2-xen-x64-modules // create custom mock chroot higher up in mock path mkdir -p .config/mock && cd $_ cp -p /etc/mock/fedora-42-x86_64.cfg ./ // append custom mock config for internal shell use cp -p fc42-mock-extra >> fedora-42-x86_64.cfg mock -r fedora-42-x86_64 --init mock -r fedora-42-x86_64 --shell // now inside mock shell, make a sandbox mkdir pvgrub2 && cd $_ // stage our locale cp -p grub.mo /usr/share/locale/en@quot/LC_MESSAGES/ // who are we? # cat /etc/fedora-release Fedora release 42 (Adams) // still in mock shell! D/L and force install (as root) 3 pkgs below: rpm -Uvh grub2-tools-extra-2.12-28.fc42.x86_64.rpm --force --nodeps rpm -Uvh device-mapper-libs-1.02.204-3.fc42.x86_64.rpm --force --nodeps rpm -Uvh grub2-xen_pvh-i386-modules-2.12-28.fc42.noarch.rpm --force --nodeps // ask pkg manager to confirm # rpm -qa | grep -P 'xen|grub|device' grub2-tools-extra-2.12-28.fc42.x86_64 device-mapper-libs-1.02.204-3.fc42.x86_64 grub2-xen_pvh-i386-modules-2.12-28.fc42.noarch // this is the internal grub2 config (debian/grub-xen-host_grub-pvh.cfg) $ cat boot-grub-grub.cfg if search -s -f /boot/grub/grub.cfg ; then echo "Reading (${root})/boot/grub/grub.cfg" configfile /boot/grub/grub.cfg fi if search -s -f /grub/grub.cfg ; then echo "Reading (${root})/grub/grub.cfg" configfile /grub/grub.cfg fi // create the mkimage applet # cat user_mk_xen_image.sh #!/bin/sh PATH=$PATH:/usr/sbin:/sbin target="$1" platform="$2" cfgfile="$3" mkdir -p boot/grub2 ; \ cp -p $cfgfile boot/grub2/grub.cfg ;\ pvfile=grub-${target}-${platform}.bin grub2-mkstandalone -v --compress=xz --locale-dir=/usr/share/locale --locales="" --fonts="unicode" \ --modules="linux" --themes="" \ -O ${target}-${platform} -o $pvfile boot/grub2/grub.cfg #"/boot/grub2/grub.cfg=${cfgfile}" exit 0 // set exec bit chmod +x user_mk_xen_image.sh // build the pvh grub2 blob ./user_mk_xen_image.sh i386 xen_pvh boot-grub-grub.cfg > pvh-obj-mk.out 2>&1 // see the *.bin below # ls -al total 5000 drwxrwxr-x 3 root root 4096 Apr 26 21:41 . drwxrwxr-x 6 mockbuild mock 4096 Apr 26 21:31 .. drwxrwxr-x 3 root root 4096 Apr 26 21:36 boot -rw-rw-r-- 1 root root 238 Apr 26 21:32 boot-grub-grub.cfg -rw-rw-r-- 1 root root 184364 Apr 26 21:30 device-mapper-libs-1.02.204-3.fc42.x86_64.rpm -rw-r--r-- 1 mockbuild mockbuild 1909926 Apr 26 20:28 grub2-tools-2.12-28.fc42.x86_64.rpm -rw-rw-r-- 1 root root 855630 Apr 26 21:26 grub2-tools-extra-2.12-28.fc42.x86_64.rpm -rw-rw-r-- 1 root root 870238 Apr 26 21:20 grub2-xen_pvh-i386-modules-2.12-28.fc42.noarch.rpm -rw-rw-r-- 1 root root 1185336 Apr 26 21:39 grub-i386-xen_pvh.bin <-- success -rw-rw-r-- 1 root root 72960 Apr 26 21:39 pvh-obj-mk.out -rw-rw-r-- 1 root root 1690 Apr 26 21:54 README.pvh -rwxrwxr-x 1 root root 434 Apr 26 21:36 user_mk_xen_image.sh Author --- PryMar56 Apr 2025