You are not logged in.

#1 2016-02-21 21:24:47

Meurer
Member
Registered: 2015-12-01
Posts: 18

Removing "Welcome to GRUB!" message

I'm trying to remove the annoying message grub throws at boot time saying "Welcome to GRUB!" I've found this utility to do so but I'm failing to use it correctly. My system is as default as possible, MBR/BIOS configuration. Supposedly the first thing one should run is

./grub-kernel /boot/grub/kernel.img

However when I check what I had in that directory all I found was

[root@MAINFRAME grub-shusher]# ls /boot/grub
fonts  grub.cfg  grub.cfg.example  grubenv  i386-pc  locale  themes  unicode.pf2

But I did find what I believe to be the kernel image in /boot/vmlinuz-linux, but when I tried using it I got the following:

[root@MAINFRAME grub-shusher]# ./grub-kernel /boot/vmlinuz-linux 
opened: /boot/vmlinuz-linux
read: 1048576 bytes from /boot/vmlinuz-linux
match[0]: NOT FOUND
Not all required matches were found, giving up.
(if you run this command more than once, it's good!
it means the first run succeeded)

Could anyone help me out running this successfully?

Offline

#2 2016-02-21 22:42:44

Awebb
Member
Registered: 2010-05-06
Posts: 5,988

Re: Removing "Welcome to GRUB!" message

100% of all bug reports on the issue tracker of this software come from Arch users with a similar problem.

Last edited by Awebb (2016-02-21 22:42:55)

Offline

#3 2016-02-22 13:37:48

cafe
Member
Registered: 2014-03-20
Posts: 156

Re: Removing "Welcome to GRUB!" message

Download the source code and remove the following lines :

 grub-core/boot/i386/pc/boot.S     | 2 +-
 grub-core/boot/i386/pc/diskboot.S | 6 +++---
 grub-core/kern/main.c             | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

From grub-core/boot/i386/pc/boot.S

        /* print a notification message on the screen */
-       MSG(notification_string)
+       /* MSG(notification_string) */

From grub-core/boot/i386/pc/diskboot.S

        /* print a notification message on the screen */
-       pushw   %si
-       MSG(notification_string)
-       popw    %si
+       /* pushw        %si */
+       /* MSG(notification_string) */
+       /* popw %si */

From grub-core/kern/main.c

   /* Hello.  */
-  grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
-  grub_printf ("Welcome to GRUB!\n\n");
+  /* grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT); */
+  /* grub_printf ("Welcome to GRUB!\n\n"); */
   grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);

Compile yourself and run your new binary

Last edited by cafe (2016-02-22 13:39:10)

Offline

#4 2020-09-08 08:59:49

Remisa
Member
Registered: 2020-08-16
Posts: 3

Re: Removing "Welcome to GRUB!" message

This can be done via one line of command but before that make sure:

1. You have a backup of your grubx64.efi file.
2. You have a bootable rescue CD/USB (like Ubuntu or Archlinux).

The grubx64.efi file path is usually at /boot/efi/EFI/distro/grubx64.efi.

For example on an Arch installation it may be at /boot/efi/EFI/arch/grubx64.efi.

Go there and make a backup:

  $ cd /boot/efi/EFI/distro
  $ sudo -s
  $ cp grubx64.efi grubx64.efi.bak

Then here is what it looks like:

  /boot/efi/
  └── EFI
      └── arch
          ├── grubx64.efi
          └── grubx64.efi.bak

AFTER FOLLOWING COMMAND YOU MAY NOT BE ABLE TO BOOT YOUR COMPUTER ANY MORE. DO IT AT YOUR OWN RISK.

This command patches grubx64.efi and removes the greeting message (run as root):

  $ echo -n -e \\x00 > patch && cat grubx64.efi | strings -t d | grep "Welcome to GRUB!" | awk '{print $1;}' | xargs -I{} dd if=patch of=grubx64.efi obs=1 conv=notrunc seek={}

Offline

#5 2020-09-08 09:05:49

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 16,718

Re: Removing "Welcome to GRUB!" message

Thanks for sharing, however please don't necrobump 4 year old threads in the future and note that there's a few safer alternatives that don't require directly touching a binary with a prone to breakage hack like https://aur.archlinux.org/packages/grub-silent

https://wiki.archlinux.org/index.php/Co … bumping%22

Closing.

Offline

Board footer

Powered by FluxBB