Age | Commit message (Collapse) | Author | Files | Lines |
|
There's no need to keep this mildly dangerous script executable on the
filesystem.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Break this out of install/base into a separate function. We need to be
able to read from the RUNHOOKS array to accurately specify which hooks
to execute at runtime.
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>
|
|
This option is just a bad idea. Initramfs creation is too important to
get wrong, and running it from outside the root FS has too many gotchas,
the worst of them being:
- where do you pull hooks from?
- how do you resolve binary dependencies within the root?
In general, dealing with the extra luggage of the base directory makes the
codebase more complicated than it needs to be (see all the '_' prefixed
functions which are called from add functions). In favor of simplifying the
code, and making it more maintainable, kill this off and force the sane
option of chroot'ing into an install if the need arises.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
fsck binaries might be outside of /sbin -- glob on all the common paths.
This almost matches what we use for util-linux's fsck search path, but
we omit the oddball /sbin/fs and /sbin/fs.d directories.
Note that this only affects non-autodetect images, since autodetect
resolves fsck helpers directly by name.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Thanks to Radoslaw Nadstawny (Rad3k) for writing this.
Satsifies FS#21022.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
20509ade neglected to filter the raid456 module when detecting raid[456]
arrays, which lead to non-bootable systems from the autodetect-enabled
image.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This hook has been moved to the pcmciautils package.
Signed-off-by: Tom Gundersen <teg@jklm.no>
Acked-by: Dave Reisner <d@falconindy.com>
|
|
|
|
This makes us a little more future proof as far as moving files around.
No need for 2 lib/ directories in early userspace anyways.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Everything we need to know about the devices is already in sysfs
attributes for the md devices. Read any found nodes for raid levels and
sort them into our whitelist. This removes the need for root in order to
"scan" arrays.
More code churn on top of d11ba00.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Since 3b18c9cd we have a blank /etc/fstab in the image. This is also
forward thinking for the next release of util-linux (2.22), where fsck
complains loudly about my filthy hack of using /dev/null as /etc/fstab.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
sysfs contains enough information about block devices to be able to
determine the order of stacked devices such as lvm, raid, or crypto. By
looking at the device symlinks from the holders/ attributes of a block
device, we can walk down each device chain until we reach the most
descendant device.
For each of these devices at the end of a chain, detect its type and
perform the appropriate action to disassemble it. Then, walk back up the
device chain, disassembling each parent device.
To save ourselves some pain and make sure we're fairly accurate, lsblk
is brought in for detection of device types.
Thanks-To: Florian Pritz <bluewind@xinu.at>
Thanks-To: Tom Gundersen <teg@jklm.no>
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This is implemented for the keymap and consolefont hooks. It's done in
such a way that vconsole.conf and locale.conf will override and
supplement rc.conf.
Implements FS#29022.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
|
|
This is a really ugly patch, but allows mkinitcpio to read hooks from
multiple locations, namely:
/usr/lib/initcpio/{install,hooks}
/lib/initcpio/{install,hooks}
Preference is given to the first, and all files included with mkinitcpio
are moved there.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
e2fsprogs makes a lot of hardlinks for its fsck tools. If ext[234] is
detected, add the fsck.ext4 binary and add symlinks.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Make the logic similar to how we treat usrfstype.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Behavior changed in util-linux commit 2f1ac44b4b.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Trading out modinfo for modprobe allows us to detect filesystems like
ext2 and ext3 which might be aliased to ext4 in the case of Kconfig
CONFIG_EXT4_USE_FOR_EXT23 being enabled. Maybe this catches other insane
corner cases, too.
Since we now treat this as possible aliases, we also need to be mindful
of the fact that it could resolve to multiple module names. Assign the
output as an array to respect this.
Fixes FS#28569.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
FS#10061 still isn't dead, its just resting:
https://bbs.archlinux.org/viewtopic.php?pid=1056003
An strace from a helpful user shows that our mdadm call is trying to
open a block device and the call never returns:
open("/dev/sdb", O_RDONLY|O_DIRECT|O_LARGEFILE
Fix this by only scanning explicitly the block devices we're interested
in, found via sysfs. This is an all around win for everyone, especially
users who have mdadm installed without any need for it.
This changes some of our assumptions about the environment:
- the mdadm binary exists when we find md devices in /sys
- the user running mkinitcpio isn't any specific UID or part of any
particular group, but merely has read access to the block devices
we're about to scan.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
These should belong to the udev package.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
In particular, skipping ata-generic causes some macbooks to not boot.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This makes us more resilient against path changes -- add_binary is smart
enough to resolve the path for us.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Install kmod in /usr/bin and provide symlinks for all the applets to the
kmod multi-call.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This is required for mounting a separate /usr. While the shutdown hook
is essentially a soft requirement for a separate /usr, we shouldn't
break init.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
- firmware handling is now a udevd builtin
- udevadm may move -- let a path lookup find it
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Refer to commit 9a9e0d68555 in the kernel where Linus removes this and
says "to be revisited later". The only option (currently) is to built
this into your kernel image.
Suggested by FS#27906.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This adds functionality to pivot to back to the initramfs on shutdown,
thereby allowing the system to unmount the real root device. This will
be necessary for anyone with /usr as a separate partition.
|
|
Avoiding adding a filesystem module to the whitelist when it doesn't
actually exist as a module (in case its compiled in staticly).
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This means that no "setup" of the initramfs is requried on boot,
and this should make testing a lot eaiser by just chrooting into
the ramfs to check if it works.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Add compat symlinks from /bin, /sbin and /usr/sbin, so nothing is lost.
This will make sure that it is not possibly to install two different
versions of the same binary in PATH.
The main usecase of this is that we want to be able to override any
symlink provided by busybox by adding a binary by the same name. With
this patch we don't have to worry in case the busybox symlink and the
binary we add are in different directories; the last binary to be added
always takes precedence.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
This is mainly for avoid this:
[ramfs /]# mount /dev/md0 /mnt/a
[ramfs /]# mount -o bind /mnt/a /mnt/b
[ramfs /]# mount -o bind,remount,ro /mnt/b
warning: can't open /etc/fstab: No such file or directory
[ramfs /]#
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
|
|
* ipconfig cmd writes a file in /tmp that is ready for direct evaluation.
We can use this instead of parsing the output, to do this some variable
renames are needed.
* Add /tmp as part of "base" layout since this can be used by others hooks/cmds.
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
|
|
This is a much better solution than busybox's, as it will move our API
filesystems and /run for us.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Provides /sbin/fsck and any helper binaries to the image. If processed
after the autodetect hook, only the helper for the root FS is added.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Providing this means we no longer need blkid for FS detection, as mount
will do this for us. Adds a slight bloat to the image, in exchange for a
huge convenience. Messaging is changed to assume that /bin/mount will
provide useful feedback for us on failure.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
We always need this in early userspace, so add it as part of the build
process instead of forking at runtime.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
- usb_id and path_id are now builtin functionality of udevadm
- /sbin/udevd moves to /lib/udev/udevd
- update dev PKGBUILD to reflect version requirement
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|