Commit graph

119 commits

Author SHA1 Message Date
Eelco Dolstra 926091c265 * Make the permissions on /run less liberal.
svn path=/nixos/trunk/; revision=30065
2011-10-27 17:34:16 +00:00
Nicolas Pierron 38bc39c299 Add support for NFS root file system.
Patch by Rickard Nilsson.

svn path=/nixos/trunk/; revision=29855
2011-10-15 21:01:30 +00:00
Eelco Dolstra 3fa2bbd029 * Properly shut down udevd in stage 1. Otherwise there is a slight
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
2011-09-22 08:26:58 +00:00
Peter Simons eb6e1310b8 strip trailing whitespace; no functional change
svn path=/nixos/trunk/; revision=29285
2011-09-14 18:20:50 +00:00
Peter Simons a499049ce5 Strip trailing whitespace.
svn path=/nixos/trunk/; revision=29246
2011-09-13 18:49:50 +00:00
Peter Simons d3528a3c4e modules/system/boot/stage-1-init.sh: added "boot.runSize" option to determine the maximum size of the /run tmpfs
svn path=/nixos/trunk/; revision=29245
2011-09-13 18:49:47 +00:00
Peter Simons c01c41e2da modules/system/boot/kernel.nix: disable "elevator=cfq" boot parameter for the time being
This setting causes the init ram disk to hang indefinitely on some systems.

svn path=/nixos/trunk/; revision=29228
2011-09-12 18:01:18 +00:00
Peter Simons 6c08bf40a6 modules/system/boot/kernel.nix: stripped trailing whitespace
svn path=/nixos/trunk/; revision=29101
2011-09-07 20:36:13 +00:00
Eelco Dolstra 4b8275d2c4 * Force loading of the CFQ module, i.e. don't do it on demand — that
seems to cause weird modprobe hangs.

svn path=/nixos/trunk/; revision=29027
2011-09-05 14:58:26 +00:00
Eelco Dolstra 8b3fd3ed49 * Use the CFQ I/O scheduler, rather than the ‘none’ scheduler. This
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
2011-09-02 13:19:45 +00:00
Shea Levy 25594961ad modprobe.nix: Blacklist snd_pcsp by default
svn path=/nixos/trunk/; revision=28805
2011-08-24 23:37:40 +00:00
Yury G. Kudryashov e5917ea6fc Merge with udev-173
The only conflict was the addition of two different options at the same place.

svn path=/nixos/trunk/; revision=28801
2011-08-24 21:24:39 +00:00
Eelco Dolstra 74586fd2bb * Fix the permissions on /tmp.
svn path=/nixos/trunk/; revision=28435
2011-08-09 15:32:39 +00:00
Eelco Dolstra 1e5bd11a53 * Create /run in the initrd and bind-mount it into the target root.
This allows Udev to share its database between stage 1 and 2, which
  in turn is expected by the LVM Udev rules.

svn path=/nixos/trunk/; revision=27926
2011-07-24 23:36:30 +00:00
Eelco Dolstra 14636ba057 * The Powers That Be have decided that there shall be a /run to
replace /var/run and /var/lock.  For instance, udev now keeps state
  in /run/udev instead of /dev/.udev.  See

    http://lists.fedoraproject.org/pipermail/devel/2011-March/150031.html
    http://bugs.freestandards.org/show_bug.cgi?id=718

  So this patch creates /run as a tmpfs, and symlinks /var/run to /run
  and /var/lock to /run/lock.

  TODO: create /run in stage 1 and propagate it to stage 2.    

svn path=/nixos/trunk/; revision=27803
2011-07-16 19:27:45 +00:00
Eelco Dolstra 97a37f7c12 * "stage1panic" -> "stage1panic=1" to get rid of a harmless warning.
svn path=/nixos/trunk/; revision=26756
2011-04-08 14:42:35 +00:00
Eelco Dolstra 63bd2744b7 * Partially revert r25991 because it depends on the x-updates branch.
svn path=/nixos/trunk/; revision=25995
2011-02-16 16:48:34 +00:00
Eelco Dolstra 131f3c8e63 * Because cdrom_id now links against libpthread, LD_LIBRARY_PATH must
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
2011-02-16 14:38:52 +00:00
Eelco Dolstra dff372db3c * Fix evaluation of the luksroot module when luksRoot == null. The
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
2010-10-25 22:21:51 +00:00
Evgeny Egorochkin 791c758b41 Encrypted root support via LUKS
svn path=/nixos/trunk/; revision=24459
2010-10-25 00:57:30 +00:00
Eelco Dolstra c4f910f550 * Substitute the path of the system derivation directly in the stage 2
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
2010-09-13 22:10:25 +00:00
Eelco Dolstra 4046056cdc * In the activation script, don't require the path to the "system"
derivation on the command line.

