-
Notifications
You must be signed in to change notification settings - Fork 53
Description
The only thing the spec says about boot entries is:
Of these sections, the
.osrelsection is used to generate boot entries. ThePRETTY_NAME=andVERSION_ID=fields in the embeddedos-releasefile are used the same astitleandversionin the Type #1 entries. The.cmdlinesection is used instead of the options field.linuxandinitrdfields are not necessary, and there is no counterpart for themachine-idfield.
If you read the spec as is, you'd assume that Type#2 entries have no sort-key and thus are only sorted by their filename as per option 4:
- At the end, if necessary, when sort-key is not set or those fields are not set or are all equal, the boot loader should sort using the file name of the entry (decreasing version sort), with the suffix removed.
But this is not the case. As systemd infers the sort-key from the ID or IMAGE_ID field and the version from the IMAGE_VERSION | VERSION | VERSION_ID | BUILD_ID field.
So it's actually sorted as specified by:
- If sort-key is set on both entries, use in order of priority, the sort-key (A-Z, increasing alphanumerical order), machine-id (A-Z, increasing alphanumerical order), and version keys (decreasing version order).
before sorting by file-name.