6c8805c0805c34438ff523caadb2b8f035aa5d89
[openwrt-10.03/.git] / package / base-files / default / sbin / mount_root
1 #!/bin/sh
2 size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo)
3 mount none /proc -t proc
4 mount none /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777
5 mkdir -p /dev/pts
6 mount none /dev/pts -t devpts
7 mount -t sysfs none /sys 2>&-
8 mount -o remount,rw /dev/root /