* Add the module tools, util-linux and the kernel modules to the
initrd. Of course, the next step is to only add the kernel modules that we're going to need. svn path=/nixu/trunk/; revision=6934
This commit is contained in:
parent
707dd20538
commit
23381ed03f
|
@ -9,10 +9,25 @@ echo
|
|||
export PATH=/empty
|
||||
for i in @path@; do
|
||||
PATH=$PATH:$i/bin
|
||||
if test -e $i/sbin; then
|
||||
PATH=$PATH:$i/sbin
|
||||
fi
|
||||
done
|
||||
|
||||
# Mount special file systems.
|
||||
mkdir /etc # to shut up mount
|
||||
touch /etc/fstab # idem
|
||||
mkdir /proc
|
||||
mount -t proc proc /proc
|
||||
mkdir /sys
|
||||
mount -t sysfs sys /sys
|
||||
|
||||
# Create device nodes in /dev.
|
||||
source @makeDevices@
|
||||
|
||||
# Load some kernel modules.
|
||||
export MODULE_DIR=@kernel@
|
||||
modprobe ide_disk
|
||||
|
||||
# Start an interactive shell.
|
||||
exec @shell@
|
||||
|
|
|
@ -4,14 +4,18 @@
|
|||
# the second boot stage. The closure of the result of this expression
|
||||
# is supposed to be put into an initial RAM disk (initrd).
|
||||
|
||||
{genericSubstituter, shell, staticTools}:
|
||||
{ genericSubstituter, shell, staticTools
|
||||
, module_init_tools, utillinux, kernel
|
||||
}:
|
||||
|
||||
genericSubstituter {
|
||||
src = ./boot-stage-1-init.sh;
|
||||
isExecutable = true;
|
||||
inherit shell;
|
||||
inherit shell kernel;
|
||||
path = [
|
||||
staticTools
|
||||
module_init_tools
|
||||
utillinux
|
||||
];
|
||||
makeDevices = ./make-devices.sh;
|
||||
}
|
||||
|
|
|
@ -14,10 +14,18 @@ rec {
|
|||
bash = pkgs.bash;
|
||||
|
||||
|
||||
# Determine the set of modules that we need to mount the root FS.
|
||||
modulesClosure = import ./modules-closure.nix {
|
||||
inherit (pkgs) stdenv kernel;
|
||||
rootModules = "ide-cd";
|
||||
};
|
||||
|
||||
|
||||
# The init script of boot stage 1 (loading kernel modules for
|
||||
# mounting the root FS).
|
||||
bootStage1 = import ./boot-stage-1.nix {
|
||||
inherit (pkgs) genericSubstituter;
|
||||
inherit (pkgs) genericSubstituter
|
||||
module_init_tools utillinux kernel;
|
||||
shell = stdenvLinuxStuff.bootstrapTools.bash;
|
||||
staticTools = stdenvLinuxStuff.staticTools;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue