Bug 1582236
| Summary: | augeas cannot parse invalid grub.conf that grub silently accepts | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Anitha Udgiri <audgiri> | |
| Component: | augeas | Assignee: | Pino Toscano <ptoscano> | |
| Status: | CLOSED ERRATA | QA Contact: | YongkuiGuo <yoguo> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 7.5 | CC: | guillaume.pavese, rjones, yoguo | |
| Target Milestone: | rc | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | augeas-1.4.0-7.el7 | Doc Type: | If docs needed, set a value | |
| Doc Text: |
Augeas handles better invalid Grub 1 configuration files
Previously, Augeas was not able to parse Grub 1 configuration files with unknown keys, or with known keys in not allowed sections of the file. This sometime caused problems in software tools that use Augeas, such as the *virt-v2v* utility or the *Puppet* management tool. With this update, the Grub lens of Augeas handles invalid keys as #error nodes, allowing to parse, and manipulate the rest of the file as expected.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1649262 (view as bug list) | Environment: | ||
| Last Closed: | 2019-08-06 12:02:32 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: | 1651787 | |||
|
Description
Anitha Udgiri
2018-05-24 15:40:57 UTC
That's because of the acpi=off line in grub.conf. I don't see that as allowed configuration key nor command for grub1, so the quick (and most probably the most correct one) fix is just commenting the above line. Information from Customer about the remaining files requested : Both requested files are symbolic links to /boot/grub/grub.conf. # ls -l /boot/grub/menu.lst lrwxrwxrwx 1 root root 11 Jun 7 2012 /boot/grub/menu.lst -> ./grub.conf # ls -l /etc/grub.conf lrwxrwxrwx 1 root root 22 Jun 7 2012 /etc/grub.conf -> ../boot/grub/grub.conf Discussion moved to upstream mailing list: https://www.redhat.com/archives/augeas-devel/2018-May/msg00002.html Since the fix for this bug actually makes augeas able to parse invalid grub.conf files (leaving invalid lines as #error nodes), I'm retitling it to be slightly more general, so other similar cases can be mapped to this. *** Bug 1618916 has been marked as a duplicate of this bug. *** Verified with package: augeas-1.4.0-8.el7 Step: 1. # augtool augtool> print /files/etc/grub.conf /files/etc/grub.conf /files/etc/grub.conf/#comment[1] = "grub.conf generated by anaconda" /files/etc/grub.conf/#comment[2] = "Note that you do not have to rerun grub after making changes to this file" /files/etc/grub.conf/#comment[3] = "NOTICE: You have a /boot partition. This means that" /files/etc/grub.conf/#comment[4] = "all kernel and initrd paths are relative to /boot/, eg." /files/etc/grub.conf/#comment[5] = "root (hd0,0)" /files/etc/grub.conf/#comment[6] = "kernel /vmlinuz-version ro root=/dev/sda3" /files/etc/grub.conf/#comment[7] = "initrd /initrd-version.img" /files/etc/grub.conf/boot = "/dev/sda1" /files/etc/grub.conf/#error = "acpi=off" /files/etc/grub.conf/default = "0" /files/etc/grub.conf/timeout = "5" /files/etc/grub.conf/splashimage = "(hd0,0)/grub/splash.xpm.gz" /files/etc/grub.conf/#comment[8] = "hiddenmenu" /files/etc/grub.conf/title[1] = "_.--< luxser001 >--._ (2.6.18-238.el5)" /files/etc/grub.conf/title[1]/root = "(hd0,0)" /files/etc/grub.conf/title[1]/kernel = "/vmlinuz-2.6.18-238.el5" /files/etc/grub.conf/title[1]/kernel/ro /files/etc/grub.conf/title[1]/kernel/root = "LABEL=/" /files/etc/grub.conf/title[1]/kernel/quiet /files/etc/grub.conf/title[1]/kernel/nomodeset /files/etc/grub.conf/title[1]/initrd = "/initrd-2.6.18-238.el5.img" /files/etc/grub.conf/title[2] = "RHELS 5.6 (2.6.18-238.el5) original nach Installation" /files/etc/grub.conf/title[2]/root = "(hd0,0)" /files/etc/grub.conf/title[2]/kernel = "/vmlinuz-2.6.18-238.el5" /files/etc/grub.conf/title[2]/kernel/ro /files/etc/grub.conf/title[2]/kernel/root = "LABEL=/" /files/etc/grub.conf/title[2]/kernel/rhgb /files/etc/grub.conf/title[2]/kernel/quiet /files/etc/grub.conf/title[2]/initrd = "/initrd-2.6.18-238.el5.img" The 'acpi=off' line can be parsed as error configuration. 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://access.redhat.com/errata/RHBA-2019:2019 |