Jump to content

ArchLinux GRUB2 and LVM config advice


Recommended Posts

Just did a fresh install on my desktop workstation.


When I boot, the system does not find the bootloader and fails to boot. If I intervene and use the boot selection popup menu in my bios and tell it to boot from the hard disk, it boots fine.


The motherboard is bios and the hard drive is partitioned with a GPT, bios-boot partition, and a physical volume containing the volume group and logical volumes.


It seems as though Grub did not install to the bios-boot partition correctly.


To setup grub-bios on a GPT disk, populate the /boot/grub directory, generate the /boot/grub/i386-pc/core.img file, and embed it in the BIOS Boot Partition, run:

# modprobe dm-mod

# grub-install --target=i386-pc --recheck --debug /dev/sda

# mkdir -p /boot/grub/locale

# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo


where /dev/sda is the destination of the installation.

All these steps completed without errors.


I am at a loss as to why Grub is not loading correctly.

Link to comment
Share on other sites



GRUB2 in BIOS-GPT configuration requires a BIOS Boot Partition to embed its core.img in the absence of post-MBR gap in GPT partitioned systems (which is taken over by the GPT Primary Header and Primary Partition table).



I personally do not use gpt but that should help.

Link to comment
Share on other sites

What is the exact error message on the failed boots?



Reboot and Select proper Boot device

or Insert Boot Media in selected Boot device and press a key

Link to comment
Share on other sites

That error message has been nagging me all night. Something in the back of my mind was telling me the problem might be in the bios.


I was poking around in the Setup menus and saw that my hdd was listed third in the boot order, after usb and cd-rom. I changed it to first.


Reboot, no problem. This is just weird behavior. I don't know if it is GPT, GRUB2, or LVM causing it but would like to know.

Any thoughts.

  • Like 1
Link to comment
Share on other sites

Good troubleshooting amenditman.


Thanks for the props, but I should have seen it earlier.


Reboot and Select proper Boot device

or Insert Boot Media in selected Boot device and press a key


That is the same, or very similar, error message you get when you try to boot a computer with no hdd. Insert valid hdd or livecd, hit the key, and WHAM. Problem solved.

I'm feeling like I should have seen it earlier, when I actually read that output.


An :worthy: :worthy: :worthy: :worthy: :worthy: for using GPT and LVM :w00tx100:


I have to torture myself now so that when there is no other option, in the future, I am fully prepared.

Last summer I experimented with an install on the school laptop with an SSD using UEFI, GPT, and systemd. It felt like torture, but I got through it with a little help from our patient, helpful friends here. Partition alignment was particularly exciting.

This install was my attempt to incorporate LVM into the situation, but my main workstation is Bios and HDD. So the list of tricky, new, ideas to deal with is GPT, LVM, and systemd. I think I will probably have to use the rc.d daemons compatibility wiki page to get my printer working, but that seems like a small task at this point.

Edited by amenditman
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...