SHA256
1
0
forked from pool/mkosi
mkosi/mkosi-initrd-chroot.sh
Sebastian Wagner 019f4d9e73 - Create new subpackage mkosi-initrd-tukit.
* This package adds a special mkosi-initrd wrapper to support creating initrds
    on transactional systems. I.e., with transactional-update, a transaction
    runs on a chroot, but mkosi requires bubblewrap, which uses pivot_root, and
    that is known to fail on a chroot environment.
- Do not install 50-mkosi.install kernel-install script.
  * Although kernel-install is provided in openSUSE, it is not run when a kernel
    is installed or removed (this work is done by suse-module-tools). Also, even
    calling it manually, it does not support the custom systemd-boot integration
    in openSUSE.

OBS-URL: https://build.opensuse.org/package/show/Virtualization/mkosi?expand=0&rev=43
2024-08-21 06:34:30 +00:00

13 lines
297 B
Bash

#!/bin/bash
__mkosi_initrd_chroot_call() {
mount --rbind / /.mkosi-root --mkdir
cd /.mkosi-root
mount --move . /
chroot . /usr/libexec/mkosi-initrd/mkosi-initrd $@
exit
}
export -f __mkosi_initrd_chroot_call
unshare --mount /bin/bash -c '__mkosi_initrd_chroot_call $@' -- $@