You are not logged in.

#1 2022-01-27 17:12:04

archieology
Member
Registered: 2022-01-19
Posts: 24

[SOLVED] Skip grub menu

Hello great arch linux community,
It's that guy again who is a total newb and consequently picked arch as my first distro.

I'm trying to get arch to skip GRUB menu. I've used all the steps of arch wiki.
I configured /etc/default/grub with GRUB_FORCE_HIDDEN_MENU="true"

then I've created the file for shift holding to get to grub, run these commands:
# chmod a+x /etc/grub.d/31_hold_shift
# grub-mkconfig -o /boot/grub/grub.cfg

and the second one doesn't work because it's stuck before it's done:

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  amd-ucode.img initramfs-linux-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
sh-5.1#

I've run pacman -Syyu, I've reinstalled grub and restarted the system multiple times.

Many thanks!! Grateful for every answer smile

Last edited by archieology (2022-01-29 15:02:51)

Offline

#2 2022-01-27 17:15:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,665

Re: [SOLVED] Skip grub menu

What are the actual contents of the 31_hold_shift?

Offline

#3 2022-01-27 17:19:04

archieology
Member
Registered: 2022-01-19
Posts: 24

Re: [SOLVED] Skip grub menu

Thank you for asking, sorry I didn't mention it:
https://gist.githubusercontent.com/anon … stfile1.sh

Offline

#4 2022-01-27 17:23:27

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,665

Re: [SOLVED] Skip grub menu

should be fine, how do you surmise the command failed? if I'm reading this correctly everything is executed properly, you just don't get put on a newline. HAve you actually tested by rebooting? What are the contents of /boot/grub/grub.cfg ?

FWIW If I'm reading upstream docs correctly you might be able to do that without a custom script by setting GRUB_TIMEOUT_STYLE="hidden" into your /etc/default/grub :

GRUB Manual wrote:

‘GRUB_TIMEOUT’
Boot the default entry this many seconds after the menu is displayed, unless a key is pressed. The default is ‘5’. Set to ‘0’ to boot immediately without displaying the menu, or to ‘-1’ to wait indefinitely.

If ‘GRUB_TIMEOUT_STYLE’ is set to ‘countdown’ or ‘hidden’, the timeout is instead counted before the menu is displayed.

‘GRUB_TIMEOUT_STYLE’
If this option is unset or set to ‘menu’, then GRUB will display the menu and then wait for the timeout set by ‘GRUB_TIMEOUT’ to expire before booting the default entry. Pressing a key interrupts the timeout.

If this option is set to ‘countdown’ or ‘hidden’, then, before displaying the menu, GRUB will wait for the timeout set by ‘GRUB_TIMEOUT’ to expire. If ESC or F4 are pressed, or SHIFT is held down during that time, it will display the menu and wait for input. If a hotkey associated with a menu entry is pressed, it will boot the associated menu entry immediately. If the timeout expires before either of these happens, it will boot the default entry. In the ‘countdown’ case, it will show a one-line indication of the remaining time.

https://www.gnu.org/software/grub/manual/grub/grub.html

Last edited by V1del (2022-01-27 17:30:10)

Offline

#5 2022-01-27 17:30:27

archieology
Member
Registered: 2022-01-19
Posts: 24

Re: [SOLVED] Skip grub menu

You were right! I was missing a # at the beginning of the the shift_31 file so now mkconfig runs fine but it still doesn't skip the grub menu. Content of grub.cfg

https://controlc.com/41a5f79a

as well as content of grub default
https://controlc.com/e56a1fb1

I've looked at the manual and I did everything as they explain it. It just won't work.

Last edited by archieology (2022-01-27 20:41:00)

Offline

#6 2022-01-28 04:45:43

jocheem67
Member
Registered: 2009-11-09
Posts: 243

Re: [SOLVED] Skip grub menu

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0

-> Regenerate your config file as per the GRUB Wiki...

Offline

#7 2022-01-28 08:42:13

archieology
Member
Registered: 2022-01-19
Posts: 24

Re: [SOLVED] Skip grub menu

with regenerate your config file you mean:

# grub-mkconfig -o /boot/grub/grub.cfg 

?

At least this is what i've tried now and it doesn't work in the sense that I still get to see the grub menu sad

Offline

#8 2022-01-28 09:08:23

seth
Member
Registered: 2012-09-03
Posts: 51,046

Re: [SOLVED] Skip grub menu

