Age | Commit message (Collapse) | Author | Files | Lines |
|
Possible options are 'skip' and 'force' which are synonyms for fastboot
and forcefsck, respectively.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
I don't want to make a habit of treating cmdline opts as special if they
don't need to be, and this is a case where some simple PE magic can be
substituted.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Applies to both the real root and any device that's mounted on /usr
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Relying on blkid to do tag resolution will fail when the root device
doesn't yet exist. This is, of course, bad for USB root devices.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Move this logic inside fsck_device as well, so that fastboot skips a
possible fsck on the /usr partition as well.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
our fsck_ret function would always return true when passed 0, which
clearly isn't what we want. Use a simple string compare instead.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
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>
|
|
Fixes FS#27385
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
* Directly assign ro or rw to the rwopt rather than using readwrite as an
intermediary
* Use a default expansion to cut out an if block in determining the root
fstype.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
If we encounter a BOOT_IMAGE var taken from grub2, the first character
could be a '(' which will throw off busybox's parser and error out.
Reverse the comparison so that the LHS is always a constant, which can
be compared to anything (including nothing at all).
Fixes FS#26119.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
syntax errors in a later mount command
Fixes FS#24969.
|
|
We were never very consistent about this anyways.
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>
|
|
devtmpfs is not used.
|
|
/sys/class/block contains all of our block devices, including the
partitions of each parent block device, so directly check for the
existance of the dev file rather than looping.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
use blkid to resolve a tag name to a block device.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
This should properly handle all ugly characters in values,
omit settings any forbidden variable names and take care
of double-quoted values with spaces in them.
This should finally fix FS#23467, FS#22080 and FS#13900.
|
|
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.
|
|
Fixes FS#21314
|
|
This reverts commit 9ef825cedd8228957f9bdd8df7ae543afd7e0001.
The introduced change was inconsistent with the standard 'mount' behaviour and
caused lots of confusion among LVM users.
|
|
It seems ash follows symlinks with -b.
|
|
If a symlink such as /dev/disk/by-uuid/xxxxx is provided on the kernel cmdline,
resolve it and mount that device instead of the symlink. This prevents some
ugliness in the output of commands such as mount or df.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
remove more eval hacks
|
|
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.
|
|
|
|
rootdev variable
This is nicer and more explicit than before, based on a patch by Benjamin Richter
|
|
|
|
|
|
|
|
|
|
mount handler (default_mount_handler)
|
|
exist on it, bail out instead of panicing
In these cases, we will exec /bin/sh, such that manual recovery is still possible as sh has PID 1
An expert might be able to mount and switch_root manually. In any case, this is less scary than a panic and a useless trace.
|
|
|
|
|
|
See `man dash`
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
If we have a symlink, we don't check further if it points to a block device, partially due to klibc's readlink being broken.
|
|
|
|
and the hooks
|