- Renamed system.build.menuBuilder to system.build.installBootLoader.
- ‘install-grub.pl’ (formerly grub-menu-builder.pl) now generates the
GRUB menu *and* installs GRUB (if necessary).
- ‘switch-to-configuration.sh’ has no boot loader specific knowledge
anymore. It just calls installBootLoader.
The old GRUB menu builder script is quite slow, typically taking
several seconds. This is a real annoyance since it's run every time
you switch to a new configuration. Therefore this patch replaces the
Bash script with a much faster Perl script. In a VirtualBox test, the
execution time went from 2.7s to 0.1s. The Perl version is also more
correct because it uses XML to get the GRUB configuration (through
builtins.toXML), so there are no shell escaping issues.
The new script currently lacks support for subconfigurations defined
through "nesting.children".
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
* Change the name of the top-level derivation from "system" to
"nixos-<version>".
* Show the NixOS version in the GRUB boot menu instead of the kernel
version.
svn path=/nixos/trunk/; revision=33785
* 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
USR1 signal before it has forked into the background (because it
will be in the start/running state immediately).
svn path=/nixos/trunk/; revision=33288
slow: calling basename in a loop somewhere has a noticable impact on
performance. We really shouldn't use bash scripts.
svn path=/nixos/trunk/; revision=33242
were redirecting output to /var/log/upstart/<job>, so it didn't work
properly.
* mountall-ip-up: send the USR1 signal to the mountall process by
looking up its PID, rather than doing "pkill -USR1 mountall". This
prevents a very subtle race condition where USR1 is delivered to a
child process of mountall (such as fsck), if pkill sees the child
just before its execve(). There is actually still a race condition
because mountall installs its USR1 handler *after* daemonising, so
mountall-ip-up could accidentally kill mountall. Should report this
to upstream.
svn path=/nixos/trunk/; revision=33236
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
longer compares the current configuration to the previous
configuration, but instead compares the current Upstart state to the
intended state. Thus, if the switch script is interrupted, running
nixos-rebuild again will resume starting/stopping Upstart jobs where
the previous run left off.
We determine if an Upstart job has changed by having the pre-start
script of each Upstart job put a symlink to its .conf file in
/var/run/upstart-jobs. So if this symlink differs from the target
of /etc/init/<job>.conf, then the job has changed. This also
prevents multiple restarts of dependent jobs. E.g., if job B has
"start on started A" and "stop on stopping A", then restarting A
will cause B to be restarted, so B shouldn't B restarted a second
time.
We only start jobs that are not running if 1) they're tasks that
have been previously run (like mountall); or 2) they're jobs that
have a "start on" condition. This seems a reasonable heuristic.
svn path=/nixos/trunk/; revision=33222
starts the given job and waits until it's running; "stop_check"
checks that the current job hasn't been asked to stop.
svn path=/nixos/trunk/; revision=33214
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
Note: This feature is INCOMPLETE. Moreover, when runEfibootmgr is true it will
MODIFY NVRAM and, on Apple systems, possibly brick your firmware. PLEASE be
careful while further testing is performed
svn path=/nixos/trunk/; revision=33047
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
Upstart won't find a "bash" binary in $PATH when those commands are run, so we
refer to it using an absolute path.
svn path=/nixos/trunk/; revision=31157
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