This is a static archive of the old Zorin Forum.

The information below may be outdated. Visit the new Zorin Forum here ›

If you have registered on the old forum, you will need to create an account on the new forum.

[SOLVED] change boot order in grub - preferred way?

Mike11

Sat Apr 11, 2020 3:24:14 pm

Hello there,
I successfully installed version 15.2 lite on two old laptops (a Dell Latitude E6500 and an Asus ULFT20), which are around ten years old, and I must say I am impressed! I like it a lot. Thanks for the great work! It is great I could breathe life into two old machines. I also like the bare bones, no thrills, no whistles and bangs approach.
The OS runs reliably, and is quick enough on both machines after deactivating a few services using Stacey, changing the size of the swapfile etc as post-install steps.
The Dell laptop having the 15.6" screen is good enough for my work purposes and emailing and surfing.
The Asus laptop in the Win 7 mode has become my stereo system over the last months. Unfortunately, it appears the sound is better when running Win 7. Hence I would want to change the boot order so that it automatically boots into Win 7 ....please don't get upset, I won't change the other one ;-)

It seems I could change the boot order in /boot/grub/ or /etc/default changing in the relevant file default=0 to default=4.
My question is simply, does it matter which one I edit? Which is the preferred edit?

Looking forward to any responses.

Happy Easter from Paris,
Mike

Swarfendor437

Sat Apr 11, 2020 7:18:44 pm

"First, make a backup copy of /etc/default/grub. In case something goes wrong, you can easily revert to the known-good copy:

sudo cp /etc/default/grub /etc/default/grub.bak

Then edit the file using vim or the text editor of your choice:

sudo vim /etc/default/grub

Find the line that contains

GRUB_DEFAULT=0

and set it to

GRUB_DEFAULT=x

where x is the index of grub menu item to which you would like to boot to by default. Note that the menu items are zero-indexed. That means that the first item in the list is 0 and that the sixth item is actually 5. So to boot to the sixth item in the list, the line would read:

GRUB_DEFAULT=5

If you forgot the order of the items, take a look at /boot/grub/grub.cfg. Each menu entry is specified by a line of type:

menuentry 'Ubuntu' [options] {

You can also chose the default by the name instead of index, e.g.:

GRUB_DEFAULT='Ubuntu'

if there was a menuentry 'Ubuntu' line on /boot/grub/grub.cfg. This may be a better method, as it does not depend on the order of the entries, which could change.

To use a kernel in the "Previous Linux Versions" sub-menu use:

GRUB_DEFAULT="Previous Linux Versions>x"

(make sure to include the quotations), where x is the index of the old kernel on the sub-menu, or the name of the kernel as it appears in /boot/grub/grub.cfg. For example,

GRUB_DEFAULT="Previous Linux Versions>4.13.0-43-generic"

Then build the updated grub menu:

sudo update-grub"

[Source: https://askubuntu.com/questions/100232/ ... boot-order]

Mike11

Sun Apr 12, 2020 9:23:03 am

Thank you!
It works :-)

Swarfendor437

Sun Apr 12, 2020 11:11:58 am

Glad you got sorted. Thanks really go to the poster on Ask Ubuntu. ;) :D

Will mark thread as [SOLVED] - if in future you have an issue and it gets solved, go back to your first post and edit the Subject: line to begin with [SOLVED]. ;) :D