| Summary: | dracut fails if /usr/bin/eject is symlink | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dan Streetman <ddstreet> | ||||||
| Component: | dracut | Assignee: | Harald Hoyer <harald> | ||||||
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | rawhide | CC: | bodhi.zazen, harald, jonathan | ||||||
| Target Milestone: | --- | Keywords: | Triaged | ||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2011-09-01 09:37:41 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Attachments: |
|
||||||||
Created attachment 502285 [details]
patch to change /usr/sbin/eject reference to /usr/bin/eject
This patch changes dracut_install /usr/sbin/eject to dracut_install /usr/bin/eject.
Harald, can you provide your thoughts on this bug? -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers Created attachment 505979 [details]
proposed patch
can you test, if this works?
(In reply to comment #4) > Created attachment 505979 [details] > proposed patch > > can you test, if this works? Yes, thanks, with the latest git code, that does work. Note that I tested using the latest git using the local "-l" parameter. With eject as a busybox symlink in /usr/bin: lrwxrwxrwx 1 root root 18 Jun 22 09:09 /usr/bin/eject -> ../../sbin/busybox the resulting initramfs contains that symlink under /usr/bin, and (for testing purposes only) if I move the symlink to /usr/sbin: lrwxrwxrwx 1 root root 18 Jun 22 09:09 /usr/sbin/eject -> ../../sbin/busybox the resulting initramfs contains the symlink under /usr/sbin. With the eject rpm installed, which creates both a link in /usr/bin and installs the actual eject in /usr/sbin: lrwxrwxrwx. 1 root root 13 Jun 22 09:14 /usr/bin/eject -> consolehelper -rwxr-xr-x. 1 root root 32064 Jan 18 18:43 /usr/sbin/eject the resulting initramfs contains only the real binary, /usr/sbin/eject. Also, I'm using an older version of dracut, 004, and in that code version, while the patch does work with the busybox symlink, it does not work when the eject rpm is installed, in that case it installs the /usr/bin/eject symlink to the consolehelper binary, instead of the /usr/sbin/eject binary itself. I think just for the 004 code version I will use the following patch; please let me know if you think I should adjust it. Thanks. --- dracut-004/modules.d/90dmsquash-live/install 2011-06-22 12:15:42.330318683 -0500 +++ b/modules.d/90dmsquash-live/install 2011-06-22 12:17:02.805016390 -0500 @@ -7,7 +7,7 @@ inst losetup inst grep # eject might be a symlink to consolehelper -if [ -L /usr/bin/eject ]; then +if [ -L /usr/bin/eject -a -e /usr/sbin/eject ]; then dracut_install /usr/sbin/eject else inst eject Again, the above patch is only for my use with the 004 dracut code, your attached patch does work with the latest git code according to my tests. Thanks! (In reply to comment #5) > (In reply to comment #4) > > Created attachment 505979 [details] > > proposed patch > > > > can you test, if this works? > > Yes, thanks, with the latest git code, that does work. Note that I tested > using the latest git using the local "-l" parameter. > > With eject as a busybox symlink in /usr/bin: > lrwxrwxrwx 1 root root 18 Jun 22 09:09 /usr/bin/eject -> ../../sbin/busybox > the resulting initramfs contains that symlink under /usr/bin, and (for testing > purposes only) if I move the symlink to /usr/sbin: > lrwxrwxrwx 1 root root 18 Jun 22 09:09 /usr/sbin/eject -> ../../sbin/busybox > the resulting initramfs contains the symlink under /usr/sbin. > > > With the eject rpm installed, which creates both a link in /usr/bin and > installs the actual eject in /usr/sbin: > lrwxrwxrwx. 1 root root 13 Jun 22 09:14 /usr/bin/eject -> consolehelper > -rwxr-xr-x. 1 root root 32064 Jan 18 18:43 /usr/sbin/eject > the resulting initramfs contains only the real binary, /usr/sbin/eject. > > > > Also, I'm using an older version of dracut, 004, and in that code version, > while the patch does work with the busybox symlink, it does not work when the > eject rpm is installed, in that case it installs the /usr/bin/eject symlink to > the consolehelper binary, instead of the /usr/sbin/eject binary itself. I > think just for the 004 code version I will use the following patch; please let > me know if you think I should adjust it. Thanks. > --- dracut-004/modules.d/90dmsquash-live/install 2011-06-22 > 12:15:42.330318683 -0500 > +++ b/modules.d/90dmsquash-live/install 2011-06-22 12:17:02.805016390 -0500 > @@ -7,7 +7,7 @@ inst losetup > inst grep > > # eject might be a symlink to consolehelper > -if [ -L /usr/bin/eject ]; then > +if [ -L /usr/bin/eject -a -e /usr/sbin/eject ]; then > dracut_install /usr/sbin/eject > else > inst eject > > > Again, the above patch is only for my use with the 004 dracut code, your > attached patch does work with the latest git code according to my tests. > > Thanks! Ok, will use your patch in 004 (RHEL-6) and my patch in upstream. Thank you! |
Description of problem: If there is a symlink /usr/bin/eject, but not a /usr/sbin/eject, dracut fails. Version-Release number of selected component (if applicable): latest git. How reproducible: 100% Steps to Reproduce: 1. create a symlink /usr/bin/eject 2. make sure there is no /usr/sbin/eject 3. run dracut Actual results: Failure, e.g.: ... I: Installing /bin/dd I: Installing /sbin/losetup I: Installing /lib64/libpcre.so.0.0.1 I: Installing /bin/grep E: Failed to install /usr/sbin/eject Expected results: No failure Additional info This is due to what appears to be a typo in the modules.d/90dmsquash-live/module-setup.sh file. It has the following code, which checks for /usr/bin/eject but then operates on /usr/sbin/eject; I assume that dracut_install should use /usr/bin/eject instead. # eject might be a symlink to consolehelper if [ -L /usr/bin/eject ]; then dracut_install /usr/sbin/eject else inst eject fi