summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Victor Lowther [Tue, 17 Feb 2009 03:16:31 +0000 (19:16 -0800)]
Goodbye, nash. We won't miss you.
This supercedes my previous switch_root patches, and applies on top of davej's
repo at git.kernel.org.
Nash is gone. In its place we have a reasonable switch_root implementation.
Of course, this switch_root is written in some rather hideous shell script,
and relies on some rather dodgy hacks. Rewriting in C would help things out.
However, it should be distro-independent, and it gets the job done.
Victor Lowther [Fri, 13 Feb 2009 12:43:31 +0000 (04:43 -0800)]
[PATCH 50/50] Some documentation updates
Victor Lowther [Fri, 13 Feb 2009 12:43:29 +0000 (04:43 -0800)]
[PATCH 49/50] Modify hook loading to make it slightly easier to script.
Modules are now responsible for loading their hooks into the initrd.
This should be all the structure we need to make it easy for things
to integrate with dracut -- now to document and test it all.
Victor Lowther [Fri, 13 Feb 2009 12:43:26 +0000 (04:43 -0800)]
[PATCH 48/50] Shift some functionality around, make modules maskable.
Most of our functionality is now in scripts that we source rather than in the
main dracut script.
Victor Lowther [Fri, 13 Feb 2009 12:43:24 +0000 (04:43 -0800)]
[PATCH 47/50] Split out the various things we load into their own modules.
This should make it easier for distros to customize things according to
their preferences.
Victor Lowther [Fri, 13 Feb 2009 12:43:21 +0000 (04:43 -0800)]
[PATCH 46/50] fixed library-matching regex
Forgot about /lib64
Victor Lowther [Fri, 13 Feb 2009 12:43:19 +0000 (04:43 -0800)]
[PATCH 45/50] Really die if a library is not found.
Also explain how to find it.
Victor Lowther [Fri, 13 Feb 2009 12:43:16 +0000 (04:43 -0800)]
[PATCH 44/50] Get rid of echoer script
We can use sh -c to accomplish the same goal
Also move cat back on to the list of debugging tools -- all the files we were
using it on in the initrd can use read to accomplish the same goal.
Victor Lowther [Fri, 13 Feb 2009 12:43:14 +0000 (04:43 -0800)]
[PATCH 43/50] Use ldd to find shared library deps.
This replaces the eu-readelf and ld-linux.so.2 hackery.
As a bonus it will keep working if we (for some bizzare reason) need
to load a non-elf executable or shared library on the initrd.
Victor Lowther [Fri, 13 Feb 2009 12:43:12 +0000 (04:43 -0800)]
[PATCH 42/50] Add very basic module functionality to dracut.
Move the i18n stuff to it.
Victor Lowther [Fri, 13 Feb 2009 12:43:09 +0000 (04:43 -0800)]
[PATCH 41/50] dracut will now search for files in the usual binary locations if a
Victor Lowther [Fri, 13 Feb 2009 12:43:07 +0000 (04:43 -0800)]
[PATCH 40/50] Rearranged dracut script to make it easier to split things out for
Victor Lowther [Fri, 13 Feb 2009 12:43:04 +0000 (04:43 -0800)]
[PATCH 39/50] Prefer /bin/dash as /bin/sh on the initrd if it is available.
This is mainly for testing purposes -- if something non-POSIX is added to the
on initrd scripts, dash will die horribly.
Victor Lowther [Fri, 13 Feb 2009 12:43:02 +0000 (04:43 -0800)]
[PATCH 38/50] Missed some non-POSIX substitution in root filesystem label parsing.
Victor Lowther [Fri, 13 Feb 2009 12:42:59 +0000 (04:42 -0800)]
[PATCH 37/50] Try to install file as scripts before installing them as binaries
This ensures that scripts will ahve their interpreter isntalled before
they get installed.
Also included a minor fixup that skips library checking if the binary
we are testing is already installed.
Victor Lowther [Fri, 13 Feb 2009 12:42:57 +0000 (04:42 -0800)]
[PATCH 36/50] Move cat into the list of required executables
Victor Lowther [Fri, 13 Feb 2009 12:42:55 +0000 (04:42 -0800)]
[PATCH 35/50] POSIX-ize all the shell scripts that get installed to the initramfs.
Also install all the scripts using inst, so that we can install the right
shell interpreter for our scripts. We still install bash as well.
Victor Lowther [Fri, 13 Feb 2009 12:42:52 +0000 (04:42 -0800)]
[PATCH 34/50] Use inst to install hooks.
This will ensure that pathname mangling is handled correctly, and that
whatever interpreter is handling /bin/sh is installed as /bin/sh
Victor Lowther [Fri, 13 Feb 2009 12:42:50 +0000 (04:42 -0800)]
[PATCH 33/50] We now have a simple hook structure and 3 defined hook points.
Any script placed in /pre-udev will be sourced just before udev starts
device scanning and loading.
Any script placed in /pre-mount will be sourced just before we try to
mount a root filesystem.
Any script placed in /pre-pivot will be sourced just before we switch to the
new root filesystem.
These hooks should be the minimum needed to add back plymouth and deal with
more advanced filesysem mounting needs (multipath, iscsi, nfs, nbd, etc.)
Victor Lowther [Fri, 13 Feb 2009 12:42:48 +0000 (04:42 -0800)]
[PATCH 32/50] Created pre-mount hook directory
This is for tasks that should run after device discovery, but before
mounting the new rootfs. Things like cryptoroot and resume from hibernate
should go here.
Hooks are sourced, not executed as separate scripts.
Victor Lowther [Fri, 13 Feb 2009 12:42:45 +0000 (04:42 -0800)]
[PATCH 31/50] We no longer require plymouth. Remove it from the spec.
Victor Lowther [Fri, 13 Feb 2009 12:42:43 +0000 (04:42 -0800)]
[PATCH 30/50] We no longer need plymouth.
init will ask for a passphrase directly if an encrypted root is detected.
Also, use udevadm settle with a 30 second timeout instead of a hardcoded
30 count loop.
Victor Lowther [Fri, 13 Feb 2009 12:42:40 +0000 (04:42 -0800)]
[PATCH 29/50] Add echoer script
Victor Lowther [Fri, 13 Feb 2009 12:42:38 +0000 (04:42 -0800)]
[PATCH 28/50] Remove dependency on plymouth for getroot, pass 1.
Victor Lowther [Fri, 13 Feb 2009 12:42:36 +0000 (04:42 -0800)]
[PATCH 27/50] Don't leave cruft behind in /tmp
Victor Lowther [Fri, 13 Feb 2009 12:42:33 +0000 (04:42 -0800)]
[PATCH 26/50] Make init less noisy and load fs modules for all mounted filesystems
Victor Lowther [Fri, 13 Feb 2009 12:42:31 +0000 (04:42 -0800)]
[PATCH 25/50] Add dmesg to the list of debugging tools
Victor Lowther [Fri, 13 Feb 2009 12:42:28 +0000 (04:42 -0800)]
[PATCH 24/50] Replace inst function with a family of specialized functions
This makes things shorter and easier to read.
Victor Lowther [Fri, 13 Feb 2009 12:42:25 +0000 (04:42 -0800)]
[PATCH 23/50] Rip out old recursive module loading, replace with something simpler
bash allows unlimited recursion and several other tricks to make
finding all the dependencies of a kernel module much simpler.
This nukes about 130 lines, most of it in dracut-functions.
This diff also touches some cleanups made in the inst function.
Victor Lowther [Fri, 13 Feb 2009 12:42:22 +0000 (04:42 -0800)]
[PATCH 22/50] Bashify inst function where ot makes things easier to read.
Victor Lowther [Fri, 13 Feb 2009 12:42:20 +0000 (04:42 -0800)]
[PATCH 21/50] Simplified get_dso_deps
This takes advantage of several bash specific constructs to make
get_dso_deps easier to read and understand.
Victor Lowther [Fri, 13 Feb 2009 12:42:18 +0000 (04:42 -0800)]
[PATCH 20/50] set_verbose is not used anywhere. Buh-bye.
Victor Lowther [Fri, 13 Feb 2009 12:42:15 +0000 (04:42 -0800)]
[PATCH 19/50] The function keyword is deprecated. Get rid of it.
Victor Lowther [Fri, 13 Feb 2009 12:42:13 +0000 (04:42 -0800)]
[PATCH 18/50] outfile processing can fit all on one line, so make it.
Victor Lowther [Fri, 13 Feb 2009 12:42:11 +0000 (04:42 -0800)]
[PATCH 17/50] Tighten up the font installation case statement as well.
Victor Lowther [Fri, 13 Feb 2009 12:42:08 +0000 (04:42 -0800)]
[PATCH 16/50] $MNTIMAGE? I thought the install dir was $initdir.
Victor Lowther [Fri, 13 Feb 2009 12:42:06 +0000 (04:42 -0800)]
[PATCH 15/50] Tighten up the keymap installation case statement in dracut.
Victor Lowther [Fri, 13 Feb 2009 12:42:04 +0000 (04:42 -0800)]
[PATCH 14/50] Tighten up conditional checking a bit more.
Use bash-style conditionals where ever it makes things shorter
and easier to read.
Victor Lowther [Fri, 13 Feb 2009 12:42:02 +0000 (04:42 -0800)]
[PATCH 13/50] Missed an instance of $initdir not being quoted.
Victor Lowther [Fri, 13 Feb 2009 12:41:59 +0000 (04:41 -0800)]
[PATCH 12/50] Get rid of some redundancy when sourcing our functions.
Victor Lowther [Fri, 13 Feb 2009 12:41:57 +0000 (04:41 -0800)]
[PATCH 11/50] Quote variable expansion where needed.
Otherwise, spaces in some filenames may make things interesting some fine day.
Victor Lowther [Fri, 13 Feb 2009 12:41:54 +0000 (04:41 -0800)]
[PATCH 10/50] Clean up initialization in dracut.
The source keyword is deprecated, and kernel / outfile are more legible as
conditional lists.
Victor Lowther [Fri, 13 Feb 2009 12:41:52 +0000 (04:41 -0800)]
[PATCH 09/50] Compact option processing.
Most of the options are one-liners, and the shift can be factored out of
the case expression entirely.
Victor Lowther [Fri, 13 Feb 2009 12:41:50 +0000 (04:41 -0800)]
[PATCH 08/50] Don't load commands into the initrd that are built in to bash.
No sense in loading commands that will never be used.
Victor Lowther [Fri, 13 Feb 2009 12:41:47 +0000 (04:41 -0800)]
[PATCH 07/50] Get rid of `` subprocess expansion when killing udevd.
$() subprocess expansion is so much easier to read.
Victor Lowther [Fri, 13 Feb 2009 12:41:45 +0000 (04:41 -0800)]
[PATCH 06/50] Bashify results testing for selinux policy loading
Victor Lowther [Fri, 13 Feb 2009 12:41:42 +0000 (04:41 -0800)]
[PATCH 05/50] Rewrite the mount loop using bash-specific features.
This makes the loop slightly more compact and easier to read.
Victor Lowther [Fri, 13 Feb 2009 12:41:40 +0000 (04:41 -0800)]
[PATCH 04/50] Modify root cmdline parsing to use a case statement.
This code takes less space and is easier to read at a glance.
Victor Lowther [Fri, 13 Feb 2009 12:41:38 +0000 (04:41 -0800)]
[PATCH 03/50] Use getarg to get the root kernel commandline parameter.
Victor Lowther [Fri, 13 Feb 2009 12:41:32 +0000 (04:41 -0800)]
[PATCH 02/50] Add a simple getarg function.
If we ever need to get more than one kernel command line argument, this
function will pay for itself. It relies on a feature of the way bash
handles string comparisons in [[ ]] statements -- the RHS is matched
according to globbing rules, and is not a straight string match.
Victor Lowther [Fri, 13 Feb 2009 12:41:29 +0000 (04:41 -0800)]
[PATCH 01/50] We have a path. Do not specify full paths to commands that are in it.
Jeremy Katz [Mon, 19 Jan 2009 21:00:24 +0000 (16:00 -0500)]
Slightly more reasonable timeout
Jeremy Katz [Mon, 19 Jan 2009 20:57:34 +0000 (15:57 -0500)]
Also rescan after each new lvm2 member appears so we can find all devs
Jeremy Katz [Mon, 19 Jan 2009 20:57:18 +0000 (15:57 -0500)]
Don't use deprecated git-* commands
Jeremy Katz [Mon, 19 Jan 2009 18:57:09 +0000 (13:57 -0500)]
Import volume info here too (noticed by wtogami with root-on-crypt-lv)
Bill Nottingham [Sat, 10 Jan 2009 19:59:13 +0000 (14:59 -0500)]
Go to an emergency shell if mounting the root filesystem fails.
Bill Nottingham [Sat, 10 Jan 2009 19:59:11 +0000 (14:59 -0500)]
Fix 'root=LABEL=/'
As you can't have /dev/disk/by-label//, we need to escape the '/'
character in the same way that udev does.
Bill Nottingham [Sat, 10 Jan 2009 19:59:12 +0000 (14:59 -0500)]
Fix tense.
Jeremy Katz [Mon, 5 Jan 2009 20:50:00 +0000 (15:50 -0500)]
Now that module dependencies work, we don't have to list as much
Jeremy Katz [Mon, 5 Jan 2009 20:45:39 +0000 (15:45 -0500)]
Fix module dependency handling
Module dependency handling wasn't being followed correctly; fix it
Jeremy Katz [Mon, 5 Jan 2009 20:42:56 +0000 (15:42 -0500)]
Clean up noise from eu-readelf
Jeremy Katz [Mon, 5 Jan 2009 19:40:34 +0000 (14:40 -0500)]
Add first pass of keyboard/console font setup
First pass of keyboard/console font setup. This ends up being Fedora/RHEL
specific as everyone specifies these things in a different place
Jeremy Katz [Mon, 5 Jan 2009 19:39:35 +0000 (14:39 -0500)]
Fix typo with local mode installing switch_root
Jeremy Katz [Mon, 5 Jan 2009 18:24:46 +0000 (13:24 -0500)]
Update the documentation a bit for current status
Jeremy Katz [Mon, 5 Jan 2009 18:16:39 +0000 (13:16 -0500)]
Basic support for loading SELinux from the initramfs
Jeremy Katz [Mon, 5 Jan 2009 17:46:39 +0000 (12:46 -0500)]
Stop depending on nash to find the program interpreter; use eu-readelf instead
Jeremy Katz [Fri, 19 Dec 2008 19:44:38 +0000 (14:44 -0500)]
Add a spec file for rpm building
Jeremy Katz [Fri, 19 Dec 2008 19:43:46 +0000 (14:43 -0500)]
Handle rules.d being from the installed location
Jeremy Katz [Fri, 19 Dec 2008 19:43:30 +0000 (14:43 -0500)]
Fedora calls --allow-missing as an arg to mkinitrd; noop it
Jeremy Katz [Fri, 19 Dec 2008 19:43:06 +0000 (14:43 -0500)]
plymouth calls set_verbose(), no noop it
Jeremy Katz [Thu, 18 Dec 2008 20:59:55 +0000 (15:59 -0500)]
Fix shebang at the top of the file
Jeremy Katz [Thu, 18 Dec 2008 20:58:15 +0000 (15:58 -0500)]
Add a makefile
Jeremy Katz [Thu, 18 Dec 2008 20:57:47 +0000 (15:57 -0500)]
Make using the version from the current directory explicit
Rather than looking at the contents of the current directory always, require
explicitly specifying --local to use those files
Jeremy Katz [Thu, 18 Dec 2008 20:55:28 +0000 (15:55 -0500)]
Handle locations where we'll be installing files
Handle that files will be in different places once installed
Jeremy Katz [Wed, 17 Dec 2008 22:51:15 +0000 (17:51 -0500)]
Make the generator start to be functional on a "real" system
Start to pull in modules from the system rather than the crude hack of
everything in a tree and explicitly list some classes of modules
including what's needed for dm-crypt
With this, I am now running a dracut initramfs on my laptop
Jeremy Katz [Wed, 17 Dec 2008 21:57:43 +0000 (16:57 -0500)]
Add some basic functions used for the initramfs
Add some functions used by the initramfs generator from Fedora's mkinitrd with
bits and pieces stripped out. This needs a closer look to ensure that we're
not bringing along any other old baggage
Jeremy Katz [Wed, 17 Dec 2008 21:56:51 +0000 (16:56 -0500)]
rstrode built a new plymouth with the changes, so we can drop that make install
Jeremy Katz [Wed, 17 Dec 2008 21:56:28 +0000 (16:56 -0500)]
Move generator to be called 'dracut'
Jeremy Katz [Wed, 17 Dec 2008 19:55:20 +0000 (14:55 -0500)]
let mount auto-determine the fs type
Jeremy Katz [Wed, 17 Dec 2008 18:16:12 +0000 (13:16 -0500)]
Now called dracut; add info about the mailing list
Jeremy Katz [Wed, 17 Dec 2008 18:15:55 +0000 (13:15 -0500)]
Add pointer to Peter's switchroot
Jeremy Katz [Tue, 16 Dec 2008 22:24:59 +0000 (17:24 -0500)]
Update the README and add some docs for TODO and HACKING
Jeremy Katz [Tue, 16 Dec 2008 21:56:28 +0000 (16:56 -0500)]
Sleep forever instead of exiting so you can scroll back
Jeremy Katz [Tue, 16 Dec 2008 19:29:43 +0000 (14:29 -0500)]
Don't run udevsettle; instead, we keep looking for the rootfs
Jeremy Katz [Tue, 16 Dec 2008 19:29:07 +0000 (14:29 -0500)]
Cut down to only creating the nodes that plymouth actually needs
Jeremy Katz [Tue, 16 Dec 2008 19:25:06 +0000 (14:25 -0500)]
Bump timeout to five minutes since people could be using encrypted root
Jeremy Katz [Tue, 16 Dec 2008 19:21:08 +0000 (14:21 -0500)]
Support root on LUKS (dm-crypt)
Support having root on LUKS with the password prompting handled by plymouth.
This requires ensuring our input is from /dev/console and also requires that
we import vol_id info about all block devices rather than ignoring dm devs
(which is what the persistent storage rules do by default)
Jeremy Katz [Tue, 16 Dec 2008 19:19:52 +0000 (14:19 -0500)]
Add some modules
dm-crypt support requires that we have some modules, so add some basic
support for copying over a module tree for testing
Jeremy Katz [Mon, 15 Dec 2008 21:10:51 +0000 (16:10 -0500)]
Add plymouth support
Add basic support for the use of plymouth in the new initrd world. Also
includes a hack at the moment to install from a local plymouth tree to make
testing easier
Jeremy Katz [Mon, 15 Dec 2008 19:40:36 +0000 (14:40 -0500)]
Some debugging helpers
Install terminfo files so that less is useful. Also, timeout mounting
the rootfs so that we can debug better
Jeremy Katz [Mon, 15 Dec 2008 19:07:55 +0000 (14:07 -0500)]
Add the basics for LVM support
For LVM, we need to do activation of the volume group within the initrd.
Stick lvm tools into the initrd as well as a (basic and stupid) udev rule
to run vgchange -ay. Ultimately we want to get a better rule for this into
udev proper
Jeremy Katz [Mon, 15 Dec 2008 18:33:54 +0000 (13:33 -0500)]
Various fixes to make things work; also listen to root=
Apparently what I had committed was broken. This fixes some pieces up
and also adds (basic) support for using root=
Jeremy Katz [Wed, 10 Dec 2008 22:17:09 +0000 (17:17 -0500)]
Kill udevd
Jeremy Katz [Wed, 10 Dec 2008 21:36:31 +0000 (16:36 -0500)]
And licensing...
Jeremy Katz [Wed, 10 Dec 2008 21:35:29 +0000 (16:35 -0500)]
Having a README is always nice
Jeremy Katz [Wed, 10 Dec 2008 21:32:21 +0000 (16:32 -0500)]
Initial commit
First pass at a new initrd implementation. Right now, it's a very simple
/init and we use nash's switchroot command via switch_root. The idea is to
get a switchroot binary into util-linux that can be used instead
generate.sh will let you generate an initrd image. Note that the generator
is intentionally super simple right now and is an area that will need a lot
of work once we're happier with how the /init process runs