[SOLVED]!!!!!!!! Anyway to hide 'Grub Loading..' & 'Welcome to Grub' messages at startup before Grub menu screen

When you run into problems installing MX Linux XFCE
Message
Author
BitterTruth
Posts: 655
Joined: Tue Sep 22, 2020 7:36 pm

Re: Anyway to hide 'Grub Loading..' & 'Welcome to Grub' messages at startup before Grub menu screen

#11 Post by BitterTruth »

Helen-Earth wrote: Wed Sep 23, 2020 1:06 pm (I also removed grub using the apt get purge and then installed it again. NOT RECOMMENDED AS IT DIDN'T DO ANYTHING. MAYBE BECAUSE IT JUST REINSTALLED THE 2.04 VERSION AGAIN.) Holy Smokes if you take something away and then put back again why would anything be different.

Removing grub at anytime is a dangerous thing to do you were lucky you did not end up at the grub rescue screen or even worse just a blank screen.
You're right there. It could have ended in tears but I weighed the risks before hand and I was quite happy to go ahead since I still have the MX19 live usb and installing the first time was so easy. Also the guide I followed was an official ubuntu one so i knew it was quite safe.

BitterTruth
Posts: 655
Joined: Tue Sep 22, 2020 7:36 pm

Re: Anyway to hide 'Grub Loading..' & 'Welcome to Grub' messages at startup before Grub menu screen

#12 Post by BitterTruth »

tony37 wrote: Wed Sep 23, 2020 1:02 pm
BitterTruth wrote: Wed Sep 23, 2020 12:53 pm GRUB_CMDLINE_LINUX_DEFAULT="quiet hush" to /etc/default/grub

Doesn't work. Welcome messages are still visible.
That would be for booting the kernel, nothing to do with the Grub binary itself. The 'welcome to Grub' message appears before any kernel is selected.
Yeah I know that ......NOW ;) . You said you made some progress?

tony37
Posts: 1306
Joined: Sat Jul 18, 2020 12:34 pm

Re: Anyway to hide 'Grub Loading..' & 'Welcome to Grub' messages at startup before Grub menu screen

#13 Post by tony37 »

BitterTruth wrote: Wed Sep 23, 2020 2:09 pm You said you made some progress?
I'll try building it in a VirtualBox, that also has the advantage of not being an efi system.

What I downloaded is grub2_2.04.orig.tar.xz from https://packages.debian.org/bullseye/grub-pc (on the right hand side). Then extract, do the suggested changes from the Arch forum (the files seem still the same) and install some packages:

Code: Select all

sudo apt install bison flex pkg-config
Then open terminal in the main folder and:

Code: Select all

./configure
make
After that it would need installing of course, didn't get there yet.
And maybe more packages would need to be installed to make it properly work, but at least I don't get errors now.

edit: doing "sudo make install" didn't work in virtualbox, maybe I should have done ./autogen.sh first after all...

Huckleberry Finn

Re: Anyway to hide 'Grub Loading..' & 'Welcome to Grub' messages at startup before Grub menu screen

#14 Post by Huckleberry Finn »

BitterTruth wrote: Wed Sep 23, 2020 12:53 pm
tony37 wrote:I don't really know which 'hush' parameter you're talking about, can you explain?
I used MXTOOLS --> Boot Options tool. I changed the MESSAGES setting to limited and I think the tool adds the word 'hush' to the kernel parameters box. When you APPLY the settings (it's like updating grub), the tool adds

GRUB_CMDLINE_LINUX_DEFAULT="quiet hush" to /etc/default/grub
Here's what "hush" is (though it's not what you want exactly, just for info)
https://mxlinux.org/wiki/system/how-to-hide-boot-output/ wrote:
If you do not want to see the terminal output during boot up and shut down, ... Then add “hush” to your boot command to push all those “initializing” messages into file /run/rc.log. The easiest way of doing this is to use Grub Customizer > General Settings, Kernel parameters: add the word “hush” after “quiet.”

BitterTruth
Posts: 655
Joined: Tue Sep 22, 2020 7:36 pm

Re: Anyway to hide 'Grub Loading..' & 'Welcome to Grub' messages at startup before Grub menu screen

#15 Post by BitterTruth »

UPDATE: SOLVED IN 2 WAYS:

CLARIFICATION: It is not very clear in the original post but there are 2 sets of messages that I wanted to NOT SEE AT BOOT TIME:
1) 'Grub is loading.....Welcome to Grub' messages
2) 'Loading Linux.......Loading Initial ramdisk' messages

NOTE: These messages can be cleared independently or both at the same time. (See BONUS METHOD TO EASILY REMOVE ONLY THE 'LINUX IS LOADING' messages)


