BusyBox doesn't handle the "auto" filesystem type very well: fsck will
just ignore such filesystems, and mount will only work properly if the
required kernel module is already loaded. Therefore, use blkid to
determine the filesystem type.
Also generate an /etc/fstab in the initrd rootfs on the fly. This is
useful if you're dropped into an emergency shell since it allows you
to say "fsck /dev/sda1" or "mount /dev/sda" and have the right thing
happen.
Using BusyBox instead of Bash plus a bunch of other tools gives us a
much more feature-full, yet smaller initrd. In particular, BusyBox
contains networking commands such as ip and a DHCP client, useful for
NFS boots. It's also much more convenient for rescue situations
because the shell has builtin readline support and there are many more
tools (including vi).
Enabled a bunch of units that ship with systemd. Also added an option
‘boot.systemd.units’ that can be used to define additional units
(e.g. ‘sshd.service’).
Upstart requires /dev/ptmx since its 1.4, and will lock up in case of it missing.
I was hitting this in the fuloong, where I don't use the nixos initrd.
svn path=/nixos/trunk/; revision=34429
* Load scsi_wait_scan after all other kernel modules to ensure that
all SCSI device nodes have been created.
* Increase the timeout for the appearance of the root device to 20
seconds.
* Do a "udevadm settle" just after the root device has appeared to
make sure that udev isn't accessing the device anymore (hopefully).
On EC2 (Xen), I've seen fsck on the root fail randomly with "device
in use" errors.
svn path=/nixos/trunk/; revision=33650
* Add a slash to the end of $MODULE_DIR, as expected by depmod. (Not
that running depmod from the command line is all that useful, since
you can't use it to update the tree in the Nix store. But at least
commands like "depmod -n" work now.) Reported by Kirill Elagin on
IRC.
svn path=/nixos/trunk/; revision=33312
It needs udevd to be running because the modules may require
firmware. Thanks to Mathijs and Arie for pointing this out.
svn path=/nixos/trunk/; revision=33234
modprobe.
* Move the implementation of boot.kernelModules from the udev job to
the activation script. This prevents races with the udev job.
* Drop references to the "capability" kernel module, which no longer
exists.
svn path=/nixos/trunk/; revision=33208
This allows setting a fixed device name per array, thus ensuring that at boot,
the arrays will always be mounted with the same names. I think this allows
solving the problem of grub getting confused about softraid device names
(prefix and root), if the devices always get the same naming at initrd.
svn path=/nixos/trunk/; revision=33033
I set it as default because users can benefit of this without having to prepare
their nixos first, and I don't think it will break any nixos for the initrd
size increase.
It can be disabled with 'boot.initrd.withExtraTools = false'.
svn path=/nixos/trunk/; revision=33000
reiserfs now have separate modules that are conditional on
boot.supportedFilesystems and boot.initrd.supportedFilesystems.
By default, these include the filesystems specified in the fsType
attribute in fileSystems. Ext2/3/4 support is currently
unconditional.
Also unbreak the installer test (http://hydra.nixos.org/build/2272302).
svn path=/nixos/trunk/; revision=32954
pierron recommended the use of types.string over mergeOptionString, as
it is superior but might break things.
For my system the change evaluated to the exactly same.
svn path=/nixos/trunk/; revision=31138
This reverts commit 025f8c40b40fad50086e8761eee61098d8fb2651.
The check was intened for building the initrd of the installer.
svn path=/nixos/trunk/; revision=31137
popt-0.16 and cryptsetup-1.4.1 both generated pkgconfig (in contrast
to older versions). The pkgconfig files (popt.pc and cryptsetup.pc)
contain references into the store that are not removed by patchelf and
stage-1 fails with errors like: "output is not allowed to refer to
path `/nix/store/qccjhn063cfv171rcaxvxh0yk96zf7l2-cryptsetup-1.4.1'".
Now, only the cryptsetup binaries and its dependencies are copied,
determined by ldd. In addition the cryptsetup binary and lvm are
tested after patchelf has adjusted the library paths.
Thanks to Peter Simons and Eelco Dolstra for giving the rights hints.
svn path=/nixos/trunk/; revision=31128
After the change from revision 30103, nixos-rebuild suddenly consumed
freaky amounts of memory. I had to abort the process after it had
allocated well in excess of 30GB(!) of RAM. I'm not sure what is causing
this behavior, but undoing that assignment fixes the problem. The other
two commits needed to be revoked, too, because they depend on 30103.
svn path=/nixos/trunk/; revision=30127
possibility that a udevd process survives, preventing udevd from
starting in stage 2:
machine# udevd[1421]: bind failed: Address already in use
machine# udevd[1421]: error binding udev control socket
svn path=/nixos/trunk/; revision=29434
was already the case on Linux 2.6.32, but in newer kernels the CFQ
scheduler is built as a module, so all block devices got the ‘none’
scheduler instead.
svn path=/nixos/trunk/; revision=28972
be set when udevd calls external programs. (The udev manpage claims
that udevd passes its own environment variables, but this is not the
case.)
* Get rid of some udev rule hacks that no longer seem needed.
svn path=/nixos/trunk/; revision=25991
problem is that configuration values below a mkIf are evaluated
strictly even if the condition is false. Thus "${luksRoot}" causes
an evaluation error. As a workaround, use the empty string instead
of `null' as the default value. However, we should really fix the
laziness of mkIf. It's likely that NixOS evaluation would be much
faster if it didn't have to evaluate disabled configuration values.
svn path=/nixos/trunk/; revision=24477
init script. This removes the need for the `systemConfig' boot
parameter; `init=<stage-2-init>' is enough. However, the GRUB menu
builder still needs to add `systemConfig' to the kernel command line
for compatibility with old configurations.
svn path=/nixos/trunk/; revision=23775
* Moved some scriptlets to the appropriate modules.
* Put the scriptlet that sets the default path at the start, since it
never makes sense not to have it there. It no longer needs to be
declared as a dependency.
* If a scriptlet has no dependencies, it can be denoted as a plain
string (i.e., `noDepEntry' is not needed anymore).
svn path=/nixos/trunk/; revision=23762
build hook uses this directory to store temporary GC roots. (It
creates it if it doesn't exist, but it's better to do it here as
well to ensure the right ownership and permissions.)
* Clear /nix/var/nix/gcroots/tmp and /nix/var/nix/temproots at boot
time.
svn path=/nixos/trunk/; revision=23417
root=... kernel command line parameter, instead of hard-coding it in
`fileSystems'. This is to allow CD-to-USB converters such as
UNetbootin to rewrite the kernel command line to the label or UUID
of the USB stick.
svn path=/nixos/trunk/; revision=23024
we want to generate the GRUB menu without actually installing GRUB
(because Amazon supplies its own pv-grub), and each menu entry
requires "root (hd0)". For the first, allow boot.loader.grub.device
to be set to "nodev" to indicate that the GRUB menu should be
generated without installing GRUB. For the second, add an option
boot.loader.grub.extraPerEntryConfig to allow commands to be added
to each GRUB menu entry (in this case, "root (hd0)").
svn path=/nixos/trunk/; revision=22712
INFORMATION" SCSI command:
https://bugzilla.redhat.com/show_bug.cgi?id=609049
As a result, `cdrom_id' doesn't print
ID_CDROM_MEDIA_TRACK_COUNT_DATA, which in turn prevents the
/dev/disk/by-label symlinks from being created. We need these in
the NixOS installation CD, so use ID_CDROM_MEDIA in the
corresponding udev rules for now. This was the behaviour in udev <=
154. See also
http://www.spinics.net/lists/hotplug/msg03935.html
svn path=/nixos/trunk/; revision=22691
shutdown. (Portmap and statd are needed during shutdown to unmount
NFS volumes but have open files in /var/run.)
* In the shutdown job, don't kill PIDs belonging to Upstart jobs that
are still running. If they don't stop on the "starting shutdown"
event, then they're needed during shutdown (such as portmap and
statd).
* NFS test: test whether the shutdown quickly unmounts NFS volumes
(i.e. whether portmap and statd are still running).
svn path=/nixos/branches/boot-order/; revision=22204
to use the standard (coreutils) tools.
* Use util-linux's `switch_root' to switch over to the target root
FS. It automatically moves over the /dev, /proc and /sys from stage
1, so stage 2 doesn't need to set them up again.
svn path=/nixos/trunk/; revision=22085
By default, they take the usual value of "50% of physical RAM".
As /dev/shm can be filled by anyone, and tmpfs does not trigger the OOM killer (and
can hang the machine due to a lack of RAM), I need to configure that down
in order to avoid crashes.
There is still left the /var/run/nscd tmpfs filesystem, also created with 50%
of the RAM, but at least not writeable by anyone. We could find a reasonable
low value for that, or allow configuration.
svn path=/nixos/trunk/; revision=21140
the current configuration don't match the running kernel. This
ensures that modprobe still works after a "nixos-rebuild switch" to
a configuration that has a different kernel version.
svn path=/nixos/trunk/; revision=19696
to the nixpkgs trunk 'kernelPackages'.
Seeing a strange kernelPackages mentioned in installation-cd-rescue (2.6.31_something) I
update that to 2.6.32.
svn path=/nixos/trunk/; revision=19443
readd r19267 (the issue should be fixed now)
Eelco Dolstra and Nicolas Pierron both kept asking me to pay attention
to the rendered manual. There is one catch: example settings such as
pkgs.kernelPackages_2_6_25 are correct however they don't render
properly. Moreover you don't want those examples to be evaluated (maybe
compiling a kernel ?) when building the manual only.
So use Strings and add a copy & paste note.
This is still a hacky. Maybe a kind of typed "verbatim" expression
should be added (?)
svn path=/nixos/trunk/; revision=19281
pkgs/build-support/vm). This should make the NixOS regression tests
more robust on heavily loaded systems, where they now frequently
fail:
server# mounting //10.0.2.4/qemu on /hostfs...
server# [ 8.233991] Slow work thread pool: Starting up
server# [ 8.234721] Slow work thread pool: Ready
server# [ 23.271708] CIFS VFS: No response for cmd 114 mid 1
server# [ 23.272443] CIFS VFS: cifs_mount failed w/return code = -112
server# mount: Host is down
server# [ 23.275188] Kernel panic - not syncing: Attempted to kill init!
Maybe there is a configurable timeout somewhere, which would be much
nicer...
svn path=/nixos/trunk/; revision=19248
write some magic string to ttyS0. This removes the dependency on
having a CIFS mount.
* Use a thread to process the stdout/stderr of each QEMU instance.
* Add a kernel command line parameter "stage1panic" to tell stage 1 to
panic if an error occurs. This is faster than waiting until
connect() times out.
svn path=/nixos/trunk/; revision=19212
modules that should be added to the initrd, but should only be
loaded on demand (e.g. by the kernel or by udev). This is
especially useful in the installation CD, where we now only load the
modules needed by the hardware.
* Enable automatic modprobing by udev in the initrd.
svn path=/nixos/trunk/; revision=18975
automatically loaded by the kernel, load it at boot time.
* Put the ext2 module (which used to be built in) in the initrd to
prevent unexpected breakage.
svn path=/nixos/trunk/; revision=18963
no longer emits specific events for those. Instead it emits a
"runlevel" event. The "runlevel" task starts the "shutdown" task to
perform the desired action.
* Upstart 0.6 no longer has a "shutdown" event, so "stop on shutdown"
no longer works. Therefore the shutdown task explicitly stops all
running Upstart jobs, before sending a TERM/KILL signal to all
remaining processes.
* Do a "chvt 1" at the start of the shutdown task to switch to the
console.
* Use /dev/console instead of /dev/tty1, since if somebody is logged
in on tty1, bad things will happen.
svn path=/nixos/branches/upstart-0.6/; revision=18224