summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-01-13init: drop support for non-devtmpfs0.8.2Tom Gundersen1-12/+1
udev does not support this as of udev-176, so there is no point in pretending it will work. This also drops devtmpfs_mounted=1, so any custom hooks that use this would have to be updated (no official hooks are affected). Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-01-13Update PS1 ramfs -> rootfsGerardo Exequiel Pozzi1-1/+1
This is cosmetic change, but using rootfs is more correct than ramfs. [Rootfs is a special instance of ramfs or tmpfs, if that is enabled] Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2012-01-13autodetect: try to find /usr partition fstypeDave Reisner1-2/+11
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-13init: mount separate /usrDave Reisner2-1/+10
Use findmnt to detect the existance of a separate /usr partition existing in the real root. If it does exist, fetch the options for it and mount it. This currently makes a lot of assumptions and won't be very friendly towards something such as a dm-crypt device. 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 Reisner2-3/+3
- 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-11Keep modules.devname needed for on-demand module loadingGerardo Exequiel Pozzi1-2/+2
Otherwise we need to modprobe module manually. (Particulary I need this for archiso for using /dev/loop-control) Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2012-01-05shutdown: add new hook0.8.1Dave Reisner4-1/+54
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-05mkinitcpio: include modules.{builtin,order} for depmod callDave Reisner1-1/+6
When present, modules.order will allow depmod to order the binary module indicies for faster lookups and more deterministic behavior in resolving aliases. We can discard this file from the buildroot after depmod is called. modules.builtin.bin is added as well (generated from modules.builtin), to allow modprobe to not fail when a symbol is provided as a builtin. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-05function: suppress errors from modprobeDave Reisner1-1/+1
kmod is a bit noisier about unresolvable aliases, but we don't really care for the purposes of creating the module whitelist. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
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 Reisner2-3/+3
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-26mkinitcpio: avoid color when stdout isn't a ttyDave Reisner1-1/+1
Follow suit with lsinitcpio (change 0495018d) and make output colorless on redirecting/piping stdout. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-26lsinitcpio: remove duplicate in_array functionDave Reisner1-9/+0
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-26functions: display proper name on file not foundDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-17ensure MODULEDIR is declared with a trailing slashDave Reisner1-1/+1
This forces bash tests as well as utilities like find to dereference MODULEDIR in the odd case that it's a symlink. Addresses FS#27494 Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-16lsinitcpio: cleanup binary displayDave Reisner1-1/+1
- trim leading paths from all binaries - sort alphabetically - add same trailing indent as the module display Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-15init: create /run/initramfs as mode 755Dave Reisner1-1/+1
init doesn't set a umask, so this was previously created as world writable and sticky. Reported-by: Thomas Bächler <thomas@archlinux.org> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-15functions: don't fail on add_binary adding a non-binaryDave Reisner1-1/+1
The function did its job, it just isn't going to add any deps. This makes add_binary effectively a slightly more costly version of add_file. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-05lsinitcpio: read VERSION stamp out of image fileDave Reisner1-1/+4
Report this version on -a if it's found. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-05mkinitcpio: add VERSION stamp to imageDave Reisner1-1/+6
This is mostly a debugging aid. lsinitcpio will be taught to read this. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-01init_functions: redirect poll_device output to stderrDave Reisner1-1/+1
Fixes FS#27385 Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-29busybox: create symlinks manuallyTom Gundersen2-2/+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 Gundersen2-4/+7
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-29mkinitcpio: parse vars from config file lastDave Reisner1-2/+10
This lets the config file be an override for any files or binaries added by hooks. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-29lsinitcpio: columnize binaries outputDave Reisner1-3/+3
Now that we're including symlinks to busybox on the prebuilt image, this display needs a bit of tidying up. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-29functions: don't allow add_binary to re-add depsDave Reisner1-1/+1
Since we now silently overwrite instead of silently failing on existing files and symlinks, we have a lot of sodeps which are overwritten by various binaries -- udevd and udevadm being one example. Nip this in add_binary by doing our own check and preventing addition of pre-existing files in the $BUILDROOT. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-29functions: add verbose output for overwriting filesDave Reisner1-3/+14
This goes in hand with an earlier commit which changed behavior to silenltly overwrite files rather than silently fail. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-29add_{file,symlink}: overwrite existing fileTom Gundersen1-3/+1
Now we fail silently if the file exists, which means there is no easy way to overwrite binaries. I think it makes the most sense to do the following: 1) add all the busybox stuff as a basic system; 2) overwrite some of the links with any binaries we add to base hook; 3) allow users to write their own hooks to overwrite even more stuff. This can now be done by this hook. v2: make sure we are able to overwrite a symlink pointing to a directory Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-11-29mkinitcpio: warn when no modules are added to the imageDave Reisner1-0/+2
Maybe something went wrong with depmod after a kernel install, or the user grabbed a kernel directory for an old kernel. Either way, if you're using an initramfs, there's a very high probability that you'll have at least 1 module on it. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-29init_functions: rephrase bailout messageDave Reisner1-1/+1
I think this error is more confusing to most people than it needs to be, and it's not really accurate any longer. Generalize the message and inform the user that we simply couldn't find the root device. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-29init: remove size limitations from API filesystemsDave Reisner1-3/+3
These are all root owned, so we don't need to be concerned about DoS attacks via these FS's. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
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/resume: Remove cut cmd usageGerardo Exequiel Pozzi1-1/+2
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-29hooks/net: Add BOOTIF supportGerardo Exequiel Pozzi1-1/+15
This feature was present in archiso_pxe_nbd for a long time. it avoids to configure more than one device (if present) by ipconfig with the same parameters. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-29hooks/net: Refactor and remove sed cmd usage.Gerardo Exequiel Pozzi2-48/+18
* 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-26init: Remove unneeded test0.8.0Gerardo Exequiel Pozzi1-5/+3
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-16init: Remove sed cmd usageGerardo Exequiel Pozzi1-1/+1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-16init: Remove grep usageGerardo Exequiel Pozzi1-2/+1
The only downside is on systems where devtmpfs is not enabled will see and error message, anyway /dev will be tmpfs as fallback like now. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-15use util-linux's switch_root binaryDave Reisner2-8/+2
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-15init_functions: simplify parse_cmdlineDave Reisner1-21/+19
Do variable name validation via the case labels rather than via PEs. This frees up the fallthrough case to simply ignore things we don't understand (and not exist). 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-15fsck: implement basic fsck supportDave Reisner2-4/+70
This adds support for fsck'ing root at bootstrap if the fsck binary and necessary helpers are included. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-15init_functions: resolve M:m to device fileDave Reisner1-3/+19
Rather than immediately defaulting to /dev/root, attempt to resolve the major/minor pair back to a block device. If we can't do this properly, then fallback to /dev/root. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-15init_functions: generalize resolve_deviceDave Reisner1-41/+49
This allows a caller to pass in a device by name and get a /dev node returned. Note that this is heavily limited in that only the root device can be identified by major:minor. This might break init's API, if such a thing exists. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-15init_functions: move root resolution to separate functionDave Reisner1-1/+5
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-15init: use util-linux's /bin/mountDave Reisner2-13/+5
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-11-15init_functions: refactor poll_deviceDave Reisner1-11/+12
Beyond stylistic cleanup, add a conditional to ensure that we don't show the 'waiting for device' message if it already exists. Signed-off-by: Dave Reisner <dreisner@archlinux.org>