Age | Commit message (Collapse) | Author | Files | Lines |
|
Now that mkinitcpio stores the build time config file in the image, we
should have a way of easily getting it back out.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
git (at least version 1.7.12.1) does a great job of showing the absolute
wrong code moving around in this patch.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
For the purposes of accounting and debugging, it's nice to have this
around.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
The initramfs installs all modules to kernel/ which devalues the
modules.order file. To avoid any edge cases with the wrong module being
loaded (because all matching modules for a given alias will be added),
make sure that the modules.order file is actually valid.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Overlooked in b8d9c5cd2753e9. This change also assigns a value of "2" to
builtin modules which are added to the the ADDED_MODULES array, to
distinguish them from actual modules on disk. Using this, we can avoid
adding builtins to the image's runtime config.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This was always wrong and should have been braced by MODPATHS rather
than ADDED_MODULES. However, since ADDED_MODULES now possibly contains
modules that weren't actually added (builtins), creating an initramfs
without modules causes cp to be passed a null string to be copied.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
In case mkinitcpio is in run via chroot(1), this possibly silences a
harmless warning about bsdcpio failing to set the default locale. This
comes up fairly often with the recent install media and users think that
it's something to be concerned about.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Assuming modules.builtin exists, add the module names it contains to the
ADDED_MODULES hash so that we silently skip over them.
Suggested-by: Matthew Monaco <dgbaley27@0x01b.net>
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Lookups in the hash table are far faster than traversing the entire
array, as this grows O(n) and introduces a particularly noticeable
slowdown on larger images.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This hasn't provided actual directories in a while. Reword it to point
out that it's only providing the critical scripts and binaries for
booting.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
In the case of a single arg, use readlink(1) to resolve the target of
the symlink. Document this, and additionally note the lack of guarantee
about the target of the symlink.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
These are low level enough that they should be part of the base layout,
similar to the filesystem package in userspace. Later hooks can easily
override these, if they really want to.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
busybox gives us something sane which doesn't need setting, or
resetting.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Booo. This broke my boot. Should never have been added in f3638aaa0937.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This is already fixed elsewhere, and eventually this hack needs to be
removed. However, for now, it seems that some kernels (3.4 and 3.0) will
hang on shutdown with the combination of systemd and lvm/crypt. Removing
evidence of udev being alive in /run seems to fix this.
Fixes FS#30995.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This was overlooked in 5f81d06e8b87.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Rename this option so that it mirrors the longopt name for -S,
--skiphooks. The original --add option remains behind in the option
parser for backwards compatability, but no other references remain.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This might be useful for creating an initramfs image as part of a kernel
package.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This is used by udev to deal with firmware requests for firmware that is
not available until the real root. It will also be used by systemd to
detect what to do, if that is ever used.
ref: http://www.spinics.net/lists/linux-wireless/msg94522.html
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
init defaults to a rootdelay of 10, but poll_device falls back on a
default of 5 if rootdelay is somehow manage during the hook run. Keep
this consistent and use 10 seconds in both places.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
I almost deleted this, replacing it with only bsdtar. Add a comment so
I'm not tempted to do this again.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
mkinitcpio needs to be able to more tightly control the layout of the
image. By moving this outside the control of the base hook, it's more
reasonable to believe that a drop-in replacement for the base hook could
be written, as it now only contains the utilities required for the /init
that it provides.
Being that initialize_buildroot is outside of a hook, we can make "raw"
calls to coreutils that create the directories and symlinks, saving some
overhead and forking.
This also symlinks /usr/local/{lib,bin} into the common /usr/lib and
/usr/bin, respectively, so that there's always a way to override libs
and bins, and they're automatically pulled into our strict early init
path of /usr/bin.
Finally, we lump all this generally a little "later" in the early setup.
This addresses an unseen "bug" wherein an extra temp directory that
never gets used is created when leveraging a preset.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Mostly a convenience for myself, and anyone else who runs builds of
things like util-linux or kmod, where having debug symbols on these
libraries can add a large amount of weight to the image.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Fixes FS#30271.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
[dave: fix whitespace and re-add needed quoting]
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Show only regular files in /usr/bin instead of everything (including the
mess of symlinks to busybox and kmod). It's also a nice to have since
we're showing more about the multiple hook points now.
This mostly restores the behavior prior to f7b8a6f0fd.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
- remove replaces
- exchange udev with systemd-tools
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
I've adopted the convention of specifying the shebang for the
interpreter any given install or runtime hook that a script runs under.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
If we didn't actually add a module to the image, avoid adding it to the
runtime config for probing.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Avoid using compound commands where one side runs a command group.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This fixes a bug that made it impossible for systemd to be booted with a
separate /usr partition.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This function was incorrectly named in the manpage, and is misleading
since it will add symlinks, rather than follow them, as of 96e616f06785.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This fixes an unlikely (and likely unseen) regression from
9a20048c6279cd. Without unsetting the build function before sourcing the
hook file, we can't guarantee that we're running the build function tied
to that specific file.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Technically, we report success when we wrote an image to disk, but this
might not be obvious to users, even with a blaring warning right before
this line. If in the event builderrors is incremented at all, avoid
reporting any sort of "success", since there might be cause for concern.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
ldd reporting a library to be 'not found' is dangerous, and should be
reported. Consider this a build error, which will hopefully prompt the
user to reconsider before rebooting.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Generalize the awk program embedded in add_runscript and create a
separate function which can be reused to display the specific hooks that
a script has.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This allows us to declare sourced variables that we want to shield from
stomping on our config variables, and without needing to use a subshell.
Incidentally, this also fixes FS#29992 in a more permanent way.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This really should be moved into a man page.
FS#30042.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Note that we're intentionally very liberal about what we accept for
symlinks, and don't actually care if the target exists.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|