METHOD 1 :DOWNGRADE FROM 2.04-9~mx19+5 (mx) to 2.02+dfsg1-20+deb10u2 (stable) using synaptic

find grub-pc package in syanptic.
Go to Packages (top menu) ----------> force version
Choose 2.02+dfsg1-20+deb10u2 and then force version
Apply changes (*Note: grub-pc-bin, grub-common-grub2-common will also be downgraded as well)

At this point synaptic will immediately try to upgrade back to 2.04-9~mx19+5 (mx). To prevent this, highlight/select each of the 4 packages and do:
Packages -------------> lock version
Reboot.
You will no longer see either type of message (see clarification). You can now customize grub menu screen using MX BOOT OPTIONS or grub-customizer.

METHOD 2: PATCH THE CURRENTLY INSTALLED FILES WITHOUT DOWNGRADING
First you will need to determine if you are using legacy BIOS or EFI BIOS. In a terminal type:

Code: Select all

test -d /sys/firmware/efi && echo efi || echo bios 
(no sudo needed)

If it says BIOS, use GRUB-SHUSHER script (1). If it says EFI, then use the terminal command (2).

1. GRUB-SHUSHER:
Grub shusher are 2 small scripts written by Carlos Contavalli to remove 'Grub is Loading.....Welcome to grub' messages. (Note: running the scripts will not remove the second type of message 'Loading Linux & Linux initial ramdisk'. To remove this message, see BONUS).

open a terminal, navigate to where you would like the download directory to created and type the following:

git clone https://github.com/ccontavalli/grub-shusher.git

STEP 2: Next depending on where you installed the grub loader you need to run the script. For me , since I chose to install grub to mbr during the MX19 installation, this was:

In the same terminal cd to the newly downloaded directory ‘grub-shusher and run:

Code: Select all

 sudo ./setup-debian.sh /dev/sda 
The script will run and should come back with ‘success!’ Installing for i386pc

(PLEASE WAIT!!! DO NOT CLOSE YOUR TERMINAL YET)

Some more code will run and then you should see the message ‘Success!’ Again followed by ‘good luck!’
You can now reboot. Only the Grub is loading messages will be gone. To customize your grub menu, use MX BOOT OPTIONS or grub-customizer.

2. EFI BIOS TERMINAL COMMAND (MODIFIED COMMAND VERSION PROPOSED BY TONY37 IN POST#3 OF THIS THREAD):

Code: Select all

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

CAUTION: I AM NOT USING EFI BIOS SO BE CAREFUL WHEN USING THIS COMMAND. IF IN DOUBT MAKE A BACKUP OF YOUR grubx64.efi file first:
To find where the file is on your sytem:

Code: Select all

 locate grubx64.efi 
cd to the directory (for me it is in /usr/lib/grub/x86_64-efi/monolithic/) and type:

Code: Select all

 sudo cp grubx64.efi grubx64.efi.bak 
BONUS: FOR BIOS USERS TO REMOVE THE 'LOADING LINUX......OR LOADING INITIAL RAMDISK' MESSAGES:

in a terminal type:

Code: Select all

sudo nano /etc/grub.d/10_linux
change the line that says quiet_boot="0" to say quiet_boot="1"

Ctrl + X ----> yes ------> enter to save changes

Code: Select all

 sudo update-grub 
Reboot and the Loading linux messages will be gone.

YOU CAN DO THIS EVEN IF YOU ONLY WANT TO REMOVE THESE MESSAGES AND DON'T WANT TO REMOVE 'GRUB IS LOADING.....WELCOME TO GRUB' MESSAGES.

User avatar
uncle mark
Posts: 865
Joined: Sat Nov 11, 2006 9:42 pm

Re: [SOLVED]!!!!!!!! Anyway to hide 'Grub Loading..' & 'Welcome to Grub' messages at startup before Grub menu screen

#16 Post by uncle mark »

No judgement, but that sure looks like a lot of work just to get rid of a couple brief messages on bootup.
Custom build Asus/AMD/nVidia circa 2011 -- MX 19.2 KDE
Acer Aspire 5250 -- MX 21 KDE
Toshiba Satellite C55 -- MX 18.3 Xfce
Assorted Junk -- assorted Linuxes

Stuart_M
Posts: 697
Joined: Wed Aug 07, 2019 7:10 pm

Re: [SOLVED]!!!!!!!! Anyway to hide 'Grub Loading..' & 'Welcome to Grub' messages at startup before Grub menu screen

#17 Post by Stuart_M »

I'm thinking of the knowledge, understanding, satisfaction, enjoyment, etc. gained by having manipulated the system to get it to operate just the way you like.

BitterTruth
Posts: 655
Joined: Tue Sep 22, 2020 7:36 pm

Re: [SOLVED]!!!!!!!! Anyway to hide 'Grub Loading..' & 'Welcome to Grub' messages at startup before Grub menu screen

#18 Post by BitterTruth »

Yeah. It was. Considering I started with almost ZERO(0) knowledge on grub to begin with. Is it the wrong time to tell you that I am still working on it and have downloaded and checked every distro since MX15 on virtualbox to see what grubs they are running? Namely:

MX15 grub 2.02~beta2-22+deb8u1
MX16 grub 2.02~beta2-22+deb8u1
MX16.1 grub 2.02~beta2-22+deb8u1
MX17 grub 2.02~beta3-5 * No Welcome to Grub, but Loading linux messages visible. Changing quiet_boot=”0” to quiet_boot=”1” in /etc/grub.d/10_linux, successfully removed those as well. Upgraded to 2.02~beta3-5+deb9u2 (oldstable) gave error about block gaps, but machine rebooted fine. No messages visible this time.

MX17.1 grub 2.02~beta3-5 * No Welcome to Grub, but Loading linux messages visible. Changing quiet_boot=”0” to quiet_boot=”1” in /etc/grub.d/10_linux, successfully removed those as well. Upgraded to 2.02~beta3-5+deb9u2 (oldstable) gave error about block gaps, but machine rebooted fine. No messages visible this time.

MX18 grub 2.02~beta3-5+deb9u1 + first version to use plymouth No Welcome message but Loading Linux still present
MX18.1 grub 2.02~beta3-5+deb9u1
MX18.2 grub 2.02~beta3-5+deb9u1
MX18.3 grub 2.02~beta3-5+deb9u1

As Stuart has mentioned, it is worth it for 2 reasons:

1) MX has a special place in my heart, especially MX15. It is still the best distro I've ever used to date and beautiful to boot (present company included. I'm looking at you MX19.2). From the silent, smooth and streamlined boot process to it's running/customisations, to me it's just mesmerising. The devs really went all out on it. Perfect.

2) I did it partly to encourage the devs to streamline the boot process like it was before. It basically involves editing 3 source files (boot.S, diskboot.S, and main.c) before compilation as pointed out in POST#3 here:

https://bbs.archlinux.org/viewtopic.php?id=209207

The devs over at ubuntu have been patching grub to quieten it since 2009;

https://bugs.launchpad.net/ubuntu/+sour ... bug/386922

The people at Redhat/Centos started patching around 2013:

https://lists.gnu.org/archive/html/grub ... 00126.html

There have been times when it has slipped passed them occasionally (ubuntu 2013, it came back):

https://ubuntuforums.org/showthread.php?t=2168193

I have a laptop running Lubuntu 20.04.1 (the latest) with GRUB 2.04-1ubuntu26.4. Guess what no messages at boot.

tony37
Posts: 1306
Joined: Sat Jul 18, 2020 12:34 pm

Re: [SOLVED]!!!!!!!! Anyway to hide 'Grub Loading..' & 'Welcome to Grub' messages at startup before Grub menu screen

#19 Post by tony37 »

@ BitterTruth: Glad you solved it. Some people may find this ridiculous (and I can't blame them that much), but I also like to have full control of my computer.
But I'd like you to do one small change to the command I gave to modify an EFI file. It's better to do it like this:

Code: Select all

echo -n -e \\x00 | sudo tee patch && cat grubx64.efi | strings -t d | grep "Welcome to GRUB!" | awk '{print $1;}' | sudo xargs -I{} dd if=patch of=grubx64.efi obs=1 conv=notrunc seek={} 
So removing the '-a' from 'sudo tee -a patch', because there is a theoretical possibility that if someone would reinstall Grub very often and would apply the patch each time, then the patch file would keep growing and after 20 times of reinstalling Grub and reapplying the patch (extremely unlikely of course), you would start to overwrite valuable data in the efi file. In general it's a good habit to use 'sudo tee -a' because without the '-a' it would overwrite the whole file, but in this case the patch file at the end is just a stupid byte, so no harm in overwriting this.
Of course I can't guarantee this command will keep on working a few years hence, so best practice no doubt is to back up your grubx64.efi file.

I can also give instructions to remove the 'Loading LInux' and 'Loading initial ramdisk' messages on an efi system:
You also have to edit /etc/grub.d/10_linux here and change quiet_boot="0" to quiet_boot="1", but you also have to change

Code: Select all

if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then
(this line appears twice in the file) into

Code: Select all

if [ x"$quiet_boot" = x0 ]; then
Of course you can also outcomment the line you want to change with # and then add "if [ x"$quiet_boot" = x0 ]; then", so it will be easier to undo this later on.
And then of course

Code: Select all

sudo update-grub
In fact, I seem to have to change these lines on non-uefi systems too (in virtualbox).

Post Reply

Return to “Installation”