[Virtio-fs] Virtiofs Kernel Boot howto

Vivek Goyal vgoyal at redhat.com
Fri Jun 4 20:58:17 UTC 2021


On Fri, Jun 04, 2021 at 11:28:42AM -0500, Harry G. Coin wrote:
> Mentioned up-list, here's a further little helper to allow virtio-fs root.

Hi Harry,

Thanks for posting instructions on how to boot with virtiofs as rootfs.

[..]
> and as 'kernel args' (presuming you've built dracut with the added conf
> files I published on this list previously):
> 
> root=virtiofs:myfs rd.shell rd.fstab

Ok, this is interesting bit that how virtiofs root should be specified
so that it can be parsed both by kernel as well as initramfs module.

I don't think "root=virtiofs:myfs" is recognized by kernel. So you must
have coded dracut module to parse it appropriately.

I just want to make sure that we have a common agreed upon format
to specify virtiofs as root device. Stefan had posted some pathces
to kernel in the past but I think review suggested more work and
things did not progress after that.

https://lore.kernel.org/linux-fsdevel/20190906100324.8492-1-stefanha@redhat.com/

Stefan had suggested syntax "rootfstype=virtiofs root=myfs rw".

Now various kind of hacks are being used. Atleast I am aware of two.

- For vhost-user-fs-pci device use "tag=mtdmyfs" and pass following in
  kernel command line. This hack was proposed by stefan.

  "root=mtdmyfs rootfstype=virtiofs rw"

- For vhost-user-fs-pci device use "tag=/dev/root" and pass following in
  kernel command line.

  "rootfstype=virtiofs rw"

Anyway, point being that instead of using hacks, will be good if we
can fix kernel to accept an option for virtiofs and then fix
dracut accordingly. Don't want two different ways of doing things
for dracut and kernel.

Thanks
Vivek




More information about the Virtio-fs mailing list