Bug 80980

Summary: Grub doesn't work 1.9TB disk
Product: [Retired] Red Hat Linux Reporter: hjl
Component: grubAssignee: Jeremy Katz <katzj>
Status: CLOSED RAWHIDE QA Contact: Glen Foster <glen>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-07-30 23:08:32 UTC Type: ---
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: 79579, 100644    
Attachments:
Description Flags
Change long to unsigned long none

Description hjl 2003-01-02 23:28:26 UTC
When I installed beta3 on a 12port 3ware card with a 1.9TB
RAID 5 array, the machine wouldn't boot. The first partition
is the 200MB /boot, followed by a 10GB /. LILO works fine.

Comment 1 Bill Nottingham 2003-01-03 02:02:51 UTC
Donations of 1.9TB 3Ware arrays for testing would be appreciated. :)

Comment 2 Jeremy Katz 2003-01-03 07:31:24 UTC
Can you give me any more information on what sort of problem you see?  I don't
have the kind of hardware to reproduce here, so I'm mostly going to have to
grasp at straws based on whatever information you can give.

Comment 3 hjl 2003-01-03 19:35:32 UTC
This is on RedHat 7.3.

# grub-install /dev/sda

    GRUB  version 0.91  (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=/grub (hd0)
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/e2fs_stage1_5" exists... yes
 Running "embed /grub/e2fs_stage1_5 (hd0)"...  22 sectors are embedded.
succeeded
 Running "install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0) (hd0)1+22 p (
hd0,0)/grub/stage2 /grub/grub.conf"... failed

Error 24: Attempt to access block outside partition

grub> quit

Looking at the code:

int
devread (int sector, int byte_offset, int byte_len, char *buf)
{
  /*
   *  Check partition boundaries
   */
  if (sector < 0
      || ((sector + ((byte_offset + byte_len - 1) >> SECTOR_BITS))
          >= part_length))
    {
      errnum = ERR_OUTSIDE_PART;
      return 0;
    }

I don't see how it can work with 1.9TB drive. Also anaconda didn't
catch the grub error so that installation failed silently.

Comment 4 hjl 2003-01-03 20:17:10 UTC
Created attachment 89106 [details]
Change long to unsigned long

This is the patch for grub in RedHat 7.3. I will
test it next Monday.

Comment 5 hjl 2003-01-06 19:17:40 UTC
My patch works for RedHat 7.3. It may also work for beta3.

Comment 6 Jeremy Katz 2003-01-09 20:01:38 UTC
I've submitted your patch upstream and will add it to the next build of our package

Comment 7 Jay Turner 2003-01-15 15:00:33 UTC
hjl, will you confirm this is working as expected once you get access to the
updated files?  Thanks!

Comment 8 hjl 2003-01-15 17:44:45 UTC
I will try if I still have the 1.9TB disk.

Comment 9 hjl 2003-01-21 23:44:21 UTC
Beta4 has the same problem.

Comment 10 Jeremy Katz 2003-01-22 05:35:33 UTC
I didn't build the change until after beta4

Comment 11 Bill Nottingham 2003-07-30 23:08:32 UTC
Closing out some bugs that have been in MODIFIED state. Please reopen if they
persist.