Alpine Linux can't boot with UEFI if partitioned with Gparted
I’ve discovered very interesting bug with Alpine Kernel (I believe it is kernel, since GRUB2/Syslinux/Gummiboot/Ubuntu’s Kernel were verified to work under the same partitioning and only Alpine Kernel refused to boot properly).
Imagine 2 identical UEFI setups of Alpine Linux that only differ in disk partitioning. Assume we start with just created disk (sda) in VirtualBox VM.
The first way to partition is Gparted:
- create GPT partition table
- create small FAT32 partition (say 300M) (sda1)
- create ext4 partition for the rest of available space (sda2)
- apply changes
- set esp flag on sda1
The second way to partition disk is using gdisk:
- create partition table
- create small EFI System partition (say 300M) (sda1)
- create ext4 partition for the rest of available space (sda2)
- write changes to the disk
With disk partitioned using Gparted as described above system will stop booting after boot manager with black screen. Disk partitioned with gdisk will boot fine.
I’ve also tried FAT16 with Gparted - no difference, modifying layout prepared with gdisk using Gparted (like resizing ext4 partition) also seems to breaks boot process for Alpine Linux (needs more testing, was only replicated once).
This issue is not a coincidence and was replicated both under VirtualBox VM and on physical machine multiple (>2) times.
3.6.2 STANDARD x86_64 build was used during testing.
(from redmine: issue id 7612, created on 2017-07-31)