[CentOS] why no /dev/loop0 in install chroot system?

Isaac Hailperin

ihailper at googlemail.com
Tue Feb 24 16:26:00 UTC 2009


Hi,

just out of curiosity: 
Within a kickstart postinstall script, I tried to do a loop mount, which
failed. It turns out that there is no /dev/loop0 (no /dev/loop<x>).
After creating it with 
mknod /dev/loop0 b 7 0
everything works fine.

Now this script executes in the chroot system. This is the system on the
hd. A plain chroot system should not have any /dev or /proc mounted. But
actually, it does:
+ cat /proc/mounts
rootfs / rootfs rw 0 0
/proc /proc proc rw 0 0
/dev /dev tmpfs rw 0 0
/dev/pts /dev/pts devpts rw 0 0
/sys /sys sysfs rw 0 0
none /tmp ramfs rw 0 0
none /tmp/ramfs ramfs rw 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
/tmp/loop0 /mnt/runtime squashfs ro 0 0
/tmp/sda1 / ext3 rw,data=ordered 0 0
/tmp/sda3 /home ext3 rw,data=ordered 0 0
/tmp/sys /sys sysfs rw 0 0
/tmp/proc /proc proc rw 0 0
/dev /dev tmpfs rw 0 0

So I assume that centos kindly does a bind mount of these
pseudofilesystems (?) from the install system for me, so that the chroot
system is a fully functional system. (Is that true?).
If that is so, why is there no /dev/loop0?

Isaac




More information about the CentOS mailing list