Bug 827019 - dracut has problems with the use of fstab.sys entries
dracut has problems with the use of fstab.sys entries
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dracut (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: dracut-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-31 08:51 EDT by Russ
Modified: 2012-07-03 11:48 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-03 11:48:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Russ 2012-05-31 08:51:40 EDT
Description of problem:
Dracut currently has issues with the use of /etc/fstab.sys

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

How reproducible:
always

Steps to Reproduce:
1. Create the /etc/fstab.sys to allow boot of system with split-off /usr
2. Create an initramfs in F17 using dracut, or install new kernel package
3. Reboot system using new initramfs
  
Actual results:
System does not boot into rootfs with usrmove and split-off /usr.

Expected results:
System should boot into rootfs.

Additional info:
It seems there are a few issues which cause problems with dracut in F17 if you have a split-off /usr and need to use /etc/fstab.sys. There is very little documentation on the subject. So it has taken me a while to come up with a usable configuration on my test system. During the work it took to get the system working I noticed a few bugs:

1) Dracut does not seem to support the use of UUIDs in fstab.sys. I discovered this in dracut-017 while trying to get usrmove to work. The lack of UUID support in fstab.sys is a serious issue.

2) Listing the rootfs partition in fstab.sys will cause dracut to remount the rootfs as rw. The mounting of the rootfs as rw then causes the following fsck to fail. The failure of the (second) fsck of the rootfs causes boot failure and results in dropping to a dracut shell.

In addition to the above problems, there is also no documentation on the wiki page at https://fedoraproject.org/wiki/Upgrading_Fedora_using_yum#Fedora_16_-.3E_Fedora_17 about the need to have a fstab.sys entry if you have a split-off /usr. It took me a lot of trial and error to find the correct dracut commands to get a bootable system.

Booting a stock Fedora kernel now works after bypassing the above bugs. But I also seem to have the dracut udev problem in https://bugzilla.redhat.com/show_bug.cgi?id=811003. When attempting to use a custom kernel dracut does not boot the system, or even drop to a dracut shell. Instead it spews messages about missing udev devices. . . I currently do not have more information to add to that bug, as there is not enough output available. I don't yet have a serial console configured for that initfs. But I will try to add more info to the udev bug once I can obtain some output from dracut.
Comment 1 Harald Hoyer 2012-06-04 04:37:48 EDT
you should not need to put /usr in fstab.sys, dracut's "98usrmount" module should take care of it by reading the real /etc/fstab and mount /usr according to it.



(In reply to comment #0)
> 1) Dracut does not seem to support the use of UUIDs in fstab.sys. I
> discovered this in dracut-017 while trying to get usrmove to work. The lack
> of UUID support in fstab.sys is a serious issue.
> 
> 2) Listing the rootfs partition in fstab.sys will cause dracut to remount
> the rootfs as rw. The mounting of the rootfs as rw then causes the following
> fsck to fail. The failure of the (second) fsck of the rootfs causes boot
> failure and results in dropping to a dracut shell.

did you put "ro" in the options?

> 
> In addition to the above problems, there is also no documentation on the
> wiki page at
> https://fedoraproject.org/wiki/Upgrading_Fedora_using_yum#Fedora_16_-.
> 3E_Fedora_17 about the need to have a fstab.sys entry if you have a
> split-off /usr. It took me a lot of trial and error to find the correct
> dracut commands to get a bootable system.

How did you manage a split off /usr prior to F17 anyway? :)
Comment 2 Russ 2012-06-05 06:40:46 EDT
(In reply to comment #1)
> you should not need to put /usr in fstab.sys, dracut's "98usrmount" module
> should take care of it by reading the real /etc/fstab and mount /usr
> according to it.

In order to do the usrmount upgrade from F16 with a split-off /usr you must have an fstab.sys. The F16 dracut does not have a usrmount module.
 
> did you put "ro" in the options?

No. Why would I want to mount root as ro?


> 
> How did you manage a split off /usr prior to F17 anyway? :)

