Commit graph

117 commits

Author SHA1 Message Date
Lluís Batlle i Rossell eea026d321 Enabling back the i8042 module loading at initrd. Otherwise, some
may not get any keyboard driver loaded (as I experienced).

svn path=/nixos/trunk/; revision=19006
2009-12-16 23:45:10 +00:00
Eelco Dolstra 8d588424d2 * switch-to-configuration: force a reinstallation of GRUB whenever the
GRUB version changes.  (That's the complete version from the name
  attribute, not the boot.loader.grub.version attribute.)  The current
  version is recorded in /boot/grub/version.  This is required to
  prevent massive breakage when we change the default value of
  boot.loader.grub.version to "2".

svn path=/nixos/trunk/; revision=18997
2009-12-16 18:11:26 +00:00
Eelco Dolstra daa814980e * At the end of stage 1, reset /proc/sys/kernel/modprobe to
/sbin/modprobe because the sactivation script in stage 2 expects it
  to be so.

svn path=/nixos/trunk/; revision=18977
2009-12-15 18:31:21 +00:00
Eelco Dolstra 6c9059e717 * Added an option `boot.initrd.availableKernelModules' that specifies
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
2009-12-15 16:38:20 +00:00
Eelco Dolstra e8372257a1 * Reformat.
svn path=/nixos/trunk/; revision=18970
2009-12-15 14:10:06 +00:00
Eelco Dolstra a612fd0d5e * Obsoleted boot.initrd.extraKernelModules (use
boot.initrd.kernelModules instead).

svn path=/nixos/trunk/; revision=18969
2009-12-15 14:05:01 +00:00
Eelco Dolstra d6108919b1 * The loopback device is in a module now. Since it's not
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
2009-12-15 13:09:06 +00:00
Marc Weber 4d7e344f69 Adding initial version of the nixos cd insallation test script using
qemu_kvm. Installation doesn't take place yet. VM is started
printing a remote controlled "Hello".

This serves as example how to run a vm within a bulid job.

svn path=/nixos/trunk/; revision=18887
2009-12-11 00:51:13 +00:00
Eelco Dolstra 38aeb2fdc8 svn path=/nixos/trunk/; revision=18860 2009-12-09 19:35:59 +00:00
Eelco Dolstra f26080c5f4 * Clean up the nixos-rebuild output a bit.
svn path=/nixos/trunk/; revision=18859
2009-12-09 18:23:48 +00:00
Nicolas Pierron 82a891dc46 Add support for require attributes inside children configurations.
svn path=/nixos/trunk/; revision=18820
2009-12-05 19:21:57 +00:00
Eelco Dolstra 8e8b3f9313 * Mount /var/run/nscd only once.
svn path=/nixos/branches/upstart-0.6/; revision=18607
2009-11-24 17:25:35 +00:00
Eelco Dolstra 9174b4ab42 * Provide a convience option for commands that must be executed both
when the system boots and when it resumes from suspend.

svn path=/nixos/branches/upstart-0.6/; revision=18354
2009-11-15 12:56:40 +00:00
Eelco Dolstra d1bbe706a2 * Synced with the trunk.
svn path=/nixos/branches/upstart-0.6/; revision=18297
2009-11-08 21:27:53 +00:00
Lluís Batlle i Rossell de1713a24f Failing when the top level system expression cannot find the kernel image
svn path=/nixos/trunk/; revision=18291
2009-11-08 18:32:21 +00:00
Eelco Dolstra 37470cccc5 * Blacklist the "evbug" module.
svn path=/nixos/trunk/; revision=18285
2009-11-08 09:08:50 +00:00
Eelco Dolstra 16c2aa734f * Generate /etc/modprobe.conf to allow the setting of module options
and the blacklisting of modules.

svn path=/nixos/trunk/; revision=18284
2009-11-08 09:01:53 +00:00
Eelco Dolstra 9bf8801dc6 * Use a tmpfs for /var/run/nscd to ensure that / or /var can be
unmounted or at least remounted read-only during shutdown.  Upstart
  0.6 apparently uses nscd to do some name lookups, resulting in it
  holding some mmap mappings to deleted files in /var/run/nscd.
  E.g. lsof shows:

    init         1 root  DEL       REG              253,0          1850313 /var/run/nscd/dbyn3Piz
    init         1 root  DEL       REG              253,0          1850312 /var/run/nscd/dbt2e8PH

  See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=324900.
  This is a workaround - it would be better if Upstart didn't do this.

svn path=/nixos/branches/upstart-0.6/; revision=18258
2009-11-07 15:29:46 +00:00
Eelco Dolstra 2353e53c5f * /var/run/safemode isn't used anywhere.
svn path=/nixos/branches/upstart-0.6/; revision=18257
2009-11-07 15:24:59 +00:00
Eelco Dolstra b7c519456e * Updated switch-to-configuration for Upstart 0.6.
svn path=/nixos/branches/upstart-0.6/; revision=18237
2009-11-07 01:17:56 +00:00
Eelco Dolstra d7342c78d4 * Support pre-stop scripts. These are needed to cleanly shutdown
daemons such as Apache or PostgreSQL.

svn path=/nixos/branches/upstart-0.6/; revision=18234
2009-11-06 22:45:19 +00:00
Eelco Dolstra 6b0842ff52 svn path=/nixos/branches/upstart-0.6/; revision=18229 2009-11-06 21:51:28 +00:00
Eelco Dolstra d545d08461 * In the network-interfaces task, emit an ip-up event if there is a
statically configured interface (i.e. we're not running dhclient).
  Otherwise the ntpd job won't be triggered.
* Use the "-n" flag of "initctl emit" to send the event
  asynchronously.

svn path=/nixos/branches/upstart-0.6/; revision=18227
2009-11-06 21:38:40 +00:00
Eelco Dolstra 4b2ff53ec6 * Don't stop jobs that are already stopped.
svn path=/nixos/branches/upstart-0.6/; revision=18226
2009-11-06 21:17:11 +00:00
Eelco Dolstra 82c3e2aa50 * Updated poweroff/reboot/maintenance mode for Upstart 0.6. Upstart
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
2009-11-06 21:08:06 +00:00
Eelco Dolstra 676da4d87d * Updated some more jobs.
svn path=/nixos/branches/upstart-0.6/; revision=18219
2009-11-06 19:20:09 +00:00
Eelco Dolstra b9bfe7ed43 * Connect Upstart to the system bus.
svn path=/nixos/branches/upstart-0.6/; revision=18213
2009-11-06 15:59:23 +00:00
Eelco Dolstra 9fa2f12cc2 * Do some more jobs.
svn path=/nixos/branches/upstart-0.6/; revision=18212
2009-11-06 15:46:56 +00:00
Eelco Dolstra 903e92bde6 * Use Upstart's "export fork" feature to properly detect when a daemon
is "ready".  This prevents ugly race conditions, e.g. HAL failing to
  start because dbus hasn't finished starting yet.
* Support post-start scripts.  These are executed after the job's main
  process has started but before the job's "started" event is
  emitted.  For instance, the udev job uses this to perform "udevadm
  trigger / settle" to create all devices.  Previously this had to be
  done in the pre-start script, so the daemon had to started in the
  pre-start script as well.

svn path=/nixos/branches/upstart-0.6/; revision=18211
2009-11-06 15:23:16 +00:00
Eelco Dolstra 7011a9315f * Use Upstart 0.6. Jobs are now in /etc/init instead of /etc/event.d.
svn path=/nixos/branches/upstart-0.6/; revision=18192
2009-11-06 10:43:38 +00:00
Eelco Dolstra b581a56d79 * Define the Upstart package to use in one place.
svn path=/nixos/branches/upstart-0.6/; revision=18187
2009-11-06 09:36:35 +00:00
Eelco Dolstra 5fc4590ce5 * Fix indentation.
svn path=/nixos/branches/upstart-0.6/; revision=18186
2009-11-06 09:26:36 +00:00
Nicolas Pierron 8c5b200164 * boor.loader.grub.device can only be defined once.
* Replace an obscure piece of code by its equivalent based on the
  recursiveUpdate function.  Undefined the obsolete name of
  boot.grubDevice to avoid conflicts.

svn path=/nixos/trunk/; revision=18049
2009-10-30 11:57:23 +00:00
Eelco Dolstra 11022e8d9f * Back out r17946 and 17948 because it doesn't work. I've seen it
fail to update /etc twice now.  It's also unnecessarily complex
  IMHO (see nix-dev).

svn path=/nixos/trunk/; revision=18045
2009-10-30 08:37:08 +00:00
Michael Raskin ca6f5e6cd4 Further reducing writes on boot.. Do not copy /etc unless it changed
svn path=/nixos/trunk/; revision=17948
2009-10-24 00:03:13 +00:00
Michael Raskin 893f13bb14 Some boot optimisations attempted. My system boots a few times faster now, and I cannot see how these can break things.
svn path=/nixos/trunk/; revision=17946
2009-10-23 20:30:12 +00:00
Eelco Dolstra 5dfaf565bf * On the CD or on a newly installed system, create the root account
with an empty password, rather than with a hashed empty password.
  The latter is a security risk, because it allows remote root logins
  if a user enables sshd before setting a proper root password.
* Allow empty passwords for login and slim, but nothing else.

svn path=/nixos/trunk/; revision=17833
2009-10-15 14:41:59 +00:00
Ludovic Courtès f9541e0d12 Add GRUB 2 support.
svn path=/nixos/trunk/; revision=17792
2009-10-13 21:39:18 +00:00
Eelco Dolstra eba8f94069 * jobAttrs -> jobs.
svn path=/nixos/trunk/; revision=17769
2009-10-12 18:09:34 +00:00
Eelco Dolstra 40c9057a49 * Remove the obsolete "jobs" option.
svn path=/nixos/trunk/; revision=17765
2009-10-12 17:32:30 +00:00
Eelco Dolstra d982f23f20 * Convert the remaining jobs to jobAttrs style.
svn path=/nixos/trunk/; revision=17764
2009-10-12 17:27:57 +00:00
Eelco Dolstra 9943e0762e * Update some more modules.
svn path=/nixos/trunk/; revision=17763
2009-10-12 17:09:38 +00:00
Eelco Dolstra e91d882a94 * Converted modules that were still using the old (concrete syntax)
style of declaring Upstart jobs.  While at it, converted them to the
  current NixOS module style and improved some option descriptions.
  Hopefully I didn't break too much :-)

svn path=/nixos/trunk/; revision=17761
2009-10-12 16:36:19 +00:00
Michael Raskin 32229e0c05 Make NixOS harder to kill on boot by leaving stale locks for mtab
svn path=/nixos/trunk/; revision=17734
2009-10-09 16:09:56 +00:00
Nicolas Pierron 2969f36b15 Add the computation of upstart-packages inside the job sub-module by adding
the option named "upstartPkg".

Move the obsolete option "services.extraJobs" to the rename module.

svn path=/nixos/trunk/; revision=17672
2009-10-06 09:30:13 +00:00
Marc Weber d0c68bc9ab adding jobAttrs which is filled from jobs contents
Purpose: Allow overwriding of properties such as:
           config.jobAttrs.sshd.startOn = "never";

thanks to Nicolas Pierron for reviewing and
extending nixpkgs to make this possible

I'll convert most of the jobs ASAP so please don't care
about the depreceateion much right now

svn path=/nixos/trunk/; revision=17650
2009-10-05 18:31:27 +00:00
Eelco Dolstra 636a9e7e32 * Add rename clauses for the old Grub options.
* Renamed some of the new Grub options to more sensible names
  (e.g. extraGrubEntries to extraEntries, bootMount to bootDevice,
  etc.).

svn path=/nixos/trunk/; revision=17494
2009-09-29 09:50:38 +00:00
Lluís Batlle i Rossell 75f6cd20da Making modular my previous changes for armv5tel. I updated the way to use
grub. Its options are no more inside 'boot', but inside 'boot.loader.grub'.
I added a new bootloader configuration for nixos, generationsDir. It creates
/boot/default/{init,initrd,kernel,system} symlinks, and the same for the generations
in /boot/system-$gen/{init,initrd,kernel,system}.

I can program the u-boot loader to load /boot/default files always, and have
a minimal nixos boot loader installer functionality. Additionally, I can refer
to the other system generations easily, with a simple 'ls' in /boot.

svn path=/nixos/trunk/; revision=17460
2009-09-27 21:51:37 +00:00
Eelco Dolstra c5d45514a1 * Don't restart dbus, since that causes ConsoleKit to forget about
current sessions.

svn path=/nixos/trunk/; revision=17452
2009-09-26 21:00:47 +00:00
Eelco Dolstra 693e017bfe * HAL expects a /media directory for mounting removable media.
svn path=/nixos/trunk/; revision=17437
2009-09-26 10:27:47 +00:00