On 2018-04-13, Rick Stevens <ri...@alldigital.com> wrote:
> On 04/13/2018 09:34 AM, Grant Edwards wrote:

>> What's the best way to remove the old, broken driver from the
>> initramfs so that the driver in the root filesystem is used on boot?
>> Is there a way to prevent the kernel update process from adding the
>> driver back to the initramfs the next time a kernel is updated?

> Uhm, probably do a "rmmod foo;modprobe foo", THEN rebuild the
> initramfs image. Also check both the /etc/dracut.conf file and
> /etc/dracut.conf.d directory to see if they're specifying some
> ancient version of your module. At worst, add a
> --add-modules=<modulename>" to the command.

Except the goal is to _not_ have the driver in the initramfs.  There
is absolutely no reason it needs to be there, and eliminating it from
the initramfs avoids a source of confusion.

I've identified a couple options:

First create a file named /etc/dracut.conf.d/foo containing the line
omit_drivers+="foo".  Then either

1. Rebuild the initramfs with the 'dracut' command.  I haven't tested
   this yet. It seems a bit risky, since (AFAICT) I don't have any way
   of knowing what command-line options were used to generate the
   current, working initramfs, and I might end up making unintentional
   changes when I regenerate it.  One presumes that a well-behaved
   admin would edit the dracut config files rather than use
   command-line options, but I one should not assume customers are all


2. Unpack the current initramfs-*.img file, delete the foo.ko.xz file
   and re-pack the initramfs-*.img file. I've written a bash shell
   script to do that, and its seems to work fine.  This feels a little
   less risky than regenerating the initramfs from scratch.

In either case, the omit_drivers setting should prevent re-breaking
the system with future runs of dracut (either manually by the admin or
as part of a kernel upgrade).

Grant Edwards               grant.b.edwards        Yow! ... or were you
                                  at               driving the PONTIAC that
                              gmail.com            HONKED at me in MIAMI last
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

Reply via email to