svn path=/nixos/trunk/; revision=23770
2010-09-13 18:19:15 +00:00
Eelco Dolstra f729f12e4e Some cleanups in the activation script:
* 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
2010-09-13 15:41:38 +00:00
Eelco Dolstra 6258845b61 svn path=/nixos/trunk/; revision=23727 2010-09-10 15:25:58 +00:00
Eelco Dolstra f067d179ab * Create /nix/var/nix/gcroots/tmp in the activation script. The
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
2010-08-25 11:59:04 +00:00
Eelco Dolstra 3f10cf70f6 * Regression test for the build hook mechanism.
svn path=/nixos/trunk/; revision=23395
2010-08-24 13:27:28 +00:00
Lluís Batlle i Rossell fe2f7eae17 Making the stage1 work on mips too (for the name of the dynamic loader)
svn path=/nixos/trunk/; revision=23325
2010-08-21 18:23:55 +00:00
Michael Raskin 295df77f21 Move resume section after udev launch - on some systems devices are recognized by kernel only after udev works.
svn path=/nixos/trunk/; revision=23176
2010-08-14 20:12:05 +00:00
Eelco Dolstra 313629adcf * Add ext4 to the default initrd.
svn path=/nixos/trunk/; revision=23088
2010-08-10 10:12:18 +00:00
Eelco Dolstra e41e6a65bb * Make sure that /tmp/.ICE-unix is owned by root and has 1777
permissions.  Otherwise it ends up being owned by the first user to
  log in, and other users' iceauth calls fail.

svn path=/nixos/trunk/; revision=23052
2010-08-09 10:59:20 +00:00
Eelco Dolstra e8e7ee356c * In the installation CD, pass the label of the CD through the
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
2010-08-07 14:16:18 +00:00
Evgeny Egorochkin 88a400f578 Fix LVM failing test due to /proc/devices not being available in some of OpenVZ containers
svn path=/nixos/trunk/; revision=22717
2010-07-22 22:45:24 +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 e7c0c929ed * Work around a bug in QEMU, which doesn't implement the "READ DISC
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
2010-07-21 21:15:54 +00:00
Eelco Dolstra 1b04d3a813 * Absolutise $systemConfig in case it's a symlink.
svn path=/nixos/trunk/; revision=22677
2010-07-20 13:50:10 +00:00
Eelco Dolstra 63962dd7d6 * Disable the test to see whether $stage2Init exists. For some
unfathomable reason this test fails on EC2 if it's a symlink
  (despite the -L test).  I give up.

svn path=/nixos/trunk/; revision=22676
2010-07-20 13:49:04 +00:00
Eelco Dolstra bfe46a653b * Mount /dev, /proc and /sys when booting without a stage 1 (e.g. on
Amazon).

svn path=/nixos/trunk/; revision=22598
2010-07-14 10:55:45 +00:00
Eelco Dolstra 54a4eead20 * Typos.
svn path=/nixos/trunk/; revision=22537
2010-07-08 16:21:55 +00:00
Eelco Dolstra b076121430 * Don't use the -v flag because not every fsck backend knows it.
svn path=/nixos/trunk/; revision=22512
2010-07-07 14:25:16 +00:00
Eelco Dolstra d43d321e86 * Sync with the trunk.
svn path=/nixos/branches/boot-order/; revision=22349
2010-06-20 20:54:31 +00:00
Eelco Dolstra a5c433696c * Put all of /var/run (not just /var/run/nscd) on a tmpfs to simplify
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
2010-06-09 22:29:06 +00:00
Eelco Dolstra 3eac003800 * Maintain /var/log/wtmp correctly during boot/shutdown.
svn path=/nixos/branches/boot-order/; revision=22182
2010-06-08 12:48:16 +00:00
Eelco Dolstra 95a9c5dd77 * Log the standard output/error of Upstart jobs to
/var/log/upstart/<jobname> rather than spamming the console with it.

svn path=/nixos/trunk/; revision=22093
2010-06-01 19:44:23 +00:00
Eelco Dolstra 18fd0a61de * Add `sleep' to the initrd.
svn path=/nixos/trunk/; revision=22089
2010-06-01 17:09:34 +00:00
Eelco Dolstra 9c900ee15c * Updates for the dynamically linked splash helper.
svn path=/nixos/trunk/; revision=22087
2010-06-01 16:38:42 +00:00
Eelco Dolstra dc49a0ce3f * Don't use klibc in the initrd. It's simpler (and slightly smaller)
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
2010-06-01 15:53:24 +00:00
Eelco Dolstra eade772338 * Don't show the contents of linuxPackages in the manual.
svn path=/nixos/trunk/; revision=22044
2010-05-28 11:21:40 +00:00
Eelco Dolstra 7484774172 * Activate software RAID devices from udev. This makes the swraid
Upstart jobs unnecessary.
* Support having the root filesystem on swraid.

svn path=/nixos/trunk/; revision=21807
2010-05-16 20:40:04 +00:00
Eelco Dolstra edee370883 * The default action for udevadm trigger' changed from add' to
`change'.  At boot time, however, we want an `add' event to trigger
  certain rules (e.g. LVM and mdadm).

svn path=/nixos/trunk/; revision=21804
2010-05-16 19:02:45 +00:00
Yury G. Kudryashov 7836f89242 stage-1.nix: copy libudev.so, verbose log
svn path=/nixos/trunk/; revision=21793
2010-05-15 21:28:31 +00:00