bugGNU GRUB - Bugs: bug #27737, unable to install GRUB to a...

 
 

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

bug #27737: unable to install GRUB to a partitioned loop device

Submitted by:  Christopher Barry <tetra>
Submitted on:  Sat 17 Oct 2009 03:22:30 PM UTC  
 
Category: InstallationSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: 
Release: otherReproducibility: Every Time
Planned Release: None

Mon 24 Jan 2011 06:37:43 AM UTC, comment #4:

I found a workaround. It seems that the problem is the extra subdirectory in /dev/mapper.

If I recreate the block devices that are under /dev/mapper and place them directly under /dev (with a different name), and update the device.map file for grub2, then I can install grub onto the disk using grub-install

Step 1: lookup the major/minor created under /dev/mapper
Step 2: mknod the same devices directory under /dev

I created two devices /dev/mapper/sda and /dev/mapper/sda1 using dmsetup and kpartx. /dev/mapper/sda received major device number 252 and minor 0, and /dev/mapper/sda1 received minor 1.

Then I did:

mknod /dev/msda b 252 0
mknod /dev/msda1 b 252 1

Make sure that you mount /dev/msda1 instead of /dev/mapper/sda1, update your device.map with "(hd0) /dev/msda" and voila, grub-install works.

Erwin Bolwidt <ebolwidt>
Mon 08 Nov 2010 03:57:56 PM UTC, comment #3:

I added such support to experimental branch. This wasn't straightforward since loopXpY aren't considered as partitions. Because it can possibly break LVM and other things using devmapper it won't be propagated to trunk until after 1.99 is released

Vladimir Serbinenko <phcoder>
Project Administrator
Fri 11 Jun 2010 08:26:54 AM UTC, comment #2:

Assuming we are talking about grub2 ... the method in comment #1 does not work. It was referring to grub-legacy.

I have look hard, but there doesn't seem to be a grub2 way of installing onto a partitioned loop device. I do believe this is a bug. Anyone cares to look into this?

Taiyang Chen <e_x_p>
Sun 07 Feb 2010 04:17:09 PM UTC, comment #1:

Please see the following page for a way to install grub on a partitioned image file:

http://www.wand.net.nz/~smr26/wordpress/2008/08/28/kvm-the-hard-way/

Andrew Malcolmson <andmalc>
Sat 17 Oct 2009 03:22:30 PM UTC, original submission:

grub-probe fails to identify /dev/mapper/loop0p1. I have tried a workaround of:
ln -s /dev/mapper/loop0p1 /dev/loop0p1
to no effect.

to reproduce;
1. create a disk image with dd.
2. losetup the image
3. partition the image
4. kpartx /dev/loop0 (to create /dev/mapper entries)
5. put filesystem on image
6. mount /dev/mapper/loop0p1 /mnt/image
7. debootstrap to the image
8. create /mnt/image/boot/grub/device.map with:
(hd0) /dev/loop0
9. grub-install --root-directory=/mnt/image /dev/loop0

Christopher Barry <tetra>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ebolwidt (Posted a comment)
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by e_x_p (Posted a comment)
  • -unavailable- added by andmalc (Posted a comment)
  • -unavailable- added by tetra (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 0 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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 08 Nov 2010 03:57:56 PM UTCphcoderStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup