diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-09-03 11:21:59 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-09-03 11:21:59 +0000 |
commit | 10a18bbb3cafd8152a8da3fb93516943f86db07c (patch) | |
tree | e848a723c66c23b65522e6af05ae1ff0038371d6 /mdk-stage1 | |
parent | e6383c95c8910f98729642ee08f35ff4bc70c377 (diff) | |
download | drakx-10a18bbb3cafd8152a8da3fb93516943f86db07c.tar drakx-10a18bbb3cafd8152a8da3fb93516943f86db07c.tar.gz drakx-10a18bbb3cafd8152a8da3fb93516943f86db07c.tar.bz2 drakx-10a18bbb3cafd8152a8da3fb93516943f86db07c.tar.xz drakx-10a18bbb3cafd8152a8da3fb93516943f86db07c.zip |
mount /dev/{pts,shm} earlier, in stage1 rather than in stage2
(based on pok's idead @mdv but fixed)
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/init.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c index 509dc2cb4..af6aefd2a 100644 --- a/mdk-stage1/init.c +++ b/mdk-stage1/init.c @@ -416,11 +416,17 @@ int main(int argc, char **argv) fatal_error("Unable to mount proc filesystem"); if (mount("none", "/sys", "sysfs", 0, NULL)) fatal_error("Unable to mount sysfs filesystem"); - if (mount("none", "/sys/kernel/debug", "debugfs", 0, "mode=0755,nosuid")) + if (mount("none", "/sys/kernel/debug", "debugfs", MS_NOSUID, "mode=0755")) fatal_error("Unable to mount debugfs filesystem"); if (mount("none", "/dev", "devtmpfs", 0, NULL)) fatal_error("Unable to mount dev filesystem"); - } + mkdir("/dev/pts", 0755); + if (mount("/dev/pts", "/dev/pts", "devpts", MS_NOSUID|MS_NOEXEC, "gid=5,mode=0620")) + fatal_error("Unable to mount /dev/pts devpts filesystem"); + mkdir("/dev/shm", 0755); + if (mount("/dev/shm", "/dev/shm", "tmpfs", MS_NOSUID|MS_NODEV, "mode=1777")) + fatal_error("Unable to mount /dev/shm tmpfs filesystem"); + } /* ignore Control-C and keyboard stop signals */ |