Forgot to mount the /boot partition or are you actually booting from the root partition? Either way: writing the config to the wrong location? (Can you alter the grub configuration this way at all?)

Offline

#9 2022-01-28 16:49:38

archieology
Member
Registered: 2022-01-19
Posts: 24

Re: [SOLVED] Skip grub menu

I'm not so sure I know where I'm booting from. I guess it's sda2 I've used the official archinstall script to install arch linux.
I'm using etc/default/grub to edit the config. I can make changes to it. That's all I know. I've tried a lot of combinations but I guess it's not even recognizing what I'm doing in this file.

If I try to mount anything I always get that my fstab file is empty.

Sorry for my poor understanding but I have to learn everything by myself there is literally no person that I personally know that uses linux

Offline

#10 2022-01-28 17:03:55

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,665

Re: [SOLVED] Skip grub menu

Whatever you change in that /etc/default/grub is being combined into whatever your grub-mkconfig result is. If this isn't being applied then the directory where you are generating your config into is not actually being read by grub.

If you are that unsure then what seth suggested is likely. With all mounts like you think they should be, what's your output of

lsblk -f
efibootmgr -uv
mount
ls -l /boot

Offline

#11 2022-01-28 17:17:43

archieology
Member
Registered: 2022-01-19
Posts: 24

Offline

#12 2022-01-28 20:41:34

seth
Member
Registered: 2012-09-03
Posts: 51,046

Re: [SOLVED] Skip grub menu

test@simple ~]$ lsblk -f
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                         
├─sda1
│    vfat   FAT32       4A44-9F65                                           
└─sda2
     ext4   1.0         c7d32ffc-f0b0-4ae9-84d7-966476d88a26  187.9G    15% /
zram0
                                                                            [SWAP]
[test@simple ~]$ efibootmgr -uv
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,2001,2002,2003
Boot0001* GRUB	HD(1,GPT,3bd7598d-2e17-4a76-baa4-0300856764bf,0x2800,0xf2000)/File(\EFI\GRUB\grubx64.efi)
Boot0002* LAN(00E04C68B9EC)-IPv6	PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x3)/USB(6,0)/MAC(00e04c68b9ec,0)/IPv6([::]:<->[::]:,0,0)䍒
Boot2001* EFI USB Device	䍒
Boot2002* EFI DVD/CDROM	䍒
Boot2003* EFI Network	䍒
Boot2004* Huawei Firmware Update Program	HD(1,GPT,382632a9-87fb-4b0e-952a-a89af386fa38,0x800,0x32000)/File(\EFI\HUAWEI\CapAgent.efi)

Despite the pastebin service  or your copypasta having trashed some of the output, you're using grub but what strongly looks like a boot partition on sda1 isn't mounted (and also not listed in the fstab)
So (already just by the symptoms)  you're booting from that partition but are writing the config to the /boot directory on the root partition.

=> mount sda1 on /boot, see whether there's grub stuff as well, and re-run grub-mkconfig - reboot and see whether the configuration gets applied.

***Iff*** all of the above, remove the files in the /boot directory of the *root* partition and add the boot partition to the fstab to have it auto-mounted.
(Alternatively don't forget to mount it whenever you want to update the kernel or the grub config)

Don't delete anything in /boot if the mounted /dev/sda1 doesn't have the grub config and kernel inside, because in that case you'd not be booting from sda1 but sda2.
But I'm pretty sure that you're booting from a grub installation on sda1

Offline

#13 2022-01-29 11:15:30

archieology
Member
Registered: 2022-01-19
Posts: 24

Re: [SOLVED] Skip grub menu

It's magic. Everything works. Auto-mounting works as well. I'm just not sure what you mean by deleting the contents of the boot directory? Do you mean /boot itself? That can't be right?  Oh and thank you so much for your support! All of you.

Last edited by archieology (2022-01-29 11:17:39)

Offline

#14 2022-01-29 13:28:36

seth
Member
Registered: 2012-09-03
Posts: 51,046

Re: [SOLVED] Skip grub menu

No magic - knowledge wink

not sure what you mean by deleting the contents of the boot directory?

There will be files under /boot when sda1 is mounted there: DO NOT TOUCH THOSE.

But there will likely (still) be files when sda1 is NOT mounted there.
Those don't have to be there but won't be a problem beyond taking some disk space and misleading you about the mount status etc. There'll likely also be a warning that /boot isn't empty when sda1 gets mounted there.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB