Commit graph

38 commits

Author SHA1 Message Date
Lluís Batlle i Rossell bbebba68f7 A more friendly stage1, with interactive bash, busybox plenty of tools, etc.
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
2012-03-11 21:56:47 +00:00
Florian Friesdorf 90756a787c add preLVMCommands hook
svn path=/nixos/trunk/; revision=31130
2011-12-28 21:46:45 +00:00
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 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
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 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
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 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
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 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 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 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 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
Eelco Dolstra ee005424bf * Doh, subtle race condition: STARTUP must be cleared after "udevadm
settle".  Otherwise some rules may be processed with STARTUP
  cleared, causing LVM devices not to be created.

svn path=/nixos/trunk/; revision=19341
2010-01-10 20:08:35 +00:00
Eelco Dolstra ac8a2ae577 * Use the LVM udev rules in stage 1. This makes
/dev/disk/by-{label,uuid} paths available for LVM volumes.

svn path=/nixos/trunk/; revision=19334
2010-01-10 19:00:29 +00:00
Eelco Dolstra e50a7e5f32 * Removed the boot.initrd.lvm option for simplicity.
svn path=/nixos/trunk/; revision=19330
2010-01-10 16:32:30 +00:00
Eelco Dolstra 39796e26b4 * Removed the boot.isLiveCD option. Moved the code for mounting a
tmpfs on top of the CD to iso-image.nix.

svn path=/nixos/trunk/; revision=19318
2010-01-09 15:13:06 +00:00
Eelco Dolstra c9e4b46d48 * Ugly hack: for CIFS mounts, retry the mount a few times (just as in
pkgs/build-support/vm).  This should make the NixOS regression tests
  more robust on heavily loaded systems, where they now frequently
  fail:

  server# mounting //10.0.2.4/qemu on /hostfs...
  server# [    8.233991] Slow work thread pool: Starting up
  server# [    8.234721] Slow work thread pool: Ready
  server# [   23.271708]  CIFS VFS: No response for cmd 114 mid 1
  server# [   23.272443]  CIFS VFS: cifs_mount failed w/return code = -112
  server# mount: Host is down
  server# [   23.275188] Kernel panic - not syncing: Attempted to kill init!

  Maybe there is a configurable timeout somewhere, which would be much
  nicer...

svn path=/nixos/trunk/; revision=19248
2010-01-06 00:25:14 +00:00
Eelco Dolstra 170331be30 * Don't use /hostfs to signal the test driver that a VM is up, but
write some magic string to ttyS0.  This removes the dependency on
  having a CIFS mount.
* Use a thread to process the stdout/stderr of each QEMU instance.
* Add a kernel command line parameter "stage1panic" to tell stage 1 to
  panic if an error occurs.  This is faster than waiting until
  connect() times out.

svn path=/nixos/trunk/; revision=19212
2010-01-04 18:04:57 +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 6b0842ff52 svn path=/nixos/branches/upstart-0.6/; revision=18229 2009-11-06 21:51:28 +00:00
Lluís Batlle i Rossell eab68acb35 Conditioning on /sys/power, and adding double patchelf for armv5tel-linux
svn path=/nixos/trunk/; revision=17390
2009-09-23 20:50:48 +00:00
Eelco Dolstra 2892aed712 * lib/eval-config.nix: combined "configuration" and "extraModules"
into one argument "modules".
* release.nix: fixed the manual job.
* ISO generation: break an infinite recursion.  Don't know why this
  suddenly happens.  Probably because of the nixpkgs.config change,
  but I don't see why.  Maybe the option evaluation is too strict.

svn path=/nixos/trunk/; revision=16878
2009-08-27 11:57:43 +00:00
Eelco Dolstra 25dbf1594e * Updates for the new udev and util-linux-ng: fsck is now in
util-linux-ng instead of e2fsprogs, blkid is in util-linux-ng, and
  we need to manually create /dev/.udev prior to starting udevd for
  some reason.

svn path=/nixos/trunk/; revision=16691
2009-08-11 21:12:37 +00:00
Ludovic Courtès ac29ad197b stage-1-init: Remove timeout from `fail()'.
Timeouts upon failure can be harmful, e.g., after a file system failure
that needs manual intervention.

svn path=/nixos/trunk/; revision=16637
2009-08-10 09:20:05 +00:00
Eelco Dolstra 0b39f614e9 * Don't wait for CIFS "devices" (//share/path) to appear since they
won't.  This speeds up booting from CIFS a lot.

svn path=/nixos/branches/modular-nixos/; revision=16023
2009-06-22 14:44:48 +00:00
Eelco Dolstra 9460a30851 * Use the fileSystems option to mount the host filesystem. Also, it
seems that mount.cifs isn't actually needed (anymore?).

svn path=/nixos/branches/modular-nixos/; revision=16000
2009-06-18 16:47:00 +00:00
Eelco Dolstra e08e7aedbc * Option boot.initrd.postMountCommands to specify additional shell
commands for in stage 1 of the boot.

svn path=/nixos/branches/modular-nixos/; revision=15998
2009-06-18 16:03:18 +00:00
Eelco Dolstra 16937dd23d * Make fsck on journaling filesystems optional (enabled by default).
This is because fsck.ext3 takes several minutes to recover the
  journal, whereas the ext3 implementation in the kernel only takes a
  few seconds.  I'd love to know why this is the case...

svn path=/nixos/branches/modular-nixos/; revision=15965
2009-06-15 16:47:37 +00:00
Eelco Dolstra 048e03377f * Don't try to run fsck on ISO-9660/UDF filesystems.
svn path=/nixos/branches/modular-nixos/; revision=15963
2009-06-15 15:50:36 +00:00
Eelco Dolstra 1cea6b09ef * Compress the Nix store on the CD using squashfs. This reduces the
size of the i686-linux ISO image from 463 MiB to 147 MiB.  Hopefully
  it also speeds up installation due to reduced seek time and larger
  block sizes, but I haven't tested that yet (on real hardware).

svn path=/nixos/branches/modular-nixos/; revision=15930
2009-06-10 16:29:48 +00:00
Eelco Dolstra e940f1fbd7 * Cleaned up the error messages in the stage 1 init script.
* Use the basename from coreutils rather than a bash hack.

svn path=/nixos/branches/modular-nixos/; revision=15927
2009-06-10 15:02:39 +00:00
Eelco Dolstra 278b15d840 * More moving.
svn path=/nixos/branches/modular-nixos/; revision=15725
2009-05-25 14:19:33 +00:00
Renamed from boot/boot-stage-1-init.sh (Browse further)