Age | Commit message (Collapse) | Author | Files | Lines |
|
Arch might not really support some of these, but mkinitcpio can.
|
|
This prevents having unquoted expansion in the bsdcpio commandline
|
|
This refactors parse_cmdline into a few chunks of code, mainly to
separate the work of parsing from the handling of the actual parsed
parameters. By default, parse_cmdline_item is used as the callback for
handling the parameters, but this could be overriden by other code
sourcing init_functions if desirable.
Our test harness passes more tests, but we leave behind some expected
failures to describe the cases where it still fails. Fortunately I've
not yet been able to find any cases which warrant --expect-parse-fail.
|
|
Some of these tests currently fail including hard failures where the
shell quits entirely (this would lead to a kernel panic). A followup
commit will rewrite the parse_cmdline function to improve it and fix
these deficiencies.
|
|
Version extraction only works on x86 (i686 and x86_64) kernels.
ref: https://bugs.archlinux.org/task/43256
|
|
rootfstype is handled by the kernel, so we should handle it, too.
ref: https://bugs.archlinux.org/task/45117
|
|
ref: https://bugs.archlinux.org/task/44805
|
|
ref: https://bugs.archlinux.org/task/49380
|
|
This is true of more and more modules with the advent of aliases, e.g.
$ modinfo -F filename crc32c
/lib/modules/4.6.2-rampage/kernel/arch/x86/crypto/crc32c-intel.ko.gz
/lib/modules/4.6.2-rampage/kernel/crypto/crc32c_generic.ko.gz
|
|
modinfo outputs softdeps which we can add if they exist (failing
quietly on not-found). this obviates the need for some of our own
module quirks.
The output of modinfo can take many forms, as it's nearly freeform text
in the .modinfo section of the kernel module. The basic form is:
softdep: pre: foo
But it might also be:
softdep: pre: foo bar post: baz
Or:
softdep: pre: foo
softdep: post: bar
So just parse the entire line, discarding anything that ends with a ':'.
|
|
|
|
|
|
Not that it really matters, but let's scope this to where we actually
care for the modified time output.
|
|
The archive goes from looking like this:
.
./buildconfig
./config
./init
./init_functions
./VERSION
./lib64
./sbin
To:
buildconfig
config
init
init_functions
VERSION
lib64
sbin
Note the lack of the "root" entry and leading "./". This fixes an issue
with packing ucode into the initramfs since the kernel really wants an
exact match, and not path equivalency.
|
|
This hook adds host-specific configuration to the image. Currently,
it adds the hostname and machine-id files for usage with journald.
|
|
As seen:
https://bbs.archlinux.org/viewtopic.php?id=185204
https://bbs.archlinux.org/viewtopic.php?id=185265
|
|
Fixes FS#41273.
|
|
Use this to only add files matching *.conf in the modconf hook.
Fixes FS#39994.
|
|
Fixes FS#40217.
|
|
Fallback on no compression at all, since we don't want to make
potentially poor assumptions about what the kernel might support.
Fixes FS#39659.
|
|
Fixes FS#39560.
|
|
|
|
|
|
Fixes FS#38603.
|
|
This patch adds in some extra hackery to make sure that users with btrfs
root filesystems don't end up with unusable initrds due to the following
change made upstream [1]. TL;DR: The btrfs module has dropped it's
libcrc32c dependency, so mkinitcpio no longer pulls in the crc32c module
necessary for the btrfs module to be inserted. The crc32c module was
only pulled in previously due to mkinitcpio hackery [2], so extra
hackery now seems like the logical path.
This problem can be experienced by using linux-mainline on an Arch
machine with a btrfs root filesystem. Besides from this extra hackery,
an alternative workaround would be for users in this situation to add
crc32c to their MODULES aray in their mkintcpio.conf. Of course, this
needs to be done ahead of the linux-3.14 upgrade for them to avoid the
problem (assuming none of their other modules depend on libcrc32c).
[1] http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg30912.html
[2] https://projects.archlinux.org/mkinitcpio.git/tree/functions?id=v16#n398
|
|
Prevents problems with bogusly named filesystems, e.g.:
mount -t tmpfs / /mount/point
Fixes FS#39090.
|
|
|
|
Should have been removed as part of previous commit, as this was
clearly just a typo.
|
|
Reported in FS#38264.
|
|
This isn't documented, but it's needed since the kernel lz4 support is
based on the original streaming format and not the newer default. Use
-l to force the legacy codec.
Fixup lsinitcpio to support the older format, and, add a warning when
the newer format is detected. Who knows when this will be "resolved" ...
Upstream discussion: https://code.google.com/p/lz4/issues/detail?id=102
|
|
|
|
This hook works together with the systemd hook from the systemd
package and requires the add_systemd_unit function.
It launches systemd-vconsole-setup.service in initramfs
and is especially useful to unlock encrypted volumes in
initramfs.
|
|
Pretty much everyone benefits from this service, as it is always better than
having no shutdown-ramfs. If someone puts their own shutdown-ramfs in place,
it will likely be done by initramfs and this service will be skipped
automatically.
In more obscure situations, it can still be masked.
|
|
|
|
This is surely a configuration error as it's an infinite loop.
|
|
|
|
This lets users shoot themselves in the foot more easily, as they can
put their own modified hooks into /etc/initcpio/{hooks,install} to
override those shipped by the distro in /usr/lib/initcpio.
To make debugging easier, include the full path of the hook being used
when mkinitcpio runs in verbose mode.
Implements FS#37796.
|
|
When the module directory matching $(uname -r) cannot be found, generation
of the shutdown ramfs aborted:
systemd[1]: Starting Generate shutdown-ramfs...
mkinitcpio[1944]: ==> ERROR: '/lib/modules/3.12.1-1-ARCH' is not a valid kernel module directory
systemd[1]: mkinitcpio-generate-shutdown-ramfs.service: main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start Generate shutdown-ramfs.
systemd[1]: Unit mkinitcpio-generate-shutdown-ramfs.service entered failed state.
Tell mkinitcpio that we do not wish to add any kernel modules.
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
The '-k none' switch prevents mkinitcpio from adding modules to the
image and keeps it from bailing out when it cannot find any.
|
|
This allows booting from devices which have labels like LABEL=/.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
When enabled, this service generates an "initramfs" that systemd
pivots to on shutdown to ensure clean umounting and shutdown of
loop and dm devices.
The actual work is done by systemd-shutdown.
|
|
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
The -d (--generatedir) option writes the root of the generated image
directly to the specified directory.
Useful for generating a shutdown-ramfs with mkinitcpio -d /run/initramfs/.
|
|
This essentially reverts 306dcbd7b21f8a680 which foolishly assumes that
kernel and libarchive decompression support stay in sync.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This will allow systemd's kernel-install script to generate and install
an initrd as per the freedesktop boot loader specs.
See kernel-install(8) for details.
Notice that 'profiles' are not used.
This will eventually be hooked up so that calling "make install" from
a kernel build will do the right thing.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Since b5927393d103af9, mkinitcpio acknowledges that lz4 exists.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|