Is there a possibility in cosmo boot menu to change the boot priority, for example linux first , second android and 3rd twrp ?
This is more a
general question than a Linux-specific one. I'm basically certain this is possible, but somewhat troublesome.
There are a few potential mechanisms by which the bootloader finds boot areas. It may be scanning through the
GPT and looking at known entry numbers. It may be scanning through the
GPT and looking at type-UUIDs. It may look at the headers of all areas and look for Android boot images.
The general strategy is to modify the GPT and reorder the entries.
This is hazardous, since depending upon the update mechanism you could cause updates to have weird behavior. Notably depending upon whether the updater expects to update /dev/block/mmcblk0p30 versus /dev/block/by-name/boot, it could update the wrong area and suddenly booting for you becomes troublesome.