I've found the following issues with adding boot entries at particular index, this pull request fixes both of them:
Short index option (-I) isn't recognized.
Using short option like this:
> sudo efibootmgr -c -d /dev/sda -p 1 -I 2
return the following error:
efibootmgr: invalid option -- 'I'
In some cases using --index causes segmentation fault.
This happens when the passed index is greater than current boot order size. Size of the order entry size (uint16_t) hasn't been taken into account in all places.
I've found the following issues with adding boot entries at particular index, this pull request fixes both of them:
Short index option (-I) isn't recognized. Using short option like this:
> sudo efibootmgr -c -d /dev/sda -p 1 -I 2
return the following error:efibootmgr: invalid option -- 'I'
In some cases using
--index
causes segmentation fault. This happens when the passed index is greater than current boot order size. Size of the order entry size (uint16_t) hasn't been taken into account in all places.