I am trying to understand how kernel mounting the filesystem. While checking the source, I have observed that do_mounts.c file having the source related to mounting (rootfs file system is registered inside init_rootfs()).
rootfs_mount() function was called by start_kernel() initially, I could not able to understand the usage of mount_nodev() inside rootfs_mount(). Could you please help me to understand the logic behind calling rootfs_mount() from start_kernel(), as it is not mounting any filesystem.
Actual filesystem mounting is initiated by calling mount_nfs_root() or mount_block_root() functions from kernel_init(), please tell me if my understanding is different.
rootfs_mount()instart_kernel(). - Armalitype->mountinmount_fs()isrootfs_mount(fromrootfs_fs_type). - Armali