harvester / harvester

Open source hyperconverged infrastructure (HCI) software
https://harvesterhci.io/
Apache License 2.0
3.75k stars 314 forks source link

[BUG] Not booting after installing from ISO #1356

Open arnodirlam opened 2 years ago

arnodirlam commented 2 years ago

Describe the bug

After installing Harvester v0.3-rc1 on the first hard drive (of 2 installed), and enabling UEFI, the hard drive does not show up as a boot option in the boot menu. I did manage to fix it by copying the EFI partition and parts of the GRUB partition from an UEFI-enabled Ubuntu installation (see below).

To Reproduce

Steps to reproduce the behavior:

  1. Flash the ISO on a USB drive
  2. Boot from it and install Harvester v0.3-rc1
  3. Restart the machine and open the boot menu

Expected behavior

The Harvester installation being detected and the boot option available.

Environment

Additional context

I managed to get it to work. I did:

  1. Resize the EFI partition from 47M to 300M, because I read that it should be >=200M (not sure whether that was necessary though)
  2. Copy entire directory structure from an UEFI-enabled Ubuntu 20.04 EFI partition to Harvester's EFI partition
  3. On Harvester's GRUB partition, rename the directory grub2 to grub because that's referenced now in the EFI partition
  4. Overwrite Harvester's entire directory in grub/x86_64-efi (on the GRUB partition) by what's in that directory on Ubuntu's GRUB partition

Please let me know what other information would be useful for you.

bk201 commented 2 years ago

@arnodirlam Just to clarify, did you install Harvester in legacy BIOS mode and enabling UEFI mode after installation? Or the system is in UEFI mode in the first place. And the system is not able to be booted at all or is not available in the BIOS boot menu only? Thanks.

After installing Harvester v0.3-rc1 on the first hard drive (of 2 installed), and enabling UEFI, the hard drive does not show up as a boot option in the boot menu.

arnodirlam commented 2 years ago

At first, I installed Harvester when UEFI was not enabled. It started booting then but only showed GRUB with a blinking _ and nothing happened.

Then, I had UEFI enabled. It did not even show as a boot option anymore. So I installed from the ISO again on the first hard drive. Nothing changed by that.

I could not boot it at all. Or at least, I don't know how to boot anything that's not detected as bootable. When I don't enter the boot menu, it would just boot whatever else it can find.

Just-Insane commented 2 years ago

Were you able to find a resolution to this? I have the exact same issue. Can't boot the installer in BIOS mode. I can seeminly install in UEFI mode, but once rebooted, the drive is not detected as bootable. Using Harvester-v1.0.0-amd64 iso and burned via Rufus on Windows 10.

Server is a Dell R710 set to UEFI boot mode, as BIOS mode just gets the same Grub prompt.

bk201 commented 2 years ago

@Just-Insane Can you check if this helps? https://docs.harvesterhci.io/v1.0/install/usb-install/#when-booting-from-a-usb-installation-flash-drive-a-grub-_-text-is-displayed-but-nothing-happens The guide is for booting from a USB disk situation, but it should also apply to an installed disk. The point is to boot from the esp partition, not the installed disk.

Just-Insane commented 2 years ago

@bk201

Hello, I should have updated this sooner.

I resolved the problem by installing a UEFI ROM on the HBA the boot disk was attached to.

As a note, it seems like when Harvester moved to GRUB2, they dropped support for BIOS-based installs.

bk201 commented 2 years ago

@Just-Insane Thanks for the reply! But in fact, I tested installing Harvester on both legacy and UEFI VMs. So it might be some reason you can't boot from an HBA-attached disk.

arnodirlam commented 2 years ago

Were you able to find a resolution to this?

I did not try it again with a newer Harvester version, unfortunately.

Shaharyar-Shaukat commented 2 years ago

I am facing similar situation, I tried USB installation, UEFI mode, installation was successful but once rebooted, it did not booted from the hard drive and even there were no option for Harvester in the bios menu. I use official document as reference https://docs.harvesterhci.io/v1.0/install/usb-install/ but failed multiple times.

mannp commented 2 years ago

I have a similar issue when trying to install harvester from a USB stick, created from the iso.

Install appears to work, but the resulting install drive does not appear to be bootable.

Grub does not appear when the installation drive is selected to boot.

Harvester ISO v1.0.0

tlehman commented 2 years ago

@mannp What hardware are you using? And are you booting with UEFI or legacy BIOS?

There is a related issue #2023 that is tracking the support for installing and booting the installed Harvester using legacy BIOS motherboards. The information we need to move forward on this and #2023 is the hardware you are using, the boot mode (UEFI or BIOS), and the partitioning scheme you use during install (GPT or MBR)

mannp commented 2 years ago

@mannp What hardware are you using? And are you booting with UEFI or legacy BIOS?

There is a related issue #2023 that is tracking the support for installing and booting the installed Harvester using legacy BIOS motherboards. The information we need to move forward on this and #2023 is the hardware you are using, the boot mode (UEFI or BIOS), and the partitioning scheme you use during install (GPT or MBR)

I am using a H67M-ITX in UEFI mode.

I could not get the installation ISO to boot at all in legacy BIOS mode.

After a successful installation in UEFI mode, after a reboot, the machine failed to start...actually failed to find a bootable disk.

The machine is currently running Proxmox, but I wanted to try Harvester.

tlehman commented 2 years ago

@mannp I am working on the legacy BIOS booting mode. About the UEFI installation, did you set up the partitioning scheme using MBR or GPT?

mannp commented 2 years ago

@mannp I am working on the legacy BIOS booting mode. About the UEFI installation, did you set up the partitioning scheme using MBR or GPT?

@tlehman apologies, I forgot to add, that I could not remember.

I did install harvester on an empty drive, but didn't check what partition type it was prior to installing.

I did try the v1.0.1-rc1 ISO too, but that was missing my network drivers for some reason, so I didn't go further to test that.

BiggA94 commented 1 year ago

I could also not boot directly into the partition (dell r710) of usb drive. What I did was follow https://unix.stackexchange.com/a/330852

ls should give you something like (hd3,msdos1). That should be the right one.

So in the end it should be something like (hd3,msdos)/boot/grub2

galvesribeiro commented 5 months ago

I have the same problem here - install from USB/ISO and after the successful install and reboot, the machine can't find the boot disk anymore.

Setup:

After the install I can see on the BIOS that elemental-shim was added to the UEFI boot entries but if I pick it, it will not boot and the machine reset.

I confirmed that the install was made by picking the USB boot option on UEFI, and after the install we are trying to boot thru UEFI.

Any thoughts on what can it be? I'm using latest harvester 1.3.0.

Thanks!

bk201 commented 5 months ago

Hi @galvesribeiro can you confirm if the installation is done in UEFI or legacy mode? One way is to boot any linux or Harvester installer and run lablk to list partition tables.

aelkins02 commented 1 month ago

galvesribeiro After about two weeks of troubleshooting, I figured out a fix that might help you out.

I also have a Dell T7910 (not as beefy, only 128GB of RAM).

For some reason, every time I would try to install the Harvester v1.3.1 ISO, it would install but then when I would go to boot, it wouldn't find the EFI that Harvester builds. To fix this, here is what I did:

1) Build a bootable live environment (I put Ventoy w/ OpenSUSE Tumbleweed Live GNOME onto it) 2) Set one-time boot priority to the USB (F12) 3) Run Tumbleweed and pull up the terminal 3.a) Identify where the EFI is installed by typing " sudo fdisk -l " -mine happened to be /dev/sdc1, but your could be 'a' or 'b'...so on... 3.b) sudo mount /dev/sda1 /mnt # Replace /dev/sda1 with your root partition 3.c) Identify the right EFI, this is found by: " ls /mnt/EFI/boot ," you should see a couple of EFIs. The one I used was bootx64.efi 4) Use the Tumbleweed efibootmgr service to set your disk to boot from that by typing the following: sudo efibootmgr --create --disk /dev/sdX --part Y --label "Harvester" --loader "\EFI\boot\bootx64.efi"

-Replace /dev/sdX with your disk identifier.

-Replace Y with the partition number of your EFI partition.

-Adjust the loader path if necessary.

5) Once I rebooted, I checked the BIOS (F2) to pull it up. This time, my Dell UEFI showed a checked 'Harvester' as number 1 boot priority.

6) Let it boot- this system takes some time to load. When you get to the Grub 2.0.6 screen, DON'T TOUCH ANYTHING...wait a few minutes for all the services to boot and just let it go through its service setup. Once done, you'll get to harvester.

This crap took me two weeks and a lot of ChatGPT queries, but I got it fixed. I hope this helps someone else...

galvesribeiro commented 1 month ago

Hi @galvesribeiro can you confirm if the installation is done in UEFI or legacy mode? One way is to boot any linux or Harvester installer and run lablk to list partition tables.

@bk201 Sorry, I missed your reply. I was installing on UEFI mode for sure. The only reason I had the Legacy ROM support was because of a very old GPU. I added a Geforce RTX3080 which has the UEFI firmware and disabled the Legacy ROM, so everything was thru UEFI and I had the same issue.

galvesribeiro After about two weeks of troubleshooting, I figured out a fix that might help you out.

@aelkins02 holy crap! Thanks! That may possibly be the problem. However, I gave up on harvesters mostly because of the Storage. The performance isn't good with Longhorn after I made test with it on another cluster. There was no support to RDMA either. I've also got under the impression that both Harvester and Longhorn were not very actively maintained, given that this issue is 3 years old and there was no resolution up to now. The Longhorn release that theoretically would improve the performance, also wouldn't come up ever, so Harvester still stuck on the old/slow storage.

Anyway, thank you both for the replies, but I've decided to move on to another solution.