Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1166582

Summary: Backport /boot/*/device.map fix to augeas
Product: Red Hat Enterprise Linux 7 Reporter: Richard W.M. Jones <rjones>
Component: augeasAssignee: Dominic Cleal <dcleal>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: codong, dyuan, juzhou, liye, lkong, mbooth, ptoscano, tzheng, virt-bugs
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: V2V
Fixed In Version: augeas-1.1.0-17.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1165975 Environment:
Last Closed: 2015-03-05 09:26:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1165975    

Description Richard W.M. Jones 2014-11-21 09:50:18 UTC
+++ This bug was initially created as a clone of Bug #1165975 +++

Description of problem:
File "/boot/grub2/device.map" showing is not right after converting a rhel7 guest from esx server

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

augeas-1.1.0-16.el7.x86_64

To support this in virt-v2v we need a one-line change to
Augeas in RHEL 7.1:

  commit 6ee12b6a705cc5da3558847fe4782e2ac30bcc10
  Author: Mike Latimer <mlatimer>
  Date:   Mon May 5 13:08:14 2014 -0600

    Device_map: Parse all device.map files under /boot

...

--- a/lenses/device_map.aug
+++ b/lenses/device_map.aug
@@ -21,7 +21,7 @@ module Device_map =
 
   let lns = ( empty | comment | map ) *
 
-  let xfm = transform lns (incl "/boot/grub/device.map")
+  let xfm = transform lns (incl "/boot/*/device.map")
 
 (* Local Variables: *)
 (* mode: caml *)

Comment 2 Lingfei Kong 2014-12-09 02:00:47 UTC
Can reproduce with augeas-1.1.0-16.el7
Steps to reproduce:
1. #augtool print /files/boot/grub2/device.map
<Nothing>

2. #cat /usr/share/augeas/lenses/dist/device_map.aug |grep device.map
(* Parsing grub's device.map *)
  let xfm = transform lns (incl "/boot/grub/device.map")

Only include file /boot/grub/device.map but not /boot/grub2/device.map.


Verify with augeas-1.1.0-17.el7
Steps to verify:
1. #cat /boot/grub2/device.map
# this device map was generated by anaconda
(hd0)      /dev/sda

2. #augtool  print /files/boot/grub2/device.map
/files/boot/grub2/device.map
/files/boot/grub2/device.map/#comment = "this device map was generated by anaconda"
/files/boot/grub2/device.map/hd0 = "/dev/sda"

3. #cat /usr/share/augeas/lenses/dist/device_map.aug |grep device.map
(* Parsing grub's device.map *)
  let xfm = transform lns (incl "/boot/*/device.map")

This lense parse file /boot/*/device.map include /boot/grub2/device.map


So bug is fixed.

Comment 4 errata-xmlrpc 2015-03-05 09:26:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0399.html