RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1967958 - dracut: Add support for virtiofs as root filesystem
Summary: dracut: Add support for virtiofs as root filesystem
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: dracut
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Pavel Valena
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
: 2076212 (view as bug list)
Depends On: 2066816 2085347
Blocks: 2054152
TreeView+ depends on / blocked
 
Reported: 2021-06-04 14:25 UTC by Vivek Goyal
Modified: 2022-08-17 14:20 UTC (History)
11 users (show)

Fixed In Version: dracut-057-13.git20220816.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-17 14:20:00 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github dracutdevs dracut pull 1784 0 None Merged feat(virtiofs): virtiofs root filesystem support 2022-05-06 10:34:44 UTC

Description Vivek Goyal 2021-06-04 14:25:20 UTC
Description of problem:

dracut currently can't deal with mounting virtiofs as root filesystem. Add support for virtiofs in dracut. People are trying to use virtiofs as rootfs
and complaining.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 David Tardon 2021-06-08 11:21:29 UTC
I assume you have the set up to test this easily, so: does it work if you add qemu module into initrd? If not, does it work if you add qemu module and virtiofs driver?

Comment 2 Vivek Goyal 2021-06-08 15:52:21 UTC
(In reply to David Tardon from comment #1)
> I assume you have the set up to test this easily, so: does it work if you
> add qemu module into initrd? If not, does it work if you add qemu module and
> virtiofs driver?

I don't have a working setup yet. Frankly speaking, my initrd will not mount it and drop me to emergency shell. There I will mount it manually "mount -t virtiofs myfs /sysroot" and then continue booting.

I think one problem is that how rootfs device should be specified for virtiofs filessytem. There does not seem to be a good way and different kind of hacks are being used. I have proposed one patch upstream
just now.

https://lore.kernel.org/linux-fsdevel/20210608153524.GB504497@redhat.com/

If this gets accepted then we can specify "root=fstag:myfs rootfstype=virtiofs" on kernel command line. I am assuming that some dracut module can parse this and mount virtiofs. Not sure if we will need a separate
virtiofs module for this or some existing module can take care this.

I have not played with "qemu" module. Can give it a try. What is it supposed to do? I mean what kind of filesystems it can mount.

Comment 3 Vivek Goyal 2021-06-08 20:16:31 UTC
I see that we have a module 95virtfs/ which seems to have support for 9p/virtfs. I think we will need something similar for virtiofs.

What I am not sure is that does dracut relies on same syntax for "root=" option for kernel and dracut. Or dracut has moved on and has its own
way to parse root= option irrespective of kernel.

If dracut parses "root=virtiofs:myfs", then problem becomes little easier. Or may be we can modify it to parse "root=fstag:myfs rootfstype=virtiofs" combo so that it is inline with kernel parsing. Assuming kernel,
will accept my proposal.

Comment 4 David Tardon 2022-04-19 10:05:10 UTC
*** Bug 2076212 has been marked as a duplicate of this bug. ***

Comment 5 German Maglione 2022-04-20 16:38:25 UTC
I have sent a PR to add virtiofs as a dracut module.
https://github.com/dracutdevs/dracut/pull/1784

Comment 10 Pavel Valena 2022-07-13 21:52:16 UTC
Hello, please test, if you can, whether the planned rebase for 9.1 works for you.

RPMS: https://github.com/pvalena/rpms/tree/main/dracut/2066816


Note You need to log in before you can comment on or make changes to this bug.