How to add Windows to the Limine boot menu
EasyOS image file has the Limine bootloader, and I posted a few
days ago how easy it is to write the image to any drive and bootup
Easy:
https://easyos.org/install/how-to-install-easyos-on-a-new-ssd.html
I mentioned in that page, that more entries could be added to
'limine.cfg', including boot Windows.
The little Mele mini-PC has Windows 10 on a 32GB eMMC flash
memory, and Easy is on a 240GB Kingston SATA SSD, that I added to
the Mele. So, it should be easy enough to add an entry to boot
Windows, but at first had problems, that I reported:
https://github.com/limine-bootloader/limine/issues/188
The developer was very helpful, and the issues were resolved.
Here is 'limine.cfg':
QUIET=no
TIMEOUT=20
GRAPHICS=no
DEFAULT_ENTRY=1
EDITOR_ENABLED=yes
INTERFACE_BRANDING=EasyOS Limine Boot Manager
:EasyOS dunfell in sda2
COMMENT=EasyOS Dunfell bootup
PROTOCOL=linux
TEXTMODE=yes
KERNEL_PATH=boot://2/easyos/vmlinuz
MODULE_PATH=boot://2/easyos/initrd
KERNEL_CMDLINE=initrd=initrd rw wkg_uuid=41e4e492-f6a0-11ec-9a02-287fcfeb4376 wkg_dir=easyos/
:Windows 10 in mmcblk0
COMMENT=Windows 10 in mmcblk0
PROTOCOL=chainload
#IMAGE_PATH=hdd://2:1/EFI/Microsoft/Boot/bootmgfw.efi
IMAGE_PATH=guid://09ddd6ad-80b0-4265-8d7f-1621eb5a4d9f/EFI/Microsoft/Boot/bootmgfw.efi
...both of those "IMAGE_PATH" variables work.
The "hdd" option requires <drive number>:<partition
number>, in my case "2:1"
The "guid" option requires the partuuid. Running 'blkid' on the
Windows boot-partition gives this:
# blkid /dev/mmcblk0p1
/dev/mmcblk0p1: LABEL="SYSTEM" UUID="5A85-A404" TYPE="vfat"
However, that is a filesystem uuid and not what is
needed. Easy has the blkid applet in busybox, but I think the
blkid from util-linux package will display the partuuid.
Anyway, can find the partuuid like this:
# ls -l /dev/disk/by-partuuid
lrwxrwxrwx 1 root root 15 Jul 2 05:07 09ddd6ad-80b0-4265-8d7f-1621eb5a4d9f -> ../../mmcblk0p1
lrwxrwxrwx 1 root root 15 Jul 2 05:07 174c8de6-dc78-4207-9176-f04235684cdd -> ../../mmcblk0p2
lrwxrwxrwx 1 root root 15 Jul 2 05:07 34e2b902-6cf5-4350-b941-db0652c28dd4 -> ../../mmcblk0p3
lrwxrwxrwx 1 root root 15 Jul 2 05:07 f52e64e1-ab42-4918-aa6f-2c5df878cfe9 -> ../../mmcblk0p4
...the one I want is highlighted. So, bunged that into
'limine.cfg' and Windows bootup works.
Today, Limine develop mintsuki has added another option, that I
have not yet tested:
IMAGE_PATH=fslabel://SYSTEM/EFI/Microsoft/Boot/bootmgfw.efi
...that's fantastic. As long as there is only one partition with
that label.
In case you are wondering how I arrived at that path
"/EFI/Microsoft/Boot/bootmgfw.efi", I don't remember.
If you poke around in the Windows vfat boot-partition, it is very
complicated and there are lots of ".efi" files.
Back in 2017 when I first added Windows booting to the rEFInd
menu, I must have read about that path somewhere.
Anyway, it works.
We can merrily add more entries, if there are other installations
of Linux. And note, another Linux could be in the same partition
as EasyOS, as Easy is a "frugal" install, only requiring one
folder in the partition. You can read about the configure options
here:
https://github.com/limine-bootloader/limine/blob/v3.0-branch/CONFIG.md
I am seeing Limine as a better choice than GRUB2, that most
distributions are using, due to its simplicity.
2017, that long ago! Yep, that was when I bought the little Mele:
https://bkhome.org/news/201709/mele-pcg35-apo-works-well.html
I see that Mele has a shop at mele.aliexpress.com, and their
fanless mini-PCs now have higher specs.
Tags: easy