Bug 103665 - accept options from /etc/mkinitrd.conf
Summary: accept options from /etc/mkinitrd.conf
Alias: None
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: i386 Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: David Lawrence
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2003-09-03 17:42 UTC by Alexandre Oliva
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-02 18:33:11 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Collection of patches for mkinitrd, one of which introduces /etc/sysconfig/mkinitrd (1.83 KB, application/x-bzip2)
2003-10-18 01:09 UTC, Alexandre Oliva
no flags Details
program that does the boot-time-equivalent of rescan-scsi-bus.sh (3.73 KB, application/octet-stream)
2003-10-22 02:54 UTC, Alexandre Oliva
no flags Details
patch that improves on mkinitrd.01-sbp2-rescan.patch, using rescan-scsi-bus binary (1.20 KB, patch)
2003-10-22 02:58 UTC, Alexandre Oliva
no flags Details | Diff
program that does the boot-time-equivalent of rescan-scsi-bus.sh (3.77 KB, text/plain)
2003-10-22 03:03 UTC, Alexandre Oliva
no flags Details

Description Alexandre Oliva 2003-09-03 17:42:53 UTC
Would a patch for mkinitrd be acceptable to get it to read options from a
default file (say /etc/mkinitrd.conf), such that I could create such a file and
not have to remember the exact set of options I need for my initrd to work with
external USB and Firewire disks (see bug 103609 for the complete list of options
I need)?  I'm thinking of also adding an option to get it to ignore the contents
of the file as well.  What I'm undecided is whether to have the options in the
file pre- or appended to those given in the command line.  Comments?

Ideally, the installer (and kickstart!) should enable us to configure this file
too, but that would be a separate enhancement request :-)

Comment 1 Jeremy Katz 2003-09-03 18:29:54 UTC
They should be prepended to the command line so that command line options can
override them.  I'm not against such a patch, but I'm not likely to get to it
anytime soon since it doesn't really help with configurations that we actually

Comment 2 Alexandre Oliva 2003-10-18 01:09:59 UTC
Created attachment 95278 [details]
Collection of patches for mkinitrd, one of which introduces /etc/sysconfig/mkinitrd

This attachment contains not only a patch file that introduces
/etc/sysconfig/mkinitrd as a means to add default settings to the mkinitrd
program, but also --no-config-file and --config-file=pathname (so far
undocumented) options to reset the list.  This is patch

The other patches are broken-up versions of the patches i nbug 106926.

Comment 3 Alexandre Oliva 2003-10-20 01:10:07 UTC
If the patch I just posted to bug 103821 is accepted, patch
mkinitrd.04-aftermods-sbp2.patch is no longer needed, and
03-aftermods-support.patch could go with it.  I don't particularly care about
02-insmod-k-usb-sleep, but 01-sbp2-rescan is absolutely necessary to be able to
have a root filesystem (and/or volume groups or raid devices containing it)
spanning across firewire hard disks, and 05-sysconfig-mkintird makes it far
simpler to ugprade the kernel without the risk that the new initrd will be
missing essential options.

Comment 4 Alexandre Oliva 2003-10-22 02:53:18 UTC
It turns out that, if you load sbp2 after ohci1394, the odds that it will fail
to log into the my external hard disk increase dramatically.  This means I take
back on the claim that paches 03 and 04 can be dropped.  They should still go
in.  I've also come up with some improvements to the scsi bus scanning, by
rewriting the relevant portions of rescan-scsi-bus.sh in C, such that the
program can be added to the initrd filesystem, or to the installer image.

Comment 5 Alexandre Oliva 2003-10-22 02:54:27 UTC
Created attachment 95373 [details]
program that does the boot-time-equivalent of rescan-scsi-bus.sh

Comment 6 Alexandre Oliva 2003-10-22 02:58:12 UTC
Created attachment 95374 [details]
patch that improves on mkinitrd.01-sbp2-rescan.patch, using rescan-scsi-bus binary

This patch, to be installed after the 5 patches in mkinitd-patches.tar.bz2 (or
along with mkinitrd.01-sbp2-rescan.patch) makes the boot speedier, by removing
the no-longer-needed sleep, and more flexible, by using a program that will be
more flexible in that it will dynamically detect which scsi hosts to scan,
instead of only rescanning those that were present at mkinitrd time.

Comment 7 Alexandre Oliva 2003-10-22 03:03:57 UTC
Created attachment 95375 [details]
program that does the boot-time-equivalent of rescan-scsi-bus.sh

Oops, I'd posted an out-of-date version of the program, that was missing error
checking after fopen :-(

Comment 8 Alexandre Oliva 2004-02-16 21:46:56 UTC
All of the sbp2-related gunk can fortunately go away in FC2, but the
patch mkinitrd.05-sysconfig-mkinitrd.patch, that enables seamless
kernel upgrades (because you can create an /etc/sysconfig/mkinitrd
that states what you need in initrd for it to boot), would still be
very nice ot have.  Any chance of integrating it, or at least
commenting on the patch such that I can put it in an acceptable form?

Comment 9 Alexandre Oliva 2004-03-31 03:17:49 UTC
Some change in mkinitrd/modprobe/something alike in FC2test2
introduced a very interesting and welcome behavior for me.  Entries
that look like `alias scsi_hostadapter sbp2' or `alias
scsi_hostadapter usb-storage' cause the aliased modules to be included
in initrd, which is exactly what I needed.

Someone might still like to change mkinitrd such that it could accept
a default set of options, but the patch I wrote has probably been
found too ugly to be included, and since my problem is solved, I won't
rewrite it unless given some indication that there's interest in
adding the feature.  I'm now happy without it.

Comment 10 Jeremy Katz 2004-08-02 18:33:11 UTC
Yeah, not sure I'm comfortable with some of the implications of a
mkinitrd.conf at this point.

Note You need to log in before you can comment on or make changes to this bug.