CJ Fearnley on 28 Aug 2016 16:16:34 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Making sure GRUB2 detects your root volume


I added the following to my /etc/default/grub:
GRUB_CMDLINE_LINUX=""
GRUB_CMDLINE_LINUX="rd.lvm.lv=tetrahelix/root
rd.luks.uuid=bc49d20d-c4b8-4cfb-bd36-16e2c04062e9
rd.lvm.lv=tetrahelix/root rhgb quiet"

But I get the same error as before:

$ sudo update-grub 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.16.0-4-amd64
Found initrd image: /boot/initrd.img-3.16.0-4-amd64
/usr/sbin/grub-probe: error: disk `lvmid/dcqgzj-awwK-OfNY-pVPk-dJNm-pEbM-OfP6VO/xAJ9fS-1bIS-oxAI-VF82-7no4-mrLe-XmNTzC' not found.
/usr/sbin/grub-probe: error: disk `lvmid/dcqgzj-awwK-OfNY-pVPk-dJNm-pEbM-OfP6VO/xAJ9fS-1bIS-oxAI-VF82-7no4-mrLe-XmNTzC' not found.
/usr/sbin/grub-probe: error: disk `lvmid/dcqgzj-awwK-OfNY-pVPk-dJNm-pEbM-OfP6VO/xAJ9fS-1bIS-oxAI-VF82-7no4-mrLe-XmNTzC' not found.
done

$ sudo grub-mkconfig -o /boot/grub/grub.cfg 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.16.0-4-amd64
Found initrd image: /boot/initrd.img-3.16.0-4-amd64
/usr/sbin/grub-probe: error: disk `lvmid/dcqgzj-awwK-OfNY-pVPk-dJNm-pEbM-OfP6VO/xAJ9fS-1bIS-oxAI-VF82-7no4-mrLe-XmNTzC' not found.
/usr/sbin/grub-probe: error: disk `lvmid/dcqgzj-awwK-OfNY-pVPk-dJNm-pEbM-OfP6VO/xAJ9fS-1bIS-oxAI-VF82-7no4-mrLe-XmNTzC' not found.
/usr/sbin/grub-probe: error: disk `lvmid/dcqgzj-awwK-OfNY-pVPk-dJNm-pEbM-OfP6VO/xAJ9fS-1bIS-oxAI-VF82-7no4-mrLe-XmNTzC' not found.
done

I have no logical volume
lvmid/dcqgzj-awwK-OfNY-pVPk-dJNm-pEbM-OfP6VO/xAJ9fS-1bIS-oxAI-VF82-7no4-mrLe-XmNTzC

The correct logical volume is
lvmid/dcqgzj-awwK-OfNY-pVPk-dJNm-pEbM-OfP6VO/bc49d20d-c4b8-4cfb-bd36-16e2c04062e9

I suspect update-grub and grub-mkconfig are reading the result stored in
my gpt BIOS boot partition from before I converted the LVM to be RAID-1.

I still don't have a clue as to how to override grub's intransigence in
guessing the incorrect LV to boot.

I am almost desperate enough to try zeroing /dev/sda1 and /dev/sda2
(my two gpt BIOS boot partitions) in the hopes that once grub can no
longer access the incorrect information that it wrote there, it might do
the right thing. But zeroing a partition is something that is the very,
very last resort. Always :)

Is there no reasonable solution?

On Wed, Aug 03, 2016 at 07:52:43PM -0400, Mike DePaulo wrote:
> This is the answer to a question at PLUG central:
> 
> Edit "/etc/default/grub"
> 
> My Fedora 24 laptop has the contents:
> 
> GRUB_TIMEOUT=5
> GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
> GRUB_DEFAULT=saved
> GRUB_DISABLE_SUBMENU=true
> GRUB_TERMINAL_OUTPUT="console"
> GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/root
> rd.luks.uuid=luks-62c83a70-f5bf-4b20-aab7-78a2b48f3164
> rd.lvm.lv=fedora/swap rhgb quiet"
> GRUB_DISABLE_RECOVERY="true"
> 
> The option you care about is "rd.lvm.lv". "fedora/root" is the volume
> group name / logical volume name.
> 
> Afterwards, run your command to generate your grub.cfg. This varies
> based on whether you are in BIOS or UEFI mode.
> 
> BIOS mode:
> grub2-mkconfig -o /boot/grub2/grub.cfg
> 
> UEFI mode:
> A command like this ("fedora" string will differ for your distro):
> grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
> ___________________________________________________________________________
> Philadelphia Linux Users Group         --        http://www.phillylinux.org
> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug

-- 
CJ Fearnley                 |   LinuxForce Inc.
cjf@LinuxForce.net          |   IT Projects & Systems Maintenance
http://www.LinuxForce.net   |   http://blog.remoteresponder.net
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug