summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-09-03 11:21:59 +0000
committerThierry Vignaud <tv@mageia.org>2012-09-03 11:21:59 +0000
commit46fab66e7136f738c7f98b1a85981683cbffa704 (patch)
treee848a723c66c23b65522e6af05ae1ff0038371d6 /mdk-stage1
parent479b93c2705a6e8ab24c513de890781cb070e688 (diff)
downloaddrakx-backup-do-not-use-46fab66e7136f738c7f98b1a85981683cbffa704.tar
drakx-backup-do-not-use-46fab66e7136f738c7f98b1a85981683cbffa704.tar.gz
drakx-backup-do-not-use-46fab66e7136f738c7f98b1a85981683cbffa704.tar.bz2
drakx-backup-do-not-use-46fab66e7136f738c7f98b1a85981683cbffa704.tar.xz
drakx-backup-do-not-use-46fab66e7136f738c7f98b1a85981683cbffa704.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.c10
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 */