summaryrefslogtreecommitdiffstats
path: root/install
AgeCommit message (Collapse)AuthorFilesLines
2013-05-02shutdown: include umount from util-linux0.14.0Dave Reisner1-0/+1
This is needed for the --recursive flag. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-03-13autodetect: allow whitelisting by MODULE_FS_ALIASDave Reisner1-3/+5
Linux 3.9 adds a filesystem alias in the supporting module in the form of fs-$filesystem. While this is mainly aimed at security/paranoia, it does mean that we can make better use of the fact that we always resolve filesystem as aliases to filesystem modules. Do an additional lookup in add_if_avail to resolve the new alias in addition to the filesystem name itself. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-02-11fsck: add fsck config if it existsDave Reisner1-3/+8
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-04install/block: move TI flash media drivers to autodetectDave Reisner1-2/+2
Some of these modules have modaliases which can be picked up by whitelisting. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-12-28hooks: rename 'usbinput' to 'keyboard' and add more modulesTom Gundersen2-28/+32
Make the hook a bit more generic by including non-usb keyboard drivers. This should mean that any keyboard will now work in the initramfs. In addition to fixing some uncommon setups requiring additional keyboard modules, this would allow us to no longer build in the atkbd module (and hence i8042) in our stock kernels, which will remove an ugly error message on boot for systems without the i8042 controller. Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-12-02consolefont: fix reference to consolefont variableDave Reisner1-4/+4
Broken by ac8499c08279b05d. FS#32935. https://bbs.archlinux.org/viewtopic.php?id=153982 Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-26modconf: add new hook to simply inclusion of modprobe configDave Reisner1-0/+15
Add this as a default in the config file. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-26merge most storage hooks into a single 'block' hookDave Reisner8-138/+52
As the autodetect hook gets better with every kernel release, we can "afford" to remove the needless segregation of block device driver hooks and simply merge all the "vanilla" or "unstacked" block device drivers. This should make a lot of setups, like usb or virtio, easier as you won't need to remember to add the hook. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-24drop support for reading /etc/rc.confDave Reisner2-10/+4
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-24usbinput: use autodetection on newer kernelsDave Reisner1-2/+13
This is a partial "revert" of 822a88700e since kernels as of 3.5 add module aliases for hid devices. Fixes FS#32575. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-10-21install/ide: remove this crufty old hookDave Reisner1-15/+0
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-10-21convert autodetect cache to hashDave Reisner1-17/+21
If mkinitcpio -s is run, we still flush this cache to disk before exiting. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-10-07commit to some level of style in variable namingDave Reisner1-8/+9
This is an ugly patch, and probably does more than I'd like it to. The idea is that mkinitcpio adopts some sort of consistent style which I'm actually happy with. I define 3 kinds of variables: 1) local variables: all lower case, and scoped within functions. Use freely, as they're well contained. 2) global variables: these are known to mkinitcpio internally, but are global in scope. They mainly carry runtime configuration and collected data during the image generation process. These are always lower case, but carry a leading underscore to denote that they're global. 3) "API" variables: also global in scope, but exist "outside" of mkinitcpio -- either drawn in from the configuration file, or "exported" to the install hooks. These are always all upper case. When introducing new variables, extreme care must be taken to pick names that will not conflict with the environment inherited by mkinitcpio. A HACKING file is introduced with a similar description of the above, and more. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-09-17install/base: update help verbiageDave Reisner1-2/+2
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>
2012-09-17install fstab/mtab as part of base layoutDave Reisner1-5/+0
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>
2012-08-11install/consolefont: support .fnt filesDave Reisner1-2/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-07-29autodetect: fix wrong flag passed to modprobe0.10Dave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-07-28implement --moduleroot optionDave Reisner1-1/+1
This might be useful for creating an initramfs image as part of a kernel package. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-07-15initalize buildroot later, and out outside of hooksDave Reisner1-10/+1
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>
2012-07-15add 'strip' install hookDave Reisner1-0/+32
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>
2012-06-08avoid reliance on sed, embrace awkDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-18usr: add usr mounting as a late running hookDave Reisner3-1/+17
Mount separate /usr partitions voluntarily, as a late running hook. This is an unfortunate patch that will no doubt result in some hatemail, though it won't thoroughly break anyone to the point of not booting. As a side effect, findmnt is no longer a requisite of the core /init, so move it to the shutdown and usr hooks where it's required. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-18shutdown: package as 644, install as 755Dave Reisner1-1/+1
There's no need to keep this mildly dangerous script executable on the filesystem. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-18mkinitcpio: write image config after install hooksDave Reisner1-15/+0
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>
2012-05-18use new API for install hooksDave Reisner16-45/+48
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-16mmc: package as mode 644, not 755Dave Reisner1-0/+0
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-16document special kernel cmdline parametersDave Reisner1-0/+4
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-12mkinitcpio: remove --basedir optionDave Reisner4-10/+10
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>
2012-05-03remove 'net' hooks. these belong to mkinitcpio-nfs-utils0.8.8Dave Reisner1-106/+0
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-02ensure that cmdline added hooks are run properly in early initDave Reisner1-1/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-02fsck: try harder to find fsck binariesDave Reisner1-2/+2
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>
2012-04-22mmc: add install hookDave Reisner1-0/+19
Thanks to Radoslaw Nadstawny (Rad3k) for writing this. Satsifies FS#21022. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09btrfs: delete hooks -- these belong to core/btrfs0.8.7Dave Reisner1-15/+0
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09mdadm: fix raid[456] autodetectionDave Reisner1-1/+1
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>
2012-04-04hooks: remove pcmcia hookTom Gundersen1-22/+0
This hook has been moved to the pcmciautils package. Signed-off-by: Tom Gundersen <teg@jklm.no> Acked-by: Dave Reisner <d@falconindy.com>
2012-04-04fix pcmcia /usr moveTobias Powalowski1-3/+3
2012-04-02create /lib as a symlink to /usr/lib0.8.6Dave Reisner1-0/+1
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>
2012-04-02base: move usb modprobe rule to /usr/lib/modprobe.dDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-02autodetect: simplify mdadm autodetectionDave Reisner1-23/+5
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>
2012-03-28fsck: leverage blank /etc/fstab included by baseDave Reisner1-1/+1
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>
2012-03-26shutdown: disassemble devices on shutdownDave Reisner1-1/+1
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>
2012-03-24natively support locale.conf and vconsole.confDave Reisner2-7/+26
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>
2012-03-16memdisk: fix udev rule pathGerardo Exequiel Pozzi1-1/+1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2012-03-04add support for HOOKDIR/INSTDIR as arraysDave Reisner2-5/+5
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>
2012-03-03install/fsck: use fsck.ext4 for ext[234]Dave Reisner1-2/+12
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>
2012-02-27install/autodetect: avoid adding empty rootfstypeDave Reisner1-5/+5
Make the logic similar to how we treat usrfstype. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-02-22use --tab-file flag for findmnt -sDave Reisner1-1/+1
Behavior changed in util-linux commit 2f1ac44b4b. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-02-22autodetect: resolve guessed filesystem modulesDave Reisner1-2/+8
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>
2012-02-11autodetect: refactor raid device detectionDave Reisner1-6/+22
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>
2012-02-08udev: remove hooksDave Reisner1-26/+0
These should belong to the udev package. Signed-off-by: Dave Reisner <dreisner@archlinux.org>