Skip to content

Commit a349689

Browse files
committed
fixed some systemd mount problems
1 parent d9fa592 commit a349689

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

builder.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ case "$1" in
3737
clean_directories
3838
exit 0
3939
;;
40+
mount)
41+
echo "Mounting chroot filesystems"
42+
do_mount
43+
;;
44+
unmount)
45+
echo "Un mounting chroot filesystems"
46+
do_unmount
47+
;;
4048
setup)
4149
echo "Setting up PATH"
4250
set_path

functions

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,16 @@ reset_path ()
4848
#do the mount magic
4949
do_mount ()
5050
{
51+
echo "mount -o bind $BASE_DIR/$KERNEL_DIR $BASE_DIR/$ROOT_TARGET/$KERNEL_DIR"
5152
mount -o bind $BASE_DIR/$KERNEL_DIR $BASE_DIR/$ROOT_TARGET/$KERNEL_DIR;
53+
echo "mount -t proc proc $BASE_DIR/$ROOT_TARGET/proc/"
5254
mount -t proc proc $BASE_DIR/$ROOT_TARGET/proc/;
55+
echo "mount -t sysfs sys $BASE_DIR/$ROOT_TARGET/sys/"
5356
mount -t sysfs sys $BASE_DIR/$ROOT_TARGET/sys/;
57+
echo "mount -o bind /dev $BASE_DIR/$ROOT_TARGET/dev/"
5458
mount -o bind /dev $BASE_DIR/$ROOT_TARGET/dev/;
55-
mount -t devpts pts $BASE_DIR/$ROOT_TARGET/dev/pts/;
59+
echo "mount -t devpts devpts $BASE_DIR/$ROOT_TARGET/dev/pts/"
60+
mount -t devpts devpts -o mode=620,gid=5 $BASE_DIR/$ROOT_TARGET/dev/pts/;
5661
}
5762
do_unmount ()
5863
{

0 commit comments

Comments
 (0)