You are not logged in.

#1 2021-01-05 07:50:58

jgun98
Member
Registered: 2021-01-05
Posts: 17

Edit grub menu [SOLVED]

Hi there,

I have installed arch on usb successfully.
First, I use, GPT with EFI. due to some issue, I change to GPT without EFI with success.
Then I found that I can't boot on some computer.
I have converted GPT to MBR and reinstall grub.

I have minor issue now.
When I boot, it's show 4 lines choices, usually I pick the first one.

I would like to remove unused line from grub menu (when boot).
How can I do it in command line?

google said that I can use grub-customizer, but I think It's GUI version.

Regards,
jgun

Last edited by jgun98 (2021-01-10 04:56:14)

Offline

#2 2021-01-05 08:10:58

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,353

Re: Edit grub menu [SOLVED]

If you really just want that single entry the easiest would be to write your own config instead of relying on grub-mkconfig, see https://wiki.archlinux.org/index.php/Us … figuration for an example

Offline

#3 2021-01-05 08:39:53

kermit63
Member
Registered: 2018-07-04
Posts: 372

Re: Edit grub menu [SOLVED]

Reducing the number of grub boot entries to just one and having to hit the enter key every boot doesn't make sense.  It may be simpler to bypass the entire grub menu altogether by setting "GRUB_TIMEOUT=0" and "GRUB_DEFAULT=0" in /etc/default/grub and running grub-mkconfig to reflect the change.

This way GRUB will always boot the first entry and not bother to show the menu at all.


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#4 2021-01-05 08:56:10

jgun98
Member
Registered: 2021-01-05
Posts: 17

Re: Edit grub menu [SOLVED]

Hi kermit63,
Can I run grub-mkconfig on running machine?

I think other option
-remove grub folder and grub-install again, buat can I do it on running machine? or this is not a good idea?

Regards,
jgun

Offline

#5 2021-01-05 09:01:19

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,353

Re: Edit grub menu [SOLVED]

Yes you can run grub-mkconfig on a running machine and no neither of the two things in your second part are necessary (in fact they are detrimental, you don't want to remove the grub folder, the only thing that needs to change are the relevant config options).

Offline

#6 2021-01-05 09:11:00

kermit63
Member
Registered: 2018-07-04
Posts: 372

Re: Edit grub menu [SOLVED]

jgun98 wrote:

Can I run grub-mkconfig on running machine?

Yes, of course. You may not notice it, but grub-mkconfig is run automatically every time there's a kernel update, hence, it is usually executed on a running machine. You also have to run grub-mkconfig if you change /etc/default/grub or any of the config files in /etc/grub.d/.

I think other option
-remove grub folder and grub-install again, buat can I do it on running machine? or this is not a good idea?

You don't have to (delete the grub folder) if you plan to run grub-install again. The contents of the folder will just be overridden. It's not a good idea since you still have to run grub-mkconfig after that anyway.

EDIT: oops, didn't see V1del's last post before I pressed submit.

Last edited by kermit63 (2021-01-05 09:12:05)


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#7 2021-01-05 09:47:46

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,353

Re: Edit grub menu [SOLVED]

grub-mkconfig isn't ran on kernel updates without any conscious setup. As Arch doesn't have versioned kernels or changes the generated initramfs' name that isn't inherently needed.

Offline

#8 2021-01-05 09:51:31

jgun98
Member
Registered: 2021-01-05
Posts: 17

Re: Edit grub menu [SOLVED]

Hi,
Thank all for your help.
I finally figure it out.
grub-mkconfig generate correct configuration.
Due to I generated on machine that harddrive already have arch. It's appear also.
to have only option that I want. I temporary disable the harddrive from bios.

Regards,
jgun

Offline

#9 2021-01-05 09:51:31

kermit63
Member
Registered: 2018-07-04
Posts: 372

Re: Edit grub menu [SOLVED]

@V1del. You are right. This is more an offshoot of using other distros in the past.


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

Board footer

Powered by FluxBB