bugGNU GRUB - Bugs: bug #29903, grub-install fails on...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #29903: grub-install fails on partitionable software RAID devices

Submitted by:  Florian Wagner <fwagner>
Submitted on:  Tue 18 May 2010 12:37:24 PM UTC  
Votes:  100  
 
Category: NoneSeverity: Major
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: 
Release: 1.98Reproducibility: Every Time
Planned Release: None

Fri 08 Apr 2011 12:14:25 PM UTC, comment #3:

Patch reread, cleaned up and applied.

Vladimir Serbinenko <phcoder>
Project Administrator
Tue 08 Mar 2011 06:57:03 AM UTC, comment #2:

Could you rather try experimental branch? I haven't looked into this patch but it seems on quick glance that it worked mostly by chance.

Vladimir Serbinenko <phcoder>
Project Administrator
Tue 08 Mar 2011 06:21:13 AM UTC, comment #1:

I've spend few hours trying to install Debian on partitioned RAID-1, before I've found this.
I'll be very happy to see this patch in mainstream.

Jarek <jarek556>
Tue 18 May 2010 12:37:24 PM UTC, original submission:

Running grub-install on partitionable software RAID devices (such as /dev/md_d0) results in the following error:

# grub-install /dev/md_d0
/usr/sbin/grub-setup: error: can't open /dev/md0: No such file or directory.

Following the chain of execution:

1. grub-install runs grub-setup
2. grub-setup resolves the OS device given as its last commandline parameter using the "grub_util_get_grub_dev" function (called at util/grub-setup.c:739, implemented in ?). This turns /dev/md_d0 (or all other types of software RAID devices) into "md0" and saves it as the "dest_dev" variable.
3. If "dest_dev" begins with "md" and a number between 1 and 9 the "grub_util_raid_getmembers" function is called with "dest_dev" as ist sole parameter.
4. "grub_util_raid_getmembers" prepends "/dev/" to its parameter and tries to open it, resulting in above error.

Attached is a patch with calls "grub_util_raid_getmembers" with "argv[optind]" (the last commandline parameter) instead and removes the "/dev/" prepending stuff from the function.

With that patch applied I can successfully do "grub-install /dev/md_d0".

Florian Wagner <fwagner>

 

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by jarek556 (Posted a comment)
  • -unavailable- added by jarek556 (Voted in favor of this item)
  • -unavailable- added by fwagner (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 100 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 08 Apr 2011 12:14:25 PM UTCphcoderStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Tue 08 Mar 2011 06:15:29 AM UTCjarek556Carbon-Copy-=>Added jarek556
    Tue 18 May 2010 12:37:24 PM UTCfwagnerAttached File-=>Added 909_fix_partitionable_md.diff, #20562

    Back to the top


    Powered by Savane 3.1-cleanup1