grml-debootstrap
grml-debootstrap copied to clipboard
dracut support
Could you add dracut support please?
https://packages.debian.org/dracut
I don't have any plans to support such an option, but it should be enough to just replace initramfs-tools in the packages files with dracut, nor?
It doesn't boot.
Stuck in the dracut initramfs. After a long time, timeout will happen. /dev/disk does not exist.
Did you look into and follow /usr/share/doc/dracut-core/README.Debian?
No. But it's a good tip. Thank you! /usr/share/doc/dracut-core/README.Debian does not solve boot issues but dracut-core (without dracut) co-installation with initramfs-tools will make debugging a lot easier. Didn't know that. Makes it easier to have a build with both and compare a chroot created dracut initramfs with a non-chroot dracut created initramfs.
https://github.com/dracutdevs/dracut/issues/1596
Would a pull request adding dracut support to grml-debootstrap acceptable?
@adrelanos thanks for asking upfront! :) Providing to many options adds complexity, untested code paths,... but I'm aware that dracut provides features that initramfs-tools doesn't, so I'm not totally against it per se.
But let's clarify first: would it be an option to integrate dracut support via a --post-scripts or --pre-scripts (hook) script? Do you have some example code available that would be relevant for inclusion?
I have opened a pull request, which adds support for this and implemented it as an option for the chroot-script. The alternative would be running a custom chroot-script via the --chroot-scripts option:
#!/bin/bash
apt-get install -y --no-install-recommends dracut
KERNELIMG=$(ls -1 /boot/vmlinuz-* 2>/dev/null | head -1)
if [ -z "$KERNELIMG" ] ; then
echo 'No kernel image found, skipping initrd stuff.'>&2
return
fi
KERNELVER=${KERNELIMG#/boot/vmlinuz-}
dracut -N --kver $KERNELVER --fstab --add-fstab /etc/fstab --force
This was implemented thanks to @DanWin in https://github.com/grml/grml-debootstrap/pull/196. Hence, closing.