bind mount dev rather than create it

This commit is contained in:
Antoine Martin 2024-08-21 14:32:19 -04:00
parent 6e29feb06a
commit d53190e941
Signed by: forge
GPG key ID: D62A472A4AA7D541

View file

@ -31,7 +31,7 @@ chroot_setup() {
chroot_add_mount sys "$1/sys" -t sysfs -o nosuid,noexec,nodev,ro && chroot_add_mount sys "$1/sys" -t sysfs -o nosuid,noexec,nodev,ro &&
# alpine-chroot will never have occasion to use efivars, so don't bother # alpine-chroot will never have occasion to use efivars, so don't bother
# mounting efivarfs here # mounting efivarfs here
chroot_add_mount udev "$1/dev" -t devtmpfs -o mode=0755,nosuid && chroot_add_mount /dev "$1/dev" -o bind &&
chroot_add_mount devpts "$1/dev/pts" -t devpts -o mode=0620,gid=5,nosuid,noexec && chroot_add_mount devpts "$1/dev/pts" -t devpts -o mode=0620,gid=5,nosuid,noexec &&
chroot_add_mount shm "$1/dev/shm" -t tmpfs -o mode=1777,nosuid,nodev && chroot_add_mount shm "$1/dev/shm" -t tmpfs -o mode=1777,nosuid,nodev &&
chroot_add_mount run "$1/run" -t tmpfs -o nosuid,nodev,mode=0755 && chroot_add_mount run "$1/run" -t tmpfs -o nosuid,nodev,mode=0755 &&