You are not logged in.

#1 2014-01-11 23:16:14

darkfeline
Member
Registered: 2012-02-14
Posts: 94

GPT/BIOS + LVM Grub - "Operating System not found"

I recently switched to a new hard drive and took the opportunity to migrate to a GPT+LVM configuration, but no matter what I do, I can't seem to avoid hitting the "Operation System not found" at boot, before even grub shows up.  I've read the Arch wiki articles on LVM, GRUB, GPT, and many pages that came up on Google as well.  Here's what I've done and tried.

Setting up GPT partitions:  I have tried allocating the bios grub boot partition to sectors 34-2047 as well as 3MB starting from sector 2048 (The first time I assumed the partition was too small, but the 3MB partition doesn't work either)  The rest of the disk I partitioned into a single LVM.

Setting up LVM:  I have four logical volumes: /, /boot, /home, /var.  I mounted everything and rsync'ed a fresh backup onto them.

I adjusted /etc/fstab to use the lvm volumes via /dev/mapper names.

Setting up grub:  I'm using grub2, of course.  I chrooted into the mounted partitions and did grub-install and grub-mkconfig, which didn't report any errors.  However, both complained about not being able to connect to /run/lvm/lvmetad.socket

I also set the bootable flag on the grub bios partition using fdisk as recommended by the GRUB wiki page.

So far nothing worked (I have also configured mkinitcpio with the lvm hook and built the kernel, but since I'm not even hitting grub, that's not the problem).

Offline

#2 2014-01-11 23:57:58

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: GPT/BIOS + LVM Grub - "Operating System not found"

I tried booting my hard drive in a VM, and lo and behold, everything runs fine.  I think that is is one of those legendary BIOS/GPT incompatibilities posted all over the place.  I will try some of the workarounds listed here (http://www.rodsbooks.com/gdisk/bios.html), and in the worst case, I'll just go back to using MBR.

Offline

#3 2014-01-12 01:26:39

javex
Member
Registered: 2011-12-30
Posts: 76

Re: GPT/BIOS + LVM Grub - "Operating System not found"

I had this problem while installing arch but did not notice it because of all the LVM error spam. I know I also had a boot problem then, but I cannot remember if I got to grub at all, so maybe this doesn't apply to you.

Offline

#4 2014-01-12 22:11:39

ManFrommArch
Member
Registered: 2014-01-11
Posts: 8

Re: GPT/BIOS + LVM Grub - "Operating System not found"

What hook did you use? can you post your partitioning scheme?

Offline

#5 2014-01-12 23:05:17

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: GPT/BIOS + LVM Grub - "Operating System not found"

You may need the boot/active flag set on the MBR's 0xEE protective partition. You can set this with old versions of fdisk or with new versions of parted. You should not set the "boot flag" on any GPT partition; parted/GParted uses that nomenclature to denote an EFI System Partition, which you don't use in a BIOS-mode boot, so setting that flag will just cause confusion.

As a side note, I recommend creating a /boot partition outside of the LVM configuration. (For that matter, there's no advantage to having a separate /boot logical volume inside an LVM.) Although GRUB can theoretically read the kernel from inside an LVM, this isn't true of all boot loaders, so if you wanted to change to another boot loader in the future, a setup with the kernel inside the LVM may be limiting. Personally, I like to create several ~500MiB partitions on any new computer. One I use for /boot, one for an ESP (on EFI-bootable systems), and the rest I leave unused. This gives me room to add a new distribution (including an updated version of whatever I install) or otherwise play around with boot loaders and whatnot without re-partitioning.

Offline

Board footer

Powered by FluxBB