re organise grub menu [SOLVED]

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mtvexl
Level 1
Level 1
Posts: 13
Joined: Wed Feb 17, 2021 10:48 am

re organise grub menu [SOLVED]

Post by mtvexl »

I have a partition on one of my Pc's that has both Linux and win 7 and comes up with the grub menu at the beginning where you choose which to use. Normally it will boot into Linux if you don't do anything. I've been using a game lately that I can only play on Win 7 and I would like to rearrange the grub menu to boot into Win 7 first. I say this because it is an old Pc and takes ages to settle down. I am using the same monitor for 2 Pc's which I can switch from one to the other so whilst I'm on my main pc the other can be booting up merrily in the background.
I imagine it's something to do with partition protocol but am not expert enough to go there so need a little help
regards Michael
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
spamegg
Level 14
Level 14
Posts: 5094
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: re organise grub menu

Post by spamegg »

Look at:

Code: Select all

cat /etc/default/grub
It looks like this:

Code: Select all

 ➜ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
The entry GRUB_DEFAULT=0 determines which entry in the list is the default booted entry. So you can change that to other numbers like 1, 2 etc. to make it boot into Windows.

The list is "zero-indexed" so the first entry is 0, the second is 1, and so on. When you are booting, you can count which entry in your boot list is Windows, then subtract 1 from that.

You can edit the file with

Code: Select all

xed admin:///etc/default/grub
Save changes and close the file. Then run

Code: Select all

sudo update-grub
mtvexl
Level 1
Level 1
Posts: 13
Joined: Wed Feb 17, 2021 10:48 am

Re: re organise grub menu

Post by mtvexl »

Thanks for your reply.
Erm Can't find even where to begin. I've tried the command line and the terminal thing but can't find
Code: Select all
M
User avatar
spamegg
Level 14
Level 14
Posts: 5094
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: re organise grub menu

Post by spamegg »

Go to Menu and type "Terminal"
terminal.png
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: re organise grub menu

Post by jimallyn »

mtvexl wrote: Sun May 09, 2021 1:55 pm but can't find
Code: Select all
You don't want or need to find Code: Select all. "Code: Select all" just indicates that code follows in the box below, and you can select that text by clicking SELECT ALL so that you can paste it into a terminal or somewhere else. It is NOT part of the command.
“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
mtvexl
Level 1
Level 1
Posts: 13
Joined: Wed Feb 17, 2021 10:48 am

Re: re organise grub menu

Post by mtvexl »

Hi Thanks for your reply.
I opened terminal and typed in 'cat/etc/default/grub' and got 'No such file or directory'
M
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

Re: re organise grub menu

Post by deepakdeshp »

cat /etc/default/grub There is a space after cat. Learn and practise basics of Linux commands. One such link is https://www.guru99.com/must-know-linux-commands.html
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
mtvexl
Level 1
Level 1
Posts: 13
Joined: Wed Feb 17, 2021 10:48 am

Re: re organise grub menu

Post by mtvexl »

Ok. I perservered and found that I needed to add two spaces after 'cat' and managed to enter the 'xed admin' etc and have succeeded in changing it.
So Thankyou very much for your help. 5 stars all round
Thanks
Michael
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

Re: re organise grub menu

Post by deepakdeshp »

mtvexl wrote: Mon May 10, 2021 9:40 am Ok. I perservered and found that I needed to add two spaces after 'cat' and managed to enter the 'xed admin' etc and have succeeded in changing it.
So Thankyou very much for your help. 5 stars all round
Thanks
Michael
You are welcome but you will do well to learn some basic Linux commands.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
Locked

Return to “Beginner Questions”