Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 555856 - sys-kernel/dracut - unable to mount /usr
Summary: sys-kernel/dracut - unable to mount /usr
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords: PATCH
: 555854 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-25 09:22 UTC by Dumitru Ionica
Modified: 2017-07-02 23:22 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Picture of laptop screen unable to boot because of faulty Dracut. (CKv9IrbWoAA1TYv.jpg,114.49 KB, image/jpeg)
2015-07-25 09:24 UTC, Dumitru Ionica
Details
Contents of /etc/fstab (fstab.txt,1.35 KB, text/plain)
2015-07-27 08:44 UTC, Dumitru Ionica
Details
usrmount-remove-quotes-from-label-and-uuid.patch (usrmount-remove-quotes-from-label-and-uuid.patch,999 bytes, patch)
2015-07-27 22:52 UTC, Alexander Tsoy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dumitru Ionica 2015-07-25 09:22:35 UTC
Dracut is unable to mount /usr if on separate partition, because it adds double quotes to the initramfs fstab:

mount: special device /dev/disk-by-uuid/"041af...." does not exist.

The same error also appears during boot.

The system is able to mount / of course, but it fails anything else, because it adds quotes in the access path.
Comment 1 Dumitru Ionica 2015-07-25 09:24:54 UTC
Created attachment 407572 [details]
Picture of laptop screen unable to boot because of faulty Dracut.
Comment 2 Dumitru Ionica 2015-07-25 09:29:35 UTC
*** Bug 555854 has been marked as a duplicate of this bug. ***
Comment 3 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2015-07-25 12:34:17 UTC
Please don't CC "random" teams in bugs.
Comment 4 Dumitru Ionica 2015-07-25 15:52:18 UTC
(In reply to Jorge Manuel B. S. Vicetto from comment #3)
> Please don't CC "random" teams in bugs.

I apologise, I didn't know what that was for. I thought that I had to select the arch I was using.
Comment 5 Alexander Tsoy 2015-07-27 01:33:12 UTC
Do you have quotation marks around UUID in the fstab on the real root? E.g. UUID="041af...."
Comment 6 Dumitru Ionica 2015-07-27 08:27:35 UTC
(In reply to Alexander Tsoy from comment #5)
> Do you have quotation marks around UUID in the fstab on the real root? E.g.
> UUID="041af...."

No. The quotation marks were added automatically only in the initramfs file, by Dracut. I managed to manually edit the initramfs and it booted, but I doubt it won't happen again next time I have to compile a kernel and generate a new initramfs.
Comment 7 Dumitru Ionica 2015-07-27 08:29:39 UTC
(In reply to Alexander Tsoy from comment #5)
> Do you have quotation marks around UUID in the fstab on the real root? E.g.
> UUID="041af...."

Oh, wait. That may be the case, I forgot, but the system boots just fine. There are quotation marks around the UUID of the root partition as well, but Dracut only adds marks in the wrong place only to the /usr partition in the initramfs fstab.
Comment 8 Dumitru Ionica 2015-07-27 08:44:01 UTC
Created attachment 407686 [details]
Contents of /etc/fstab

Current fstab configuration. Dracut adds the root partition without any problems, but adds quotation marks in the wrong place to the /usr partition. For the moment, it is necessary to edit the fstab in the initramfs after it has been generated by Dracut.
Comment 9 Alexander Tsoy 2015-07-27 22:52:02 UTC
Created attachment 407766 [details, diff]
usrmount-remove-quotes-from-label-and-uuid.patch

(In reply to Dumitru Ionica from comment #8)
> Dracut adds the root partition without any problems, but adds quotation 
> marks in the wrong place to the /usr partition.
It is because fstab entry for the root partition is generated from the kernel cmdline (root=...) and fstab entry for the /usr partition is generated from /sysroot/etc/fstab.

Please try attached patch.
Comment 10 Dumitru Ionica 2015-07-30 11:44:40 UTC
(In reply to Alexander Tsoy from comment #9)
> Created attachment 407766 [details, diff] [details, diff]
> usrmount-remove-quotes-from-label-and-uuid.patch
> 
> (In reply to Dumitru Ionica from comment #8)
> > Dracut adds the root partition without any problems, but adds quotation 
> > marks in the wrong place to the /usr partition.
> It is because fstab entry for the root partition is generated from the
> kernel cmdline (root=...) and fstab entry for the /usr partition is
> generated from /sysroot/etc/fstab.
> 
> Please try attached patch.

I do not know where to apply the patch. In any case, I have modified the /etc/fstab on /sysroot to contain /dev/disk/by-uuid/* instead of UUID="*", and now Dracut is able to properly generate the initramfs image.

Still, please tell me where to apply your suggested patch.
Comment 11 Alexander Tsoy 2015-07-30 21:36:22 UTC
Put the patch into the directory "/etc/portage/patches/sys-kernel/dracut" and reemerge dracut. File name must end in ".patch".