• Christoph Hellwig's avatar
    init: allow mounting arbitrary non-blockdevice filesystems as root · f9259be6
    Christoph Hellwig authored
    Currently the only non-blockdevice filesystems that can be used as the
    initial root filesystem are NFS and CIFS, which use the magic
    "root=/dev/nfs" and "root=/dev/cifs" syntax that requires the root
    device file system details to come from filesystem specific kernel
    command line options.
    
    Add a little bit of new code that allows to just pass arbitrary
    string mount options to any non-blockdevice filesystems so that it can
    be mounted as the root file system.
    
    For example a virtiofs root file system can be mounted using the
    following syntax:
    
    "root=myfs rootfstype=virtiofs rw"
    
    Based on an earlier patch from Vivek Goyal <vgoyal@redhat.com>.
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    f9259be6
do_mounts.c 15.8 KB