Score:1

How do I boot Alternate OS on every boot?

cd flag

I have done dual boot in my laptop. My Ubuntu is on 0 and Windows is on 2. I have updated following settings in /etc/default/grub:

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

and in /etc/grub.d/00_header I have changed these lines:

if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='$(expr ${saved_entry} % 4)'
 '{saved_entry}'='$(expr ${saved_entry} + 2)' ; fi
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=auto ; fi

if [ "x${GRUB_DEFAULT_BUTTON}" = "x" ] ; then GRUB_DEFAULT_BUTTON="$GRUB_DEFAULT" ; fi
if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved" ] ; then GRUB_DEFAULT_BUTTON='$(expr ${saved_entry} % 4)' ; fi
if [ "x${GRUB_TIMEOUT_BUTTON}" = "x" ] ; then GRUB_TIMEOUT_BUTTON="$GRUB_TIMEOUT" ; fi

but its throwing error as follows:

/etc/grub.d/00_header: 41: {saved_entry}=$(expr ${saved_entry} + 2): not found

What could be the solution so that ${saved_entry} is incremented by 2 in every boot? Also after reaching at 50 i want it to reset to 0

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.