rootfs não mostram in / proc / mounts - Então, isso significa o doc fora da data? Não. Consulte Por há nenhum sistema de arquivo rootfs presente no meu sistema?
As of Linux v4.17, this kernel documentation is still up to date. rootfs is always present; it cannot be unmounted. But a lot of the time you cannot see it in /proc/mounts.
You can see rootfs if you boot into an initramfs shell. If your initramfs is
dracut
, as in Fedora Linux, you can do this by adding the optionrd.break
to the kernel command line. (E.g. inside the GRUB boot loader):switch_root:/# grep rootfs /proc/mounts rootfs / rootfs rw 0 0
When dracut switches the system to the real root filesystem, you can no longer see rootfs in /proc/mounts. dracut can use either
switch_root
orsystemd
to do this. Both of these follow the same sequence of operations, as specified in the linked kernel doc. The operation which hides rootfs ischroot
.switch_root:/# cd /sysroot switch_root:/sysroot# mount --bind /proc proc switch_root:/sysroot# grep rootfs proc/mounts rootfs / rootfs rw 0 0 switch_root:/sysroot# chroot . sh-4.4# cat proc/mounts /dev/sda3 / ext4 ro,relatime 0 0 proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
[...]