Artificial intelligent assistant

What is `$menuentry_id_option` in grub? I was fiddling with my GRUB 2 config files (`/boot/grub/grub.cfg`) and I noticed that the `menuentry` line for the automatically added Ubuntu boot looks like this: menuentry 'Ubuntu 14.04 Trusty Tahr (on sda5)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-fe3a2033-d77c-4d8c-ba04-3bb27b267dc2' { What is that `$menuentry_id_option 'gnulinux-simple-fe3a2033-d77c-4d8c-ba04-3bb27b267dc2'` part at the end and do I need it when I add new boot options? So, what does the `$menuentry_id_option` mean? Do I need to use it when I add another boot menu item for some other distro? What would happen if I didn't include it? Also, is there some GRUB reference I can look to for questions about what these things do?

The line you are looking for is:


if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi


Gives you the value of `feature_menuentry_id` and if it's equal to `y` then it will add the `--id` parameter to your menu entries:


menuentry 'Ubuntu 14.04 Trusty Tahr (on sda5)' --class ubuntu --class gnu-linux --class gnu --class os --id 'gnulinux-simple-fe3a2033-d77c-4d8c-ba04-3bb27b267dc2' {


If it's not, then it will leave it as is:


menuentry 'Ubuntu 14.04 Trusty Tahr (on sda5)' --class ubuntu --class gnu-linux --class gnu --class os 'gnulinux-simple-fe3a2033-d77c-4d8c-ba04-3bb27b267dc2' {


The `--id` parameter for `menuentry` isn't defined in the manual for `menuentry`, but one can haphazardly guess is the UUID for the partition the kernel is supposed to boot from.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 9d83ca423bf65f7411ab3fd6e71f1100