Bug 9426 - Message when install / on LVM, with no /boot.. bootload not able to handle LVM.. but grub2 can.
Summary: Message when install / on LVM, with no /boot.. bootload not able to handle LV...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal minor
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords: USABILITY
Depends on:
Blocks: 416
  Show dependency treegraph
 
Reported: 2013-03-17 00:33 CET by Glen Ogilvie
Modified: 2016-07-04 18:15 CEST (History)
1 user (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
bootloader warning (77.67 KB, image/png)
2013-03-17 00:33 CET, Glen Ogilvie
Details

Description Glen Ogilvie 2013-03-17 00:33:43 CET
Created attachment 3627 [details]
bootloader warning

During installation, (testing: Mageia-3-beta3-x86_64-DVD.iso), an "ERROR" dialog is displayed if / is on an LVM partition, an no other /boot has been created.

This used to be valid, as grub cannot read files from LVM volumes.  However, grub2 supports this, so the error message should be changed, or ideally, not displayed at all.   If not displaying it at all, then installer should defualt to using grub2 in this case, and display a warning if the user selects any other boot loader.

See screenshot.
Glen Ogilvie 2013-03-17 00:34:05 CET

Blocks: (none) => 416

Comment 1 Manuel Hiebel 2013-03-17 00:57:53 CET
maybe only change the message ? (as bootloader choice is at the end so could be hard to manage)

Keywords: (none) => USABILITY
Version: 2 => Cauldron
Assignee: bugsquad => thierry.vignaud

Comment 2 Glen Ogilvie 2013-03-17 01:13:52 CET
Well, changing the message is something that hopefully could be done for Mageia 3.  Doing something smarter, like picking the correct boot loader later on would be better, but might be a Mageia 4 thing.
Comment 3 Glen Ogilvie 2013-03-23 07:33:02 CET
File: fsedit.pm
SVN path: svn://svn.mageia.org/svn/soft/drakx/trunk/perl-install

Current SRC

Line: 472 approx

   #- NB: if the LV doesn't exist, lv_nb_pvs returns 0
    die N("You cannot use the LVM Logical Volume for mount point %s since it spans physical volumes", $mntpoint)
      if $mntpoint eq '/boot' && isLVM($part) && lvm::lv_nb_pvs($part) > 1;
    cdie N("You've selected the LVM Logical Volume as root (/).
The bootloader is not able to handle this when the volume spans physical volumes.
You should create a separate /boot partition first") if $mntpoint eq "/" && isLVM($part) && lvm::lv_nb_pvs($part) != 1 && !fs::get::has_mntpoint("/boot", $all_hds);


The conditional on this seems really odd to me.  I think it's a bug.  lvm::lv_nb_pvs($part) seems checks the number of existing LVs.  This number can be 0, but can also be larger. 


Problems exist are:
if /boot is created on LVM, no warning about grub2 being needed

If / is created on LVM before /boot, warning about the volume spanning physical volumes, even when it does not.  No message if it's created after /boot
Comment 4 Glen Ogilvie 2013-03-23 22:44:58 CET
Further testing on this:

Even with two different PV's, LV spanning both, a single / filesystem, installing with grub2 works fine.
Comment 5 Barry Jackson 2013-05-03 14:51:17 CEST
Removing block on bug 416 as this is not release critical.

CC: (none) => zen25000
Blocks: 416 => (none)

Comment 6 Samuel Verschelde 2015-05-03 21:07:59 CEST
Adding block on bug 416 back since it allows to track all grub2-related issues.

Blocks: (none) => 416

Comment 7 Thierry Vignaud 2016-06-22 03:24:05 CEST
There's several issues:
- I don't think that would work w/o setting "GRUB_PRELOAD_MODULES=lvm"
- grubenv cannot be used, so we couldn't offer anymore to choose the default entry
- some special code would be needed for some cases such as encrypted LVM, ... that needs some options (setting GRUB_ENABLE_CRYPTODISK, ...)
- I'm not sure grub2 can handle all LVM features
  (eg: a LVM using RAID features)

I think the default of having a split /boot on a regular partition is sane.
If you do want to have /boot on LVM, there's plenty of tutorials on internet that explain how to do so _after_ the install
Comment 8 Thierry Vignaud 2016-06-22 03:27:14 CEST
See https://wiki.gentoo.org/wiki/LVM#Using_LVM_in_an_initramfs for an example of grub2 limitation regarding LVM
Comment 9 Mageia Robot 2016-07-04 18:13:30 CEST
commit 1873a160a01f41474434865c66dd09ba5f733d13
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Mon Jul 4 17:55:50 2016 +0200

    do not warn about no bootloader can boot LVM...
    
    ...as grub2 can (mga#9426)
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=1873a160a01f41474434865c66dd09ba5f733d13
Comment 10 Thierry Vignaud 2016-07-04 18:15:58 CEST
Closing

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.