I write a grub2 menu entry to boot my easyos. It can search the easyos from all disks and all partitions.
I even needn't know where is the easyos, what I need is put vmlinuz,initrd,easyos.sys into a folder named easyos520 and put the folder into any ext4 partition.
In the partition, easyos 520,easyos455,and other version share the space.
This is the grub2 menu entry:
Code: Select all
menuentry "Auto Find and Boot EasyOS520" {
ver=520
search -f /easyos$ver/vmlinuz -s root
probe -u ($root) -s uuid
linux ($root)/easyos$ver/vmlinuz rw wkg_uuid=$uuid wkg_dir=easyos$ver
initrd ($root)/easyos$ver/initrd
}
menuentry "Auto Find and Boot EasyOS500" {
ver=500
search -f /easyos$ver/vmlinuz -s root
probe -u ($root) -s uuid
linux ($root)/easyos$ver/vmlinuz rw wkg_uuid=$uuid wkg_dir=easyos$ver
initrd ($root)/easyos$ver/initrd
}
menuentry "Auto Find and Boot EasyOS455" {
ver=455
search -f /easyos$ver/vmlinuz -s root
probe -u ($root) -s uuid
linux ($root)/easyos$ver/vmlinuz rw wkg_uuid=$uuid wkg_dir=easyos$ver
initrd ($root)/easyos$ver/initrd
}
menuentry "Auto Find and Boot EasyOS443" {
ver=443
search -f /easyos$ver/vmlinuz -s root
probe -u ($root) -s uuid
linux ($root)/easyos$ver/vmlinuz rw wkg_uuid=$uuid wkg_dir=easyos$ver
initrd ($root)/easyos$ver/initrd
}
You can find the files here to test:
https://www.123pan.com/s/juZUVv-TRgsH.html
grub4easy.tar.xz
To do:
1. Copy mydisk/partition2(fat32)/grub.cfg to your esp partition's root.
2. Copy mydisk/partition2(fat32)/EFI to your esp partition's root(Please backup your file first).
3. Copy mydisk/partition1(ext4)/easyos520 to any ext4 partition's root and replace the fake file with yours.
4. Reboot your computer,you will see the grub menu(the picture above)
If your have the easyosxxx folder in any ext4 partition like my example, you can boot it now. All the version of easyos can be in deferent disk and/or deferen partition.