Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Done as part of FS#25788.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
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>
|
|
The doubled up leading slashes annoy me in the verbose output.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
We can't let add_file get its hands on the config file, because we need
to be sure that an absolute path is honored. As a side effect, ensure
that $BASEDIR is appended to the config file during preset processing.
Thanks-to: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
* Create only the directories that are necessary. If others are
needed, they'll be created along the way. As part of this, we create
/new_root sooner in init, so it's less jarring to the user if they
request a break.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
This was only ever used in the base layout, and it's not needed.
devices will be present if we're using devtmpfs, and created for us by
init if we mount on tmpfs.
Also, this is part of our move towards using bsdcpio instead of
gen_init_cpio, and as a side effect we can no longer support this. Any
devices that need to be created should be done so by the runtime hooks,
not the install time hooks.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
This is an unfortunate name clash with a common utility and should be
avoided. Rename the install function to 'build' and warn the user when
we discover a hook using an 'install' function.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
Mount /run as a 10MB tmpfs with 1777 permissions early. Move it to /new_root
when switching.
|
|
These devices might be actually needed before (dev)tmpfs is mounted,
for example when uvesafb is built into the kernel (no module). By
creating them in the image, they will be present as soon as initramfs
has been extracted. Fixes https://bugs.archlinux.org/task/19903.
|
|
These devices used to be present because they were added in the image.
Since we now mount {dev,}tmpfs early in initramfs, the devices from
the image will be invisible. In the tmpfs-case, create the devices
manually so everything will be in order until udev is started, or
if udev isn't used at all.
|
|
|
|
use busybox/switch_root for the final step. TODO: NFS
|
|
Remove klibc-isms from base and init (except kinit, which will be done in a later commit)
Install busybox to the initramfs and change /init so it can be used with busybox
|
|
usb-load-ehci-first.conf
|
|
and the hooks
|
|
|
|
|
|
allows people to use uvesafb earlier.
|
|
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@209 880c04e9-e011-0410-abf7-b926e227c9cd
|
|
- added compatibility symlink /bin/modprobe
- 0.5.14 release
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@206 880c04e9-e011-0410-abf7-b926e227c9cd
|
|
- fix some bugs introduced by phrakture (could you be more careful?)
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@204 880c04e9-e011-0410-abf7-b926e227c9cd
|
|
- added -m to print a message before passing control to kinit
- added earlymodules= to preload modules
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@187 880c04e9-e011-0410-abf7-b926e227c9cd
|
|
* Moved 'init' to /lib/initcpio/init to be more in-tune
with the naming scheme
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@27 880c04e9-e011-0410-abf7-b926e227c9cd
|
|
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@22 880c04e9-e011-0410-abf7-b926e227c9cd
|
|
880c04e9-e011-0410-abf7-b926e227c9cd
|
|
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@9 880c04e9-e011-0410-abf7-b926e227c9cd
|
|
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@7 880c04e9-e011-0410-abf7-b926e227c9cd
|