Commit graph

83 commits

Author SHA1 Message Date
Eelco Dolstra 5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
Jaka Hudoklin 12dda685ee stage-2-init: create /var/lib and /var/db at boot, so some modules that create user home folders here don't fail 2013-09-26 16:38:12 +02:00
Eelco Dolstra c52fd85990 Set permissions on /var/log/journal properly
This makes the system journal readable by users in the
systemd-journal, wheel and adm groups.  It also allows users to read
their own journals.

Note that this doesn't change the permissions of existing journals.
2013-07-19 21:18:44 +02:00
Eelco Dolstra ee29054da1 Create an empty /etc/resolv.conf to shut up nscd 2013-04-03 13:27:41 +02:00
Eelco Dolstra f40a38b2c8 Remove /etc lock files at boot time 2013-03-31 15:40:13 +02:00
Shea Levy 89dd7b0f69 Revert "Don't mount /nix/store ro if it's a mountpoint"
Now that nixUnstable supports remounting in the "/nix/store is a
mountpoint" case, this is no longer necessary.

This reverts commit f1d48aec43.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-03-26 12:20:06 -04:00
Shea Levy f1d48aec43 Don't mount /nix/store ro if it's a mountpoint
In principle this could work, but the current remount logic in nix fails
to remount mountpoints that are root in their own filesystem (as would
be the case with bind-mounting a mountpoint over itself). nixos/nix#98
is aimed at fixing this.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-03-08 10:42:34 -05:00
Shea Levy 6d6d3d4228 readOnlyStore: Don't do a read-only bind-mount of an already read-only store.
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-03-07 19:00:21 -05:00
Mathijs Kwik 09680dec6a read-only-store functionality should apply even when /nix/store is on a separate filesystem 2013-03-04 22:46:06 +01:00
Eelco Dolstra 18e8724e64 Log the configuration when booting / switching 2013-02-18 15:39:47 +01:00
Shea Levy 28cf26d674 Remove unneeded /nix/rw-store creation when using readOnlyStore 2013-01-24 20:50:28 -05:00
Eelco Dolstra 6580588230 Set $HOME in stage-2
http://hydra.nixos.org/build/3900294
2013-01-23 20:16:33 +01:00
Eelco Dolstra c7b427fbca Give our kernel parameters a common prefix ("boot.*") 2013-01-09 22:53:44 +01:00
Eelco Dolstra ac53b25f16 Remove handling of "debug2" and "S|s|single" kernel command line options
The "S|s|single" option is handled by systemd (starting
rescue.target).  And the rescue target basically removes the need for
a special debug shell.  (Also, there is "systemd.crash_shell=1" for
starting a shell if systemd crashes.)
2013-01-08 18:31:46 +01:00
Eelco Dolstra 93f82dfeef Remove outdated comment about EC2 booting into stage-2 directly 2012-11-02 17:07:53 +01:00
Eelco Dolstra b3c5d42b1d Don't create /var/log/upstart 2012-10-26 16:22:18 +02:00
Eelco Dolstra fdea3ac3d2 stage-2-init: Don't rely on groups being initialised 2012-10-04 16:15:30 -04:00
Eelco Dolstra 666620cdd5 Use ‘mountpoint -q’ 2012-10-02 10:32:56 -04:00
Eelco Dolstra 3e6bb7d1de Move setting ownership of /nix/store to stage-2-init
This is necessary because the store might be bind-mounted read-only.
2012-09-28 10:59:58 -04:00
Eelco Dolstra a139fa14b1 Optionally make the Nix store read-only to enforce immutability
This will be the default once Nix 1.2 is released.
2012-09-25 16:33:21 -04:00
Eelco Dolstra 83c6b1cf3a Set $LOCALE_ARCHIVE in systemd services
Systemd sets locale variables like $LANG when running services, so
$LOCALE_ARCHIVE should also be set to prevent warnings like "perl:
warning: Setting locale failed.".
2012-09-18 18:12:39 -04:00
Eelco Dolstra aac6fe44b6 Merge branch 'master' of github.com:NixOS/nixos into systemd 2012-09-11 10:58:57 -04:00
Mathijs Kwik aba9f76105 change permission of /run/lock to allow non-root access to subdirectories 2012-08-26 10:17:22 +02:00
Eelco Dolstra 08f14b33c1 Merge branch 'master' of github.com:NixOS/nixos into systemd 2012-08-20 11:27:38 -04:00
Eelco Dolstra 7a7d04af8a systemd: Use the kernel modules from /run/booted-system
This prevents failures in systemd-modules-load.service like "Failed to
lookup alias 'ipv6': Function not implemented".
2012-08-14 17:09:44 -04:00
Eelco Dolstra 4475294f57 Fix a hang during shutdown
Subtle: dhcpcd.service would call resolvconf during shutdown, which in
turn would start invalidate-nscd.service, causing the shutdown to be
cancelled.  Instead, give nscd.service a proper reload action, and do
"systemctl reload --no-block nscd.service".  The --no-block is
necessary to prevent that command from waiting until a timeout occurs
(bug in systemd?).
2012-08-14 16:45:50 -04:00
Lluís Batlle i Rossell 746b572ee6 stage2init: fix respecting 'noatime' mount options for /
We had a "mount -o remount,rw none /" that was setting back 'relatime',
although we had set 'noatime' at initrd mount. Removing the word 'none' fixed
it.

Specifying a device (in this case 'none'), makes mount to forget previous
device options. According to manpage, it says not to read fstab or mtab. But the
effect is that of setting 'relatime', if it was mounted 'noatime.
2012-08-10 20:51:13 +02:00
Eelco Dolstra 44d091674b Merge branch 'master' of github.com:NixOS/nixos into systemd
Conflicts:
	modules/config/networking.nix
	modules/services/networking/ssh/sshd.nix
	modules/services/ttys/agetty.nix
	modules/system/boot/stage-2-init.sh
	modules/system/upstart-events/shutdown.nix
2012-07-16 17:27:11 -04:00
Eelco Dolstra 98459eb675 Global replace /var/run/booted-system -> /run/booted-system 2012-07-16 11:34:21 -04:00
Eelco Dolstra 73532c3855 Global replace /var/run/current-system -> /run/current-system 2012-07-16 11:34:21 -04:00
Eelco Dolstra bf15293b1e Merge branch 'master' of github.com:NixOS/nixos into systemd
Conflicts:
	modules/services/hardware/udev.nix
2012-06-28 14:19:38 -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 d692a0807a Don't mount /dev/pts since systemd does that for us 2012-06-19 15:25:56 -04:00
Eelco Dolstra cacd608c37 Mount devtmpfs in the initrd
It seems that udev now requires devtmpfs, so enable it.
2012-06-19 15:15:40 -04:00
Eelco Dolstra 4a95f8996b To ease migration to systemd, generate units from the ‘jobs’ option
Also get rid of the ‘buildHook’ job option because it wasn't very useful.
2012-06-16 00:19:43 -04:00
Eelco Dolstra ab86759eb3 Use kmod instead of module-init-tools 2012-06-15 14:18:26 -04:00
Eelco Dolstra a46894b960 Get lots more systemd stuff working
Enabled a bunch of units that ship with systemd.  Also added an option
‘boot.systemd.units’ that can be used to define additional units
(e.g. ‘sshd.service’).
2012-06-14 18:44:56 -04:00
Eelco Dolstra fae777c264 Merge branch 'master' of github.com:NixOS/nixos into systemd 2012-06-14 12:02:17 -04: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
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 f21aa7d22c First attempt at using systemd
Basic booting works.  Systemd starts agetty instances on tty1 and
tty2.  Shutdown and journald also work.
2012-06-04 12:51:48 -04: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
Eelco Dolstra e86427f037 * Remove an obsolete line.
svn path=/nixos/trunk/; revision=33308
2012-03-20 21:43:13 +00:00
Lluís Batlle i Rossell ee163c2c80 Making the stage2 interpreter bash non-interactive, while keeping the
interactive shell with bash interactive. Suggested by Eelco.


svn path=/nixos/trunk/; revision=33005
2012-03-11 22:43:37 +00:00
Lluís Batlle i Rossell d2e2bb4bc4 Typo
svn path=/nixos/trunk/; revision=33002
2012-03-11 22:07:37 +00:00
Lluís Batlle i Rossell 331b1f46d3 Making the stage2 'debug2' spawn a shell with job control, like in stage1, running it in a
virtual terminal and not in the console. This brings wonderful things like ^C.


svn path=/nixos/trunk/; revision=33001
2012-03-11 22:01:46 +00:00
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
Eelco Dolstra ee0769cc42 * If debug2 is passed on the kernel command line, run Upstart with
the --verbose flag to see what it's doing.

svn path=/nixos/trunk/; revision=32747
2012-03-02 16:37:28 +00:00
Eelco Dolstra f61ad97833 * Run the stage 2 debug shell at a more useful point (just before
starting Upstart).  This also causes $PATH to be set to something
  more sensible.

svn path=/nixos/trunk/; revision=32740
2012-03-02 13:17:05 +00:00