diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2010-04-17 15:20:13 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2010-04-17 15:20:13 +0000 |
commit | 33ed225a84d2ce053f1acb0a0f4517a04a64dcc9 (patch) | |
tree | 78ddb7d6f980e7c791e7b526db84d5d9e38c80c5 /modules/system/boot/stage-2-init.sh | |
parent | 1c9eb048c960a1864682526284e034b0bfde8445 (diff) | |
download | nixpkgs-33ed225a84d2ce053f1acb0a0f4517a04a64dcc9.tar nixpkgs-33ed225a84d2ce053f1acb0a0f4517a04a64dcc9.tar.gz nixpkgs-33ed225a84d2ce053f1acb0a0f4517a04a64dcc9.tar.bz2 nixpkgs-33ed225a84d2ce053f1acb0a0f4517a04a64dcc9.tar.lz nixpkgs-33ed225a84d2ce053f1acb0a0f4517a04a64dcc9.tar.xz nixpkgs-33ed225a84d2ce053f1acb0a0f4517a04a64dcc9.tar.zst nixpkgs-33ed225a84d2ce053f1acb0a0f4517a04a64dcc9.zip |
Making the /dev and /dev/shm tmpfs sizes configurable.
By default, they take the usual value of "50% of physical RAM". As /dev/shm can be filled by anyone, and tmpfs does not trigger the OOM killer (and can hang the machine due to a lack of RAM), I need to configure that down in order to avoid crashes. There is still left the /var/run/nscd tmpfs filesystem, also created with 50% of the RAM, but at least not writeable by anyone. We could find a reasonable low value for that, or allow configuration. svn path=/nixos/trunk/; revision=21140
Diffstat (limited to 'modules/system/boot/stage-2-init.sh')
-rw-r--r-- | modules/system/boot/stage-2-init.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/system/boot/stage-2-init.sh b/modules/system/boot/stage-2-init.sh index 79836b7d9a8..6035f43d3ad 100644 --- a/modules/system/boot/stage-2-init.sh +++ b/modules/system/boot/stage-2-init.sh @@ -82,9 +82,9 @@ done mkdir -m 0755 -p /sys mount -t sysfs none /sys mkdir -m 0755 -p /dev -mount -t tmpfs -o "mode=0755" none /dev +mount -t tmpfs -o "mode=0755,size=@devSize@" none /dev mkdir -m 0777 /dev/shm -mount -t tmpfs -o "rw,nosuid,nodev" tmpfs /dev/shm +mount -t tmpfs -o "rw,nosuid,nodev,size=@devShmSize@" tmpfs /dev/shm mkdir -m 0755 -p /dev/pts mount -t devpts -o mode=0600,gid=@ttyGid@ none /dev/pts [ -e /proc/bus/usb ] && mount -t usbfs none /proc/bus/usb # uml doesn't have usb by default |