* 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
|
export PATH=/empty
|
||||||
for i in @path@; do
|
for i in @path@; do
|
||||||
PATH=$PATH:$i/bin
|
PATH=$PATH:$i/bin
|
||||||
|
if test -e $i/sbin; then
|
||||||
|
PATH=$PATH:$i/sbin
|
||||||
|
fi
|
||||||
done
|
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.
|
# Create device nodes in /dev.
|
||||||
source @makeDevices@
|
source @makeDevices@
|
||||||
|
|
||||||
|
# Load some kernel modules.
|
||||||
|
export MODULE_DIR=@kernel@
|
||||||
|
modprobe ide_disk
|
||||||
|
|
||||||
# Start an interactive shell.
|
# Start an interactive shell.
|
||||||
exec @shell@
|
exec @shell@
|
||||||
|
@ -4,14 +4,18 @@
|
|||||||
# the second boot stage. The closure of the result of this expression
|
# the second boot stage. The closure of the result of this expression
|
||||||
# is supposed to be put into an initial RAM disk (initrd).
|
# is supposed to be put into an initial RAM disk (initrd).
|
||||||
|
|
||||||
{genericSubstituter, shell, staticTools}:
|
{ genericSubstituter, shell, staticTools
|
||||||
|
, module_init_tools, utillinux, kernel
|
||||||
|
}:
|
||||||
|
|
||||||
genericSubstituter {
|
genericSubstituter {
|
||||||
src = ./boot-stage-1-init.sh;
|
src = ./boot-stage-1-init.sh;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
inherit shell;
|
inherit shell kernel;
|
||||||
path = [
|
path = [
|
||||||
staticTools
|
staticTools
|
||||||
|
module_init_tools
|
||||||
|
utillinux
|
||||||
];
|
];
|
||||||
makeDevices = ./make-devices.sh;
|
makeDevices = ./make-devices.sh;
|
||||||
}
|
}
|
||||||
|
@ -14,10 +14,18 @@ rec {
|
|||||||
bash = pkgs.bash;
|
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
|
# The init script of boot stage 1 (loading kernel modules for
|
||||||
# mounting the root FS).
|
# mounting the root FS).
|
||||||
bootStage1 = import ./boot-stage-1.nix {
|
bootStage1 = import ./boot-stage-1.nix {
|
||||||
inherit (pkgs) genericSubstituter;
|
inherit (pkgs) genericSubstituter
|
||||||
|
module_init_tools utillinux kernel;
|
||||||
shell = stdenvLinuxStuff.bootstrapTools.bash;
|
shell = stdenvLinuxStuff.bootstrapTools.bash;
|
||||||
staticTools = stdenvLinuxStuff.staticTools;
|
staticTools = stdenvLinuxStuff.staticTools;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user