Jump to content
amenditman

ArchLinux GRUB2 and LVM config advice

Recommended Posts

amenditman

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.

Share this post


Link to post
Share on other sites
securitybreach

Perhaps:

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).

https://wiki.archlinux.org/index.php/GRUB2#GPT_specific_instructions

 

I personally do not use gpt but that should help.

Share this post


Link to post
Share on other sites
securitybreach

I personally used grub-bios and grub-probe which was easy to install and setup per the wiki.

Share this post


Link to post
Share on other sites
amenditman

Perhaps:

[/font][/size][/color]

https://wiki.archlin...ic_instructions

That is exactly what I did. (That is where my quoted text is from, above.) I have done this before, on this computer, and had zero problems with Grub.

Share this post


Link to post
Share on other sites
securitybreach

What is the exact error message on the failed boots?

Share this post


Link to post
Share on other sites
amenditman

What is the exact error message on the failed boots?

 

This

Reboot and Select proper Boot device

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

Share this post


Link to post
Share on other sites
amenditman

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

Share this post


Link to post
Share on other sites
abarbarian

Good troubleshooting amenditman. An :worthy: :worthy: :worthy: :worthy: :worthy: for using GPT and LVM :w00tx100:

Share this post


Link to post
Share on other sites
amenditman

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

Share this post


Link to post
Share on other sites
abarbarian

I tried diving in with GPT then LVM on me second install. After frying me brain with all that a standard Arch install was a piece of cake :whistling:

Share this post


Link to post
Share on other sites
amenditman

I'm feeling your pain!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...