Bug 1583675 - grub2-mkconfig results in unbootable system with LVM
Summary: grub2-mkconfig results in unbootable system with LVM
Keywords:
Status: CLOSED DUPLICATE of bug 1561258
Alias: None
Product: ovirt-node
Classification: oVirt
Component: General
Version: 4.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Ryan Barry
QA Contact: Ying Cui
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-29 13:08 UTC by Alex
Modified: 2018-05-29 13:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 13:42:27 UTC
oVirt Team: Node
Embargoed:


Attachments (Terms of Use)
Choose the right VG in grub config (515 bytes, patch)
2018-05-29 13:08 UTC, Alex
no flags Details | Diff

Description Alex 2018-05-29 13:08:21 UTC
Created attachment 1445378 [details]
Choose the right VG in grub config

Description of problem:

When running grub2-mkconfig, the resulting grub configuration is broken when LVM is in use and multiple volume groups are present on the system. The resulting grub.cfg has the names of _all_ vgs prepended to the root and rd.lvm.lv boot parameters.

This is cause by the /etc/grub.d/09_node script expecting only one vg per host.

At line 231:
  vg=$(lvm vgs --noheading -o name | tr -d '[:space:]')

This concatenates the names of all vgs on the system into variable "vg" while it should have been only the name of the VG the ovirt LV lives in.

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


How reproducible:
100%

Steps to Reproduce:
1. Create an extra LVM VG
2. Run grub2_mkconfig
3. Reboot (or, observe /boot/grub2/grub.cfg)

Additional info:

The reason i ran grub2_mkconfig is because i enabled a serial console in grub.

Attached patch fixes the issue for me.

Comment 1 Ryan Barry 2018-05-29 13:42:27 UTC

*** This bug has been marked as a duplicate of bug 1561258 ***


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