Bug 1564225 - Grub fails to include Stage2 during setup
Summary: Grub fails to include Stage2 during setup
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: grub
Version: 6.9
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-05 17:55 UTC by James Vess
Modified: 2019-07-03 13:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-03 12:29:15 UTC
Target Upstream Version:


Attachments (Terms of Use)
Full Test / Uninstall / Reversion / Test (51.34 KB, text/plain)
2018-04-05 17:55 UTC, James Vess
no flags Details

Description James Vess 2018-04-05 17:55:19 UTC
Created attachment 1417863 [details]
Full Test / Uninstall / Reversion / Test

Description of problem:
When attempting to use grub setup to install a bootblock on a system which is configured without a boot partition any calls to setup within grub fail to find the stage2 file. This may or may not be related to large disk size or usage of GPT with BIOS.

!! This issue has been leaving boxes unable to boot after updates !!

This problem is not present within grub-0.97-94.el6.x86_64.rpm, however exists in both of the listed packages below.

Version-Release number of selected component (if applicable):
grub-0.97-94.el6_7.1.x86_64.rpm
grub-0.97-99.el6.x86_64.rpm

How reproducible:
50+ boxes have shown this problem, I was able to reproduce on these systems by reverting the affected packages back to a prior version and then back again.

Steps to Reproduce:
1. Configure a disk layout similar to the additional information below ( although possibly not necessary )
2. Install grub-0.97-99.el6.x86_64.rpm
3. Run grub-install /dev/sda --debug

Actual results:

>
>     GNU GRUB  version 0.97  (640K lower / 3072K upper memory)
> 
>  [ Minimal BASH-like line editing is supported.  For the first word, TAB
>    lists possible command completions.  Anywhere else TAB lists the possible
>    completions of a device/filename.]
> grub> root (hd0,0)
>  Filesystem type is ext2fs, partition type 0x83
> grub> setup  --stage2=/boot/grub/stage2 --prefix=/boot/grub (hd0)
>  Checking if "/boot/grub/stage1" exists... yes
>  Checking if "/boot/grub/stage2" exists... no
> 
> Error 16r: Inconsistent filesystem structure

Expected results:

> 
>     GNU GRUB  version 0.97  (640K lower / 3072K upper memory)
> 
>  [ Minimal BASH-like line editing is supported.  For the first word, TAB
>    lists possible command completions.  Anywhere else TAB lists the possible
>    completions of a device/filename.]
> grub> root (hd0,0)
>  Filesystem type is ext2fs, partition type 0x83
> grub> setup  --stage2=/boot/grub/stage2 --prefix=/boot/grub (hd0)
>  Checking if "/boot/grub/stage1" exists... yes
>  Checking if "/boot/grub/stage2" exists... yes
>  Checking if "/boot/grub/e2fs_stage1_5" exists... yes
>  Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... failed (this is not fatal)
>  Running "embed /boot/grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
>  Running "install --stage2=/boot/grub/stage2 /boot/grub/stage1 (hd0) /boot/grub/stage2 > p /boot/grub/grub.conf "... succeeded
> Done.
> grub> quit

Additional info:

I've attached an end to end log showing the running, removal, package install, and re-run where you can see the issue occurring and being resolved by removing the affected package and installing an older version.

Reviewing the package content differences I'm showing that 0017-Fix-ext4-loading-ineffectiveness.patch was added prior to this issue showing up, however I don't see any reason why it would cause this.

== Disk and partition setup ==

parted for GPT Table:
Model: LSI MR9266-4i (scsi)
Disk /dev/sda: 4000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name   Flags
 1      1049kB  50.0GB  50.0GB  ext4            slash  boot
 2      50.0GB  58.0GB  7999MB  linux-swap(v1)  swap
 3      58.0GB  58.0GB  1049kB                  boot   bios_grub
 4      58.0GB  4000GB  3942GB  ext4            vz

fdisk for Protected:
Disk /dev/sda: 3999.7 GB, 3999688294400 bytes
256 heads, 63 sectors/track, 484368 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      266306  2147483647+  ee  GPT

Mounts:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              46G   31G   14G  70% /
tmpfs                  63G     0   63G   0% /dev/shm
/dev/sda4             3.6T  1.9T  1.6T  56% /vz

!! NOTE !! There are sdb/sdc devices in place of matching size to sda which contain a single partition formated to ext4 and are mounted at /vz2 and /backup as well, however I omitted these in the output for brevity.


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