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

 
 

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

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

Submitter:  Christopher Barry <tetra>
Submitted:  Sat 17 Oct 2009 03:22:30 PM UTC
   
 
Category:  Installation Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  other
Release:  Reproducibility:  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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ebolwidt (Posted a comment)
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by e_x_p (Posted a comment)
  • -email is unavailable- added by andmalc (Posted a comment)
  • -email is unavailable- added by tetra (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-11-08 phcoder StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code