View previous topic :: View next topic |
Author |
Message |
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3339 Location: Rasi, Finland
|
Posted: Sun Dec 04, 2016 5:23 pm Post subject: Rage against UEFI | MBR boot + GPT possible? |
|
|
So. For the past weekend I've been trying to get my new server setup booting. I chose to go with UEFI, because it's where the future (a dark one) is. And with it I also went with GPT, since it's required by UEFI and it allows to have larger than 2TB disks/partitions.
However(!), things didn't went as planned. Because it's a server I have all but media storage (system basically) on software (mdadm) raid1. I've read that it, indeed is, possible to boot from raid1. For that I created a seperate raid1 array for /boot and formatted it to vfat and another raid1 array for root (contains all for a functioning system except /boot).
The boot raid1 array uses metadata 0.90, so it's located at the end so that UEFI could read it. This essentially presents each vfatted /boot pertition to uefi as a single disk normal partition, a non-raid partition. UEFI should be able to recognize and execute bootloader (or efistub kernel) from any of the disks, but all I get is a blank screen and halted system, which only regognizes power button or ctrl-alt-del as an input.
I've set all those disks using efibootmgr to to be "bootable". I also copied my syslinux.efi and the relevant files (no I don't want the script creating scripts GRUB mess) to the default UEFI location (\EFI\BOOT\BOOTX64.EFI translates to /boot/EFI/BOOT/BOOTX64.EFI on my system) without any more success.
Next thing, as a final resort before posting this, was to read uefi specification to learn a bit of the inner workings of the UEFI standard as a way to learn what I have done wrong. But as the (linked) pdf was loading and the page count OF 2637 PAGES were displayed I knew there was something fundamentally wrong in the UEFI itself.
GPT layout for each disk: | Number Start (sector) End (sector) Size Code Name
1 2048 2361343 1.1 GiB EF00
2 2361344 136579071 64.0 GiB FD00
3 136579072 149161983 6.0 GiB 8200
4 149161984 3907029134 1.7 TiB 8306 | ... after the swap (3rd partition) is the storage partition that takes the rest of the space left on each disk (I have mixed set of different sized disks). That is then formatted to btrfs and combined to a single storage pool.
So. Now I'm taking suggestions as to what I'm doing wrong and should I just push my bootloader to the MBR section of every disk and perform a legacy boot with GPT? _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3339 Location: Rasi, Finland
|
Posted: Mon Dec 05, 2016 7:53 pm Post subject: |
|
|
I found out that MBR booting with GPT "formatted" disks should be possible.
If anyone has this setup, please, tell your experiences here.
Meanwhile I'll start preparing... _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Mon Dec 05, 2016 9:33 pm Post subject: |
|
|
Zucca,
Its mostly but not always possible. I do it with BIOS, grub-static and GPT.
There are two issues.
1) BIOS is unaware of GPT. If you have a brain dead BIOS that checks the bootable flag, you must set it on the 'protective' MSDOS partition table or the BIOS won't see it.
2) The showstopper (some Dell laptops) is that the BIOS may check the partition type and if its 0Xee in the 'protective' MSDOS partition table, which means GPT is in use, refuse to boot.
Other than those two items, follow the instructions. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3339 Location: Rasi, Finland
|
Posted: Mon Dec 05, 2016 9:48 pm Post subject: |
|
|
Thanks for the reply Neddy.
I'll first try with one hard drive. If it boots ok, then I'll write the gpt to other drives as well.
On a setup like this, that differs from normal (non-raid, single disk), I choose to use Syslinux (maybe extlinux, to be specific) rather than GRUB2. With Syslinux I (have to) perform all the installation steps manually which gives me more control to debug my own tinkerings. I could do that with GRUB2, I guess... but I'd need to learn the "grub shell" first.
Now... fingers crossed. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3339 Location: Rasi, Finland
|
Posted: Tue Dec 06, 2016 5:27 pm Post subject: |
|
|
After a little tinkering with the configs of the BIOS/UEFI I managed to... run the bootloader and kernel...
I got as far as initramfs just before mounting realroot.
I'm missing something (SATA driver maybe) from my kernel since /dev does not contain eny sd[a-e] -entries.
But yes. It worked. I just need to propely configure and compile the kernel to get started. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|