Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
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>
|
|
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>
|
|
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>
|
|
We'll use this as a channel to communicate with later userspace.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Remove this ancient relic. It's not been needed in a very long time.
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>
|
|
This is required for busybox 1.19.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
An empty file will be created in any case, does not cause any harm, but for correctness.
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
|
|
This is already done in initscripts so we mirror it here.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Add in 'premount' and 'postmount' as trigger conditions, but also leave
in the old 'y' value as a synonym for premount.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
when one is set to " "
|
|
These don't really serve a purpose and might actually munge a test for
an unset var. Declare vars as we need them, substituing with default
expansions where possible.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
We were never very consistent about this anyways.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
* 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 also adds a /bin/bash shebang to functions. While not technically
necessary, this ensures that vim gives us the correct syntax highlight
file.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
This is harmless when it fails, but it might alarm users.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
devtmpfs is not used.
|
|
We preserve TERM, but everything else can be destroyed from the
environment. Without preserving TERM, the value is reset to 'dumb' in
userspace, and we get false readings by the initscripts on terminal
capabilities.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
This is no longer supported, as m-i-t supports modprobe.blacklist=
syntax on the kernel cmdline. We load all modules from the config at
once with --all and --use-blacklist flags in order to honor the cmdline
blacklisting.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
>From udev NEWS:
The running udev daemon can now cleanly shut down with:
udevadm control --exit
Udev in initramfs should clean the state of the udev database
with: udevadm info --cleanup-db which will remove all state left
behind from events/rules in initramfs. If initramfs uses
--cleanup-db and device-mapper/LVM, the rules in initramfs need
to add OPTIONS+="db_persist" for all dm devices. This will
prevent removal of the udev database for these devices.
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
|
|
This brings it in line with initscripts (and systemd), there should be no need for everyone to have write access to the /run folder.
Reported-by: Pierre Schmitz <pierre@archlinux.de>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
|
|
The kernel command line allows quoted strings with whitespace in them. Until now,
such parameters would crash /init and cause a kernel panic.
Move parsing into a function and use the 'set' builtin to split /proc/cmdline
into arguments.
Fixes FS#13900 and FS#22080.
|
|
- Remove ":: Loading initramfs" message
- Start udev after command line parsing, so quiet will be respected
|
|
Mount /run as a 10MB tmpfs with 1777 permissions early. Move it to /new_root
when switching.
|
|
- Loop over dev, sys, proc instead of repeating the same command.
- If the target directory does not exist, umount instead of moving.
|
|
42e8dba5dce4879e4a372c5c2fb5446b4e8bb16c.
|
|
|
|
This is the counterpart to a similar patch to initscripts, making sure that the change applies regardless of whether initrd is used.
Thanks to David Reisner for pointing out that this was needed.
|
|
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.
|
|
before switch_root
|
|
the real root
|
|
Devices will never "magically" appear when udevd is not running. Thus,
poll_device now exits instantly when a device when udevd is not running.
The return value is unchanged, just the delay is removed.
Assuming that the drive is available just after loading the module is
unsafe. However, "fast" devices like most (all?) pata/sata seem to
work this way for many people. On "slow" devices like USB, we still
have to wait - those will not work without udev.
|
|
|
|
mount point
The old check couldn't distinguish different tmpfs mounts and failed to work with aufs (archiso).
This check is actually the same one that busybox/switch_root uses to determine where
to stop deleting files. If this check fails and we still launch switch_root it may start
deleting data.
|
|
|
|
mount handler (default_mount_handler)
|
|
Instead of having special NFS code in /init, make it possible for a hook to register a mount handler
When a hook sets the mount_handler environment variable, the normal mount code will be skipped and
the handler will be called with the path to mount point as the first and only argument.
|
|
terminate before continuing
|