early-filesystems.sh 573 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. if [ "$1" = start ]; then
  3. PATH=/usr/bin:/usr/sbin:/bin:/sbin
  4. # Must have sysfs mounted for udevtrigger to function.
  5. mount -n -t sysfs sysfs /sys
  6. # Ideally devtmpfs will be mounted by kernel:
  7. mount -n -t devtmpfs tmpfs /dev
  8. mount -n -t tmpfs -o mode=775 tmpfs /run
  9. # "hidepid=1" doesn't appear to take effect on first mount of /proc,
  10. # so we mount it and then remount:
  11. mount -n -t proc -o hidepid=1 proc /proc
  12. mount -n -t proc -o remount,hidepid=1 proc /proc
  13. mkdir /run/udev
  14. mkdir /dev/pts
  15. mkdir /dev/shm
  16. fi