O Linux ainda usa rootfs?

2

No arquivo de documentação do kernel " ramfs, rootfs e initramfs " diz

Rootfs is a special instance of ramfs (or tmpfs, if that's enabled), which is always present in 2.6 systems.

Eu não vi rootfs em /proc/mounts em minhas instalações de desktop do Linux, mas vejo isso no meu telefone Android. Ambos executam o Linux 3. O rootfs ainda é necessário? O que é isso também?

    
por Melab 26.10.2015 / 15:40

1 resposta

0

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 option rd.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 or systemd to do this. Both of these follow the same sequence of operations, as specified in the linked kernel doc. The operation which hides rootfs is chroot.

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

[...]

    
por 13.07.2018 / 17:17