70 |
# mount essential filesystems |
# mount essential filesystems |
71 |
mount -t proc proc /proc |
mount -t proc proc /proc |
72 |
mount -t sysfs sysfs /sys |
mount -t sysfs sysfs /sys |
73 |
mount -t tmpfs tmpfs /dev -o rw,mode=0644,size=1024 |
if [[ -z $(grep '[[:space:]]/dev[[:space:]]' /proc/mounts | cut -d ' ' -f2) ]] |
74 |
|
then |
75 |
|
# many video drivers needed exec access |
76 |
|
fstype=ramfs |
77 |
|
# tmpfs was suggested by Greg Kroah-Hartman |
78 |
|
[[ $(grep '[[:space:]]tmpfs' /proc/filesystems | cut -d $'\t' -f2) = tmpfs ]] && fstype=tmpfs |
79 |
|
# mount devtmpfs if supported |
80 |
|
[[ $(grep '[[:space:]]devtmpfs' /proc/filesystems | cut -d $'\t' -f2) = devtmpfs ]] && fstype=devtmpfs |
81 |
|
mount -t ${fstype} dev /dev -o exec,nosuid,mode=0755,size=10M |
82 |
|
fi |
83 |
|
|
84 |
# install all busybox applets |
# install all busybox applets |
85 |
busybox --install -s |
busybox --install -s |