Skip to content

Commit 6d754f8

Browse files
committed
Hide mdadm during image building
1 parent 068d61d commit 6d754f8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rootfs/make_rootfs.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ do_chroot() {
141141
mount -o bind /tmp "$DEST/tmp"
142142
chroot "$DEST" mount -t proc proc /proc
143143
chroot "$DEST" mount -t sysfs sys /sys
144+
chroot "$DEST" mount --bind /dev/null /proc/mdstat
144145
chroot "$DEST" $cmd
145-
chroot "$DEST" umount /sys
146-
chroot "$DEST" umount /proc
146+
chroot "$DEST" umount /sys /proc/mdstat /proc
147147
umount "$DEST/tmp"
148148
}
149149

@@ -295,6 +295,7 @@ mkdir -p "$DEST/usr"
295295
rm -f "$DEST/usr/bin/qemu-arm-static"
296296
rm -f "$DEST/usr/bin/qemu-aarch64-static"
297297
rm -f "$DEST/usr/sbin/policy-rc.d"
298+
rm -f "$DEST/usr/local/bin/mdadm"
298299
rm -f "$DEST/var/lib/dbus/machine-id"
299300
rm -f "$DEST/SHA256SUMS"
300301

0 commit comments

Comments
 (0)