Ugh, FYI, Red Hat and Linux FHS has ALWAYS had a split-off /usr as a desirable option for ease of system administration. The system in question is my test system, which once deemed stable enough is used for our base images. The system has used a split-off /usr since it was first set up using Red Hat 5.1 on the date when that OS was released. Everything since that time has been continual (and sometimes extremely difficult) rpm or yum upgrades from the initial install. So my question to you would be how did you manage WITHOUT a split-off /usr prior to F17? :0 :)
Comment 3 Russ 2012-06-05 06:47:38 EDT
BTW, the Red Hat 5.1 referred to in the above comment is NOT RHEL.
Comment 4 Harald Hoyer 2012-06-05 12:08:54 EDT
(In reply to comment #2)
> (In reply to comment #1)
> > you should not need to put /usr in fstab.sys, dracut's "98usrmount" module
> > should take care of it by reading the real /etc/fstab and mount /usr
> > according to it.
> 
> In order to do the usrmount upgrade from F16 with a split-off /usr you must
> have an fstab.sys. The F16 dracut does not have a usrmount module.

ok, in that case, you would have to use the F17 dracut.
Comment 5 Harald Hoyer 2012-06-05 12:14:33 EDT
(In reply to comment #2)
> (In reply to comment #1)
> > did you put "ro" in the options?
> 
> No. Why would I want to mount root as ro?

ah, maybe you don't have "rw" on the kernel command
Comment 6 Fedora Update System 2012-06-06 05:49:02 EDT
dracut-018-55.git20120606.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/dracut-018-55.git20120606.fc16
Comment 7 Harald Hoyer 2012-06-06 06:05:38 EDT
(In reply to comment #6)
> dracut-018-55.git20120606.fc16 has been submitted as an update for Fedora 16.
> https://admin.fedoraproject.org/updates/dracut-018-55.git20120606.fc16

created this update for you... F16 dracut, which can mount /usr and does not need fstab.sys if you turn on the host-only mode.
Comment 8 Russ 2012-06-06 06:51:48 EDT
> 
> ok, in that case, you would have to use the F17 dracut.

No. That did not work. That resulted in the udev problem I noted above. I still can't get a F17 dracut initfs to work, except for the stock F17 kernel, due to the udev issue noted above.

The workaround was by using fstab.sys.

> ah, maybe you don't have "rw" on the kernel command

Hmmm. Maybe I don't? Seems like I put it in there as part of the wiki instructions. But maybe it is not still there. Maybe that is why the F17 dracut is not working for a vanilla kernel even after the upgrade. . .

Thanks for the hint. I will check into that and report back.

>created this update for you... F16 dracut, which can mount /usr and does not >need fstab.sys if you turn on the host-only mode.

Thank you very, VERY much! That was the main reason I created this bug. That will enable us to upgrade the other hosts once we get the other F17 bugs ironed out.

Much thanks!!
Comment 9 Russ 2012-06-06 07:24:44 EDT
> ah, maybe you don't have "rw" on the kernel command

> Hmmm. Maybe I don't? Seems like I put it in there as part of the wiki 
> instructions. But maybe it is not still there. Maybe that is why the F17 dracut > is not working for a vanilla kernel even after the upgrade. . .

> Thanks for the hint. I will check into that and report back.

No. The new kernel command lines have rw.

I would say that the F16 dracut update would pretty much resolve the fstab issue if it works. I don't currently have a way to test it, however, as the system in question has already been upgraded. The dracut update also obviates the need to alter the wiki. 

Now that the upgrade to F17 is completed, I still have the udev issue when attempting to use a vanilla kernel. I tried "rdshell rdinitdebug" in the kernel command line. But dracut cannot drop to a shell so I can get more information. Udev is saying it cannot access any of the storage devices. Dracut command is host-only mode with no other options except verbose and -f.

The dracut udev problem is really a separate issue. This dracut bug can be closed as it seems to be resolved. 

The udev problem is https://bugzilla.redhat.com/show_bug.cgi?id=811003.
Comment 10 Russ 2012-06-06 08:27:38 EDT
I just realized that you are basing your F16 upgrade on dracut-018. Unfortunately that will not work at present. Dracut-018 has the udev problem in https://bugzilla.redhat.com/show_bug.cgi?id=811003. It will not boot some machines such as the one I am using. So, regretfully, I have hold back on my thanks for a while. This bug needs to stay open.

You need to pull the above update. Do not release it! Currently we are better off using dracut-017. Fortunately at least that dracut works in most instances. Dracut-018 does not work at all. I tried your update. It resulted in the udev issue and an unbootable system.

If you can easily rebase your update using dracut-017 that would resolve this bug. Otherwise the resolution of this bug will need to wait until the udev issue in https://bugzilla.redhat.com/show_bug.cgi?id=811003 is resolved.
Comment 11 Fedora Update System 2012-06-07 19:07:13 EDT
Package dracut-018-55.git20120606.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dracut-018-55.git20120606.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-9063/dracut-018-55.git20120606.fc16
then log in and leave karma (feedback).
Comment 12 Russ 2012-06-08 09:30:00 EDT
(In reply to comment #11)
> Package dracut-018-55.git20120606.fc16:
> * should fix your issue,
> * was pushed to the Fedora 16 testing repository,
> * should be available at your local mirror within two days.

This is ridiculous! Is anybody even reading this bug besides me?

Unless the udev issue in dracut-018 is resolved then releasing this package probably creates more issues than it solves.

To reiterate:
Package dracut-018-55.git20120606.fc16:
Will NOT fix my issue,
Should NOT be pushed to the Fedora 16 testing repository,
Should NOT be made available at your local mirror within two days.

Fix the dracut-018 bug FIRST. Then release it to F16.

I see no information in https://bugzilla.redhat.com/show_bug.cgi?id=811003 to say it has been resolved.
Comment 13 Russ 2012-06-11 11:46:08 EDT
My dracut udev issue does not appear to be related to https://bugzilla.redhat.com/show_bug.cgi?id=811003. A new bug was created for my dracut udev issue and is at https://bugzilla.redhat.com/show_bug.cgi?id=830881.

Since the udev issue in dracut-018 appears to be primarily related to the newer udev, and not dracut itself, I went ahead and tried testing dracut-018-55.git20120606.fc16 on one of our other systems. Here are the results:

Using dracut with -H the boot output is approx. as follows:

"mounting root as ro" (that can't be done yet, as convertfs has not been done)
attempting to mount /sysroot/dev as /dev failed
unable to mount /dev
boot failed

If this dracut is to be released as a F16 update then it can't be assuming that it is running on a converted fs with usrmount. If it does the boot fails. The usrmount script needs to act like dracut-013.fc16 with fstab.sys until it has verified that a convertfs has been done. So revisions need to be made to the usrmount script for F16 (it really should be done for all, a test could easily be done to check for a converted fs  - you can't just go assuming that the system has been converted to a ro rootfs). 

You can't just use the F17 dracut with updated dependencies and a new name in F16.
Comment 14 Fedora Update System 2012-07-03 11:48:16 EDT
dracut-018-55.git20120606.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

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