bugGNU GRUB - Bugs: bug #45163, Support for installing to LVM...

 
 

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

bug #45163: Support for installing to LVM volumes broke somewhere after GRUB 2.00

Submitter:  Sebastian Pipping <hartwork>
Submitted:  Thu 21 May 2015 09:38:08 PM UTC
   
 
Category:  None Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  Git master
Release:  Reproducibility:  Every Time
Planned Release:  None

Sat 26 Dec 2015 06:47:33 PM UTC, comment #3: 

Should be fixed in 3bca85b4184f74995a7cc2791e432173fde26d34; reopen if needed.

Andrei Borzenkov <arvidjaar>
Group Member
Fri 22 May 2015 02:34:26 AM UTC, comment #2: 

There is misunderstanding. The actual bug is that device.map cannot be used any more for LVM - it is ignored. It is fixed with attached patch.




(file #34076)

Andrei Borzenkov <arvidjaar>
Group Member
Thu 21 May 2015 09:50:47 PM UTC, comment #1: 

PS: if you are wondering, there is not device map and there was no need for one previously.  It worked out of the box.  That's what the ticket is about: it did work out of the box, previously.

Best, Sebastian

Sebastian Pipping <hartwork>
Thu 21 May 2015 09:38:08 PM UTC, original submission:  

Hi!

Earlier versions of GRUB 2 supported installation to LVM volumes using

  grub-install --boot-directory=.... /dev/...

syntax.  Andrei Borzenkov confirmed this to be a bug at https://lists.gnu.org/archive/html/grub-devel/2015-05/msg00147.html .

While a BIOS are not able to boot the results, support this scenario is useful to environments with virtual machines, where the virtual machine never sees the true LVM nature on the outside of what is a plan disk to them on the inside.

The following commands reproduce the setup (in RAM if /tmp is tmpfs).
With a plain LVM volume, the error is the same tough.

  # tmpfile="$(mktemp)"
  # echo "${tmpfile}"
  # truncate --size=$((100*1024**2)) "${tmpfile}"
  # loop_device_2="$(losetup --show -f "${tmpfile}")"
  # echo "${loop_device_2}"
  # vgcreate vg "${loop_device_2}"
  # lvcreate --name lv -l 100%free vg
  # sleep 1

  # parted /dev/vg/lv --script mklabel msdos
  # parted /dev/vg/lv --script mkpart primary ext4 4m 100%
  # sleep 1
  # mkfs.ext4 /dev/mapper/vg-lv1
  # mkdir /mnt/lv-root
  # mount /dev/mapper/vg-lv1 /mnt/lv-root
  # mkdir /mnt/lv-root/boot
  # grub-install --boot-directory=/mnt/lv-root/boot /dev/mapper/vg-lv ;
echo $?
  Installing for i386-pc platform.
  grub-install: error: disk
`lvmid/KO9MVd-KNgN-Nbo0-RJb0-pGdK-K7lO-apdskW/rrvxSA-SFY6-P6gy-1jYv-0ims-RmyL-m1KZMB'
not found.
  1

For user friendly view of the related mail thread I can recommend
http://thread.gmane.org/gmane.comp.boot-loaders.grub.devel/23312

Best, Sebastian

Sebastian Pipping <hartwork>

 

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

Attached Files
file #34076:  45163.patch added by arvidjaar (3KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arvidjaar (Updated the item)
  • -email is unavailable- added by hartwork (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-26 arvidjaar StatusNone Fixed
        Open/ClosedOpen Closed
    2015-05-22 arvidjaar Attached File- Added 45163.patch, #34076

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code