Shea Levy
bb5d2d53fe
try isn't used, so use the more compatct seq 10
2012-06-27 09:43:54 -04:00
Mathijs Kwik
061a998840
luks root: c-style for-loop -> seq
...
The ash shell no longer supports this bash-specific syntax.
This left systems that use luksroot unable to boot.
2012-06-27 09:42:55 -04:00
Eelco Dolstra
e64bdda52b
Don't use weird 777 permissions on unmounted /dev/shm
2012-06-27 09:35:53 -04:00
Eelco Dolstra
980ba4d5a5
stage-1: mount /proc, /sys, /dev in the target root
...
The switch_root in BusyBox doesn't do this (while the one in
util-linux does). So we have to do this ourselves.
2012-06-22 13:51:42 -04:00
Eelco Dolstra
9692495df0
Use BusyBox in the initrd
...
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).
2012-06-22 10:43:06 -04:00
Peter Simons
25155a02e6
Add findutils dependency for /tmp cleaning.
...
This dependency is only added if the setting is activated.
svn path=/nixos/trunk/; revision=34434
2012-06-11 07:05:15 +00:00
Peter Simons
4931188684
Integrate cleanTmpDir in stage-2-init.sh.
...
We're using find in order to remove dotfiles, too.
svn path=/nixos/trunk/; revision=34433
2012-06-11 07:05:13 +00:00
Peter Simons
fbf53168f3
Add new option config.boot.cleanTmpDir.
...
This option is to control if the user wants to have its /tmp directory cleaned
up during system boot.
svn path=/nixos/trunk/; revision=34432
2012-06-11 07:05:11 +00:00
Lluís Batlle i Rossell
9125d3af50
Adding creation of /dev/ptmx in stage-2, in case stage-1 did not run.
...
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
2012-06-10 22:37:20 +00:00
Eelco Dolstra
a6892051ef
* Allow building with boot.loader.grub.enable set to "false".
...
svn path=/nixos/trunk/; revision=34218
2012-05-23 15:52:29 +00:00
Mathijs Kwik
be69799f35
better workaround for building nested child configurations
...
svn path=/nixos/trunk/; revision=34164
2012-05-18 06:17:08 +00:00
Mathijs Kwik
7fca5408f3
Revert "Provided a workaround for grub's missing-devices check, so nested child configurations can still build."
...
This reverts commit a89e8831e3d95bcf3ddc19ee34b938db7e8aa572.
svn path=/nixos/trunk/; revision=34163
2012-05-18 06:17:05 +00:00
Eelco Dolstra
f889ebc488
* Allow runtime changes to boot.devShmSize and friends.
...
svn path=/nixos/trunk/; revision=34160
2012-05-17 19:33:55 +00:00
Eelco Dolstra
e9e6885d3b
* Lower the limits on /run and /dev.
...
svn path=/nixos/trunk/; revision=34159
2012-05-17 19:33:12 +00:00
Eelco Dolstra
91acb81b11
* Support globbing in the source attribute of environment.etc entries.
...
svn path=/nixos/trunk/; revision=34158
2012-05-17 18:43:45 +00:00
Mathijs Kwik
88b3c4b82e
Provided a workaround for grub's missing-devices check, so nested child configurations can still build.
...
svn path=/nixos/trunk/; revision=34153
2012-05-17 10:17:32 +00:00
Eelco Dolstra
07fcf5baee
* Make the boot.initrd.luks.enable option obsolete. It's enough to
...
see that boot.initrd.luks.devices is non-empty.
svn path=/nixos/trunk/; revision=34120
2012-05-15 20:45:01 +00:00
Eelco Dolstra
3dd0718939
* Give an error at evaluation time if boot.loader.grub.device or
...
boot.loader.grub.devices are not set, rather than complaining about
it when it's too late.
svn path=/nixos/trunk/; revision=34081
2012-05-14 01:53:47 +00:00
Eelco Dolstra
67d5f2b444
* Require fileSystems to be set.
...
svn path=/nixos/trunk/; revision=34080
2012-05-14 01:33:11 +00:00
Eelco Dolstra
c4aa833e56
* Use optionSet to check environment.etc.
...
svn path=/nixos/trunk/; revision=34064
2012-05-11 23:06:35 +00:00
Eelco Dolstra
e4200d7e61
* Some more trivial builders with lots of dependencies that should be
...
built locally.
svn path=/nixos/trunk/; revision=34034
2012-05-09 21:35:47 +00:00
Eelco Dolstra
03f2847054
* Set preferLocalBuild on a few trivial top-level derivations. These
...
tend to cause a lot of unnecessary I/O to the build machines.
svn path=/nixos/trunk/; revision=33936
2012-04-26 15:19:23 +00:00
Eelco Dolstra
836fa3b6ae
* Fix missing semicolon.
...
svn path=/nixos/trunk/; revision=33933
2012-04-26 14:53:58 +00:00
Peter Simons
8c93993e1b
modules/system/boot/luksroot.nix: fixed the descriptions of the options defined in this module
...
svn path=/nixos/trunk/; revision=33927
2012-04-26 12:21:45 +00:00
Eelco Dolstra
e3879fe365
* Store the NixOS version in the top-level derivation.
...
* 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
2012-04-14 17:09:59 +00:00
Eelco Dolstra
2821289aeb
* Ugly hack: force udev to exit to prevent random "Device or resource
...
busy while trying to open /dev/xvda" errors from fsck.
svn path=/nixos/trunk/; revision=33766
2012-04-12 18:01:19 +00:00
Peter Simons
ec3dca188c
Dropped the unused/unknown/obsolete module i8042 from 'boot.initrd.kernelModules'.
...
svn path=/nixos/trunk/; revision=33654
2012-04-06 19:21:50 +00:00
Eelco Dolstra
4f4c529979
Stage 1 improvements:
...
* 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
2012-04-06 14:20:43 +00:00
Eelco Dolstra
1e8e83408b
* Revert unintended commit.
...
svn path=/nixos/trunk/; revision=33646
2012-04-06 12:23:44 +00:00
Eelco Dolstra
852e513638
* Handle booting from /dev/xvda.
...
svn path=/nixos/trunk/; revision=33645
2012-04-06 12:23:12 +00:00
Eelco Dolstra
e44b87dd31
* Pass --no-sessions to Upstart to make sure users cannot start
...
Upstart jobs (even when Upstart has attached to D-Bus).
svn path=/nixos/trunk/; revision=33617
2012-04-05 12:27:21 +00:00
Lluís Batlle i Rossell
f4883572d8
Making the init interactive shells handle well console kernel parameters
...
with extra parameters, like console=ttyS0,115200.
svn path=/nixos/trunk/; revision=33458
2012-03-28 19:58:44 +00:00
Lluís Batlle i Rossell
9fb07d4036
Making a reference single-quoted for grubDevices, as after substitution, there
...
will be doublequoted elements.
Suggested by Kirelagin.
svn path=/nixos/trunk/; revision=33403
2012-03-25 12:36:43 +00:00
Eelco Dolstra
43b5ced96c
* Ignore SIGHUP and write errors on stderr to ensure that
...
switch-to-configuration runs to completion (e.g. if the tty we're on
got killed).
svn path=/nixos/trunk/; revision=33382
2012-03-23 13:37:22 +00:00
Eelco Dolstra
293e3a784d
* Ensure a consitent umask in the activation script (reported by
...
Lluís).
svn path=/nixos/trunk/; revision=33347
2012-03-22 10:17:10 +00:00
Eelco Dolstra
6f03065dce
* Move the setting of $MODULE_DIR to modprobe.nix.
...
* 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
2012-03-20 22:02:27 +00:00
Eelco Dolstra
e86427f037
* Remove an obsolete line.
...
svn path=/nixos/trunk/; revision=33308
2012-03-20 21:43:13 +00:00
Eelco Dolstra
d9e28560d1
* Emit "expect daemon" for the mountall task. Otherwise it may get a
...
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
2012-03-20 10:17:08 +00:00
Eelco Dolstra
a51a83bd8c
* Drop obsolete line.
...
svn path=/nixos/trunk/; revision=33276
2012-03-19 19:34:06 +00:00
Eelco Dolstra
533448ae37
* udev: don't set the STARTUP flag anymore, since LVM no longer uses
...
it.
* Don't call "vgscan" anymore; VG scans are supposed to be automatic.
svn path=/nixos/trunk/; revision=33275
2012-03-19 19:10:27 +00:00
Eelco Dolstra
f546837cdf
* Don't use replaceChars. It's slow.
...
svn path=/nixos/trunk/; revision=33270
2012-03-19 18:07:28 +00:00
Eelco Dolstra
fcc2e985a2
* Handle jobs that fail while a post-start script is waiting for them.
...
svn path=/nixos/trunk/; revision=33269
2012-03-19 18:07:05 +00:00
Eelco Dolstra
ebc6d7f435
* Attempt to fix the random "udevadm settle - timeout of 120 seconds
...
reached, the event queue contains: /sys/devices/virtual/tty/hvc1" VM
failures.
svn path=/nixos/trunk/; revision=33259
2012-03-19 15:10:39 +00:00
Eelco Dolstra
b1fd71038e
* Slight speedup. It's amazing how quickly shell scripts become
...
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
2012-03-18 19:05:44 +00:00
Eelco Dolstra
8ca2aff772
* Get rid of some grep hackery on the Upstart jobs.
...
svn path=/nixos/trunk/; revision=33240
2012-03-18 18:53:50 +00:00
Eelco Dolstra
9ba5f09e44
* More tasks that shouldn't be restarted (though they're harmless).
...
svn path=/nixos/trunk/; revision=33238
2012-03-18 18:09:17 +00:00
Eelco Dolstra
4acc48fc2d
* Mark tasks such as mount-failed as not to be restarted.
...
svn path=/nixos/trunk/; revision=33237
2012-03-18 18:04:49 +00:00
Eelco Dolstra
362d1389d3
* mountall: make the "console output" Upstart stanza do its work. We
...
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
2012-03-18 17:48:19 +00:00
Eelco Dolstra
2cc8d0363e
* Move the implementation of boot.kernelModules to udev's postStart.
...
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
2012-03-18 14:03:42 +00:00
Eelco Dolstra
21393eed1e
* Use the --quiet flag.
...
svn path=/nixos/trunk/; revision=33225
2012-03-18 02:36:44 +00:00