V8.00.000.2025.06.17

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-09-25 20:14:53 +01:00
parent 0b4ec1978e
commit 577827dc7a
17 changed files with 712 additions and 83 deletions

View File

@@ -28,7 +28,14 @@ guard_sourcing
#######################################
installation_initramfs() {
### Declare Arrays, HashMaps, and Variables.
declare var_modules=""
declare var_modules="" var_whereiam=""
# shellcheck disable=SC2312
if [[ -x "$(command -v virt-what)" ]]; then
var_whereiam=$(virt-what | head -n1)
else
var_whereiam=$(grep -iE 'kvm|vmware|qemu' /sys/class/dmi/id/product_name 2>/dev/null || echo "baremetal")
fi
mkdir -p "${TARGET}/etc/initramfs-tools/files"
@@ -41,13 +48,29 @@ installation_initramfs() {
var_modules=$(grep_nic_driver_modules)
cat << EOF >> "${TARGET}/etc/initramfs-tools/modules"
### Custom NIC driver
### Custom NIC driver:
${var_modules}
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
EOF
if [[ "${var_whereiam}" =~ ^(kvm|vmware|qemu)$ ]]; then
cat << EOF >> "${TARGET}/etc/initramfs-tools/modules"
### QEMU Bochs-compatible virtual machine support:
bochs
### Virtio support:
virtio_pci
virtio_blk
virtio_scsi
virtio_console
virtio_rng
EOF
fi
printf "%s\n" '# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=conf' >> "${TARGET}/etc/initramfs-tools/modules"
### MODULES: [ most | netboot | dep | list ]
## 'most' - Add most filesystem and all hard-drive drivers.
## 'dep' - Try and guess the modules to load.