summaryrefslogtreecommitdiffstats
path: root/install
AgeCommit message (Collapse)AuthorFilesLines
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>
2012-01-29fsck: fix copypasta error in picking /usr fsck helperDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-28autodetect: remove hack to exclude {ata,ide}-genericDave Reisner1-1/+1
In particular, skipping ata-generic causes some macbooks to not boot. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-28avoid absolute paths in add_binary callsDave Reisner4-9/+9
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>
2012-01-28install/base: drop support for m-i-tDave Reisner1-1/+6
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>
2012-01-28fsck: add helper for usr if different fs from rootDave Reisner1-2/+7
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-13autodetect: try to find /usr partition fstypeDave Reisner1-2/+11
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-13base: add findmnt as a part of the base layoutDave Reisner2-1/+2
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>
2012-01-13udev: update for udev 176Dave Reisner1-2/+2
- firmware handling is now a udevd builtin - udevadm may move -- let a path lookup find it Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-12dsdt: remove hook. this has been defunct for yearsDave Reisner1-14/+0
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>
2012-01-05shutdown: add new hook0.8.1Dave Reisner1-0/+17
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.
2012-01-05autodetect: check for rootfs module existanceDave Reisner1-1/+6
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>
2012-01-05mkinitcpio: remove hardcoded pathsDave Reisner1-2/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-29busybox: create symlinks manuallyTom Gundersen1-0/+5
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>
2011-11-29move all binaries to /usr/binTom Gundersen1-1/+5
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>
2011-11-29install/base: Add an empty fstabGerardo Exequiel Pozzi1-0/+3
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>
2011-11-29hooks/net: Refactor and remove sed cmd usage.Gerardo Exequiel Pozzi1-1/+1
* 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>
2011-11-15use util-linux's switch_root binaryDave Reisner1-0/+1
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>
2011-11-15install/fsck: new install hook to add fsck and helpersDave Reisner1-0/+32
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>
2011-11-15init: use util-linux's /bin/mountDave Reisner1-0/+3
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>
2011-11-15autodetect: store rootfstype for use by other hooksDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-22install/base: include new_root as part of build processDave Reisner1-1/+1
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>
2011-10-20install/udev: relocate udevd for udev 174Dave Reisner1-2/+2
- 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>
2011-10-16install/pcmcia: fix syntax error (missing &&)Dave Reisner1-1/+1
Fixes FS#26427. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-16mkinitcpio: avoid stomping on TMPDIR from the environmentDave Reisner1-1/+1
cc36db45 was a bit too strict about localizing variables and blew out TMPDIR, which might be a legit variable sourced from the calling environment. Restore this behavior with a bit of refactoring, and additionally add in a check to make sure the temporary directory is writeable before proceeding. Fixes FS#26373. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-10install/base: grab usb-ehci udev rule to /lib0.7.4Dave Reisner1-1/+1
Done as part of FS#25788. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01Add a virtio hook0.7.3Sebastien Luttringer1-0/+15
This allow initcpio to boot vm which use virtio as network/disk backend. Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-09-27functions: allow ignoring errors on module additionDave Reisner9-13/+12
We conditionally, but naively, add modules in some of our install hooks, but the kernel may not have these. Note that these modules can fail silently by detecting a '?' suffix on the module name. In conjunction with this, the add_module function now takes a flag, -t or --try, which will ignore module not found errors from modinfo. The config file will also support this syntax. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27base: remove superfluous leading /Dave Reisner1-1/+1
The doubled up leading slashes annoy me in the verbose output. Signed-off-by: Dave Reisner <dreisner@archlinux.org>