Skip to content

Commit

Permalink
do not mount using --bind, also use make-private for /dev, /dev/pts
Browse files Browse the repository at this point in the history
when using --bind and not make-private we had problems when using fai dirinstall
It always left on more mount to /dev/pts, having many mount entries
after several dirinstall
  • Loading branch information
Mrfai committed Jan 17, 2024
1 parent 67fed82 commit 4f3719b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/subroutines
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# subroutines -- useful subroutines for FAI
#
# This script is part of FAI (Fully Automatic Installation)
# (c) 2000-2023 by Thomas Lange, lange@cs.uni-koeln.de
# (c) 2000-2024 by Thomas Lange, lange@cs.uni-koeln.de
# Universitaet zu Koeln
# (c) 2001-2005 by Henning Glawe, glaweh@physik.fu-berlin.de
# Freie Universitaet Berlin
Expand Down Expand Up @@ -190,9 +190,13 @@ ctam() {
return
fi

for f in /sys /proc /dev /dev/pts; do
mount --bind $f ${target}$f
done
mount -t proc proc $target/proc
mount -t sysfs sysfs $target/sys
mount --bind /dev $target/dev
mount --make-private $target/dev
mount -t devpts devpts $target/dev/pts
mount --make-private $target/dev/pts

if [ "$FAI_ACTION" = "softupdate" -o "$FAI_ACTION" = "dirinstall" ]; then
: # do not mount efivars for these actions
else
Expand Down

0 comments on commit 4f3719b

Please sign in to comment.