A question about "gptprio.next"

24 views
Skip to first unread message

Jovi Zhangwei

unread,
Mar 6, 2017, 2:57:25 AM3/6/17
to CoreOS Dev

Hi,


When I look into CoreOS's grub config, I cannot understand the meaning of "gptprio.next", also cannot find any clue in Grub Manual.

So does anyone knows the meaning of gptprio.next instruction? great thanks. 


menuentry "CoreOS default" --id=coreos {

    gptprio.next -d usr -u usr_uuid

    if [ "$usr_uuid" = "7130c94a-213a-4e5a-8e26-6cce9662f132" ]; then

      linux$suf /coreos/vmlinuz-a @@MOUNTUSR@@=PARTUUID=$usr_uuid $linux_cmdline

    else

      linux$suf /coreos/vmlinuz-b @@MOUNTUSR@@=PARTUUID=$usr_uuid $linux_cmdline

    fi

}

Geoff Levand

unread,
Mar 6, 2017, 2:41:28 PM3/6/17
to coreo...@googlegroups.com
On 03/05/2017 11:57 PM, Jovi Zhangwei wrote:
> So does anyone knows the meaning of gptprio.next instruction? great thanks.

See these:

https://github.com/coreos/grub/blob/master/grub-core/commands/gptprio.c#L159
https://github.com/coreos/grub/commit/e49d5b587e46cd4611be2a5a18d2c2f8c9a4

-Geoff

Alex Crawford

unread,
Mar 6, 2017, 9:23:40 PM3/6/17
to coreo...@googlegroups.com
To add on to this a bit, we use gptprio.next to select the latest,
non-failing version of the OS to boot. This is how we do automatic
rollbacks as part of the upgrade process.

-Alex
signature.asc

Jovi Zhangwei

unread,
Mar 7, 2017, 1:04:35 AM3/7/17
to CoreOS Dev
Now I understand it. Thanks Geoff, Thanks Alex.
Reply all
Reply to author
Forward
0 new messages