Adding drivers to initrd using kickstart & dracut

Richard W.M. Jones rjones at redhat.com
Thu Jun 12 13:58:20 UTC 2014


On Thu, Jun 12, 2014 at 08:49:30AM -0500, Chris Adams wrote:
> Once upon a time, Richard W.M. Jones <rjones at redhat.com> said:
> > However although this creates the /etc/dracut.conf.d/xen-drivers.conf
> > file in the guest, it doesn't add the Xen drivers to the initramfs.
> > (I also tried running dracut --add-drivers ... but that does nothing).
> 
> The initramfs is built during package install, before your %post runs.
> You will need to rebuild the initramfs after configuring dracut.

Right.  Actually the problem was a bit more subtle.  I was just
running "dracut", which rebuilds the initramfs of the running kernel,
not the *installed* kernel.

I copied this snipped from the Fedora cloud images kickstart:

KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
/sbin/dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION

and used it instead of the dracut command (see my original email).

Thanks,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top


More information about the users mailing list