2

All you need are 2 commands: grub-set-default {NUMBER} update-grub where {NUMBER} is the one you want to boot into. Change {NUMBER} to a variable, put these 2 in a script, execute with sudo {file} {number}.


1

You haven't provided specifics as to your box - are you using uEFI, Secure uEFI or BIOS in booting? I'll assume BIOS and walk through a common process I do. For my own boxes (where I QA-test and install releases many times per week) and often have 1-6 (GNU/Linux but mostly Ubuntu flavors) systems installed on a box, the last installed will always end up ...


Only top voted, non community-wiki answers of a minimum length are eligible