Re: initramfs: kernel update adds unwanted driver?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-04-13, Rick Stevens <ricks@xxxxxxxxxxxxxx> 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
   well-behaved.

or

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
                                                   Tuesday?
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux