Commit graph

24 commits

Author SHA1 Message Date
Eelco Dolstra 3495a773f9 * Improved Upstart job handling in switch-to-configuration. It no
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
2012-03-18 01:53:35 +00:00
Shea Levy 001fcad421 First shot at EFI booting.
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
2012-03-13 19:27:59 +00:00
Eelco Dolstra b6d43e1aca * Fix Amazon image generation (broken by r32913).
svn path=/nixos/trunk/; revision=33032
2012-03-13 13:17:43 +00:00
Lluís Batlle i Rossell 13ac0a309b Allow a way to install grub to multiple devices (for /boot on soft raid arrays).
svn path=/nixos/trunk/; revision=32913
2012-03-08 21:37:30 +00:00
Eelco Dolstra aac71e8f95 * Add a module for DRBD.
svn path=/nixos/trunk/; revision=30202
2011-11-03 02:14:57 +00:00
Eelco Dolstra 9076456b15 * Don't restart udevtrigger from the switch script. It's triggered by
udev.

svn path=/nixos/trunk/; revision=29962
2011-10-21 16:22:38 +00:00
Eelco Dolstra c41b01ea23 * Canonicalize boot.loader.grub.device before calling grub-install to
ensure that values such as /dev/disk/by-id/ata-WDC... work.

svn path=/nixos/trunk/; revision=27519
2011-06-22 18:22:58 +00:00
Eelco Dolstra cda2e41c01 * Added a "xendomains" job to automatically start the domains defined
in /etc/xen/auto at boot time, to save all running domains during
  shutdown, and to restore all saved domains at boot time.

svn path=/nixos/trunk/; revision=24121
2010-10-06 16:07:16 +00:00
Eelco Dolstra c1295661c4 * Added a command `nixos-rebuild build-vm-with-bootloader'. This is
like `build-vm', but boots using the regular boot loader (i.e. GRUB
  1 or 2) rather than booting directly from the kernel/initrd.  Thus
  it allows testing of GRUB.

svn path=/nixos/trunk/; revision=23747
2010-09-13 12:34:58 +00:00
Eelco Dolstra 21e62884e7 * switch-to-configuration.sh: Signal dbus to reload its configuration.
svn path=/nixos/trunk/; revision=22718
2010-07-23 10:52:51 +00:00
Eelco Dolstra d659488209 * Use the regular GRUB menu builder for Amazon. There are two issues:
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
2010-07-22 14:40:29 +00:00
Eelco Dolstra f3e1607758 * Don't run the emergency-shell task after nixos-rebuild because it
screws up the X server (CPU usage goes to 100%, switching virtual
  consoles no longer works, etc.).  TODO: we need some generic way to
  mark jobs that shouldn't be started automatically.

svn path=/nixos/trunk/; revision=22608
2010-07-15 12:31:18 +00:00
Yury G. Kudryashov 1e83fe6122 Remove tabs
svn path=/nixos/trunk/; revision=21104
2010-04-15 15:47:26 +00:00
Sander van der Burg 02e4a78c71 Disnix should also remain active during a switch
svn path=/nixos/trunk/; revision=20949
2010-04-05 20:35:08 +00:00
Eelco Dolstra 01491abbfa * Handle the case where initScriptBuilder is not set.
svn path=/nixos/trunk/; revision=19014
2009-12-17 12:35:58 +00:00
Marc Weber 4ff6821a03 module creating /sbin/init
svn path=/nixos/trunk/; revision=19009
2009-12-17 06:04:36 +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 f26080c5f4 * Clean up the nixos-rebuild output a bit.
svn path=/nixos/trunk/; revision=18859
2009-12-09 18:23:48 +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
Ludovic Courtès f9541e0d12 Add GRUB 2 support.
svn path=/nixos/trunk/; revision=17792
2009-10-13 21:39:18 +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 0ab6be1c81 * Restarting dbus no longer seems to kill the X server.
svn path=/nixos/trunk/; revision=16650
2009-08-10 16:18:51 +00:00
Eelco Dolstra 98cce35041 * Turn the top-level derivation of a NixOS configuration ("system")
into a NixOS module (modules/system/activation/top-level.nix -
  couldn't think of a better name).  The top-level derivation is
  returned in config.system.build.system.
* Inlined system.sh in top-level.nix so that we don't have to pass
  everything through environment variables.

svn path=/nixos/branches/modular-nixos/; revision=15740
2009-05-27 09:00:45 +00:00
Renamed from system/switch-to-configuration.sh (Browse further)