How do I disable to the Grub menu and go directly to login

If none of the more specific forums is the right place to ask

How do I disable to the Grub menu and go directly to login

Postby jaytelford » 2019-01-12 10:28

TL;DR
I want to skip all the Grub screens and prevent Grub from probing the system for other OSs and boot straight to the Gnome login screen. Or at least show a splash screen with the Debian logo or something, while the system is loading in the background.


Hi everyone,

I have tried to find a more suitable category for this post and thought about outing it into the System Configuration category, but as my issue is not with configuring Debian specifically, rather with the configuration of the Grub, I thought it best it post here in the General category. Please excuse me if I have posted in the wrong place, I did consider where this should go.

Now to my issue:

I have Debian 9 installed on a former Windows machine. I purchased it specifically to wipe all remnants of Windows off of it and install Debian, which I have done (including all Windows recovery partitions) - so there is nothing Windows left on the machine at all.

I installed Debian GNU/Linux 9 (stretch) 64-bit on an HP Pavilion with the following

Memory 8GiB / 7.7 GiB available for system use after install
Processor Intel® Core™ i3-3217U CPU @ 1.80GHz × 4
Graphics Intel® Ivybridge Mobile

I have also installed the additional firmware for Debian 9.

However; I did not wipe the HDD prior to installing Debian. Instead, I did it as part of the installation process. Deleted and partitioned the HDD as follows

Partition 1 The partition to house the OS and other system related files
Partition 2 The partition that houses my home directory and all my personal files/directories
Partition 3 Swap

Everything went fine and the installer completed. The additional firmware meant that all my hardware worked correctly and the non-free repos meant that I was able to update non-free drivers and other firmware to the latest available in said repos. So everything is working fine and I am happy with my installation, except for one thing.

As stated above, I have removed all of Windows from this machine but the Grub boot loader still thinks that I am dual booting. Consequently, its probing the system for other OS and displaying the grub menu at boot-up.

This is slowing everything down and its taking about 30 to 40 seconds for me to get to the login screen.

What I want, is Grub to stop probing the system for other OSs and I dont want it to show the Grub menu either. I literally want the system to boot straight to the login screen. If this would mean there is a black screen for several seconds, then I would prefer a splash screen that displays the Debian logo or something while the system is loading in the background.

I have tried to search online for how to do this, but all the results I find are related specifically to Ubuntu. Now I know that Ubuntu uses Debian as its base but I tried the Ubuntu suggestions and they didn't work (probably because they were for Ubuntu) and so have resolved to ask here for Debian specific help.

Here is my Grub configuration file

Code: Select all
# 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=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
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"


Can you please tell me what i need to alter in the above file, to do what I have just described.

Thanks
Jay
jaytelford
 
Posts: 30
Joined: 2018-05-09 10:56
Location: United KIngdom

Re: How do I disable to the Grub menu and go directly to log

Postby Dai_trying » 2019-01-12 11:05

I think you can set the value of GRUB_TIMEOUT=5 to read GRUB_TIMEOUT=-1 which will basically prevent the grub from showing, and if you want to prevent other OS's from being shown you can remove os-prober which should do the trick,
Code: Select all
apt remove os-prober
as root, and don't forget to update grub after any changes.
Dai_trying
 
Posts: 707
Joined: 2016-01-07 12:25

Re: How do I disable to the Grub menu and go directly to log

Postby Head_on_a_Stick » 2019-01-12 11:11

Disclaimer: your post is too prolix so I didn't bother reading it.
jaytelford wrote:show a splash screen with the Debian logo or something, while the system is loading in the background

https://wiki.debian.org/plymouth
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: How do I disable to the Grub menu and go directly to log

Postby llivv » 2019-01-12 11:28

both suggestions above are what I would also suggest.

just seems silly to save 4 seconds of bootup time, espeically when the OP wants to boot in a few seconds.
If were me I would want to know why grub is still seeing win boot remnants in /efi (if that is the case)
It's hard to justify more complexity with the plymouth abstraction, but a lot of people like the purdy pictures instead of the confuse looking text scrolling - Boring ....

And those are my reasons for not posting here earlier, suggesting the same workarounds posted above, that the OP seems to think would be useful customization.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
User avatar
llivv
 
Posts: 5488
Joined: 2007-02-14 18:10
Location: cold storage

Re: How do I disable to the Grub menu and go directly to log

Postby p.H » 2019-01-12 15:12

jaytelford wrote:the Grub boot loader still thinks that I am dual booting. Consequently, its probing the system for other OS

No, the GRUB boot loader does not probe for other systems. Instead of giving us your interpretation of what you see, please describe what happens.

Dai_trying wrote:if you want to prevent other OS's from being shown you can remove os-prober

Please note that os-prober is only used by grub-mkconfig/update-grub to build GRUB's configuration file /boot/grub/grub.cfg, not by the GRUB boot loader which reads grub.cfg at boot time and displays the menu.
Also, there is no need to remove os-prober to disable it. Just add the following line into /etc/default/grub :
Code: Select all
GRUB_DISABLE_OS_PROBER=true


llivv wrote:I would want to know why grub is still seeing win boot remnants in /efi (if that is the case)

It isn't, as there is no EFI partition. Or the OP blatantly lied to us about the partitioning and "there is nothing Windows left at all".
p.H
 
Posts: 1020
Joined: 2017-09-17 07:12

Re: How do I disable to the Grub menu and go directly to log

Postby jaytelford » 2019-01-12 20:18

No, the GRUB boot loader does not probe for other systems. Instead of giving us your interpretation of what you see, please describe what happens.


This was an issue with me anthropomorphizing a piece of software. Sorry, but what I said was more an "interpretation" than an account. You said that and it was perhaps wrong of me to do so.

What is happening though regardless, is the system is being very slow during boot and the bootloader seems to be confused. It is showing the screen to choose the OS but obviously there is only Debian on the system.

It isn't, as there is no EFI partition. Or the OP blatantly lied to us about the partitioning and "there is nothing Windows left at all".


To the best of my knowledge, there is no Windows elements left of the system. All windows partitions were deleted and then the entire drive was formatted in the way I described in my original post.

I was trying to get help for this issue, so I wouldn't lie. Everything I stated (perhaps with the exception of anthropomorphize in the bootloader in a way I should not have) was true to the best of my knowledge.

It's interesting that though, that the modifications mentioned, were the same ones I came across online when searching for solutions (though they were mentioned in relation to Ubuntu)

I have tried those and they didn't work. In one instance adding in the additional lines, seemed to slow down, not speed up the boot process.

It's further interesting that once the system.has finished booting, it works perfectly fine. It's just the boot process that seems to have an issue.

I am thinking there must be something else wrong with system and that this other thing is the underlying cause.
jaytelford
 
Posts: 30
Joined: 2018-05-09 10:56
Location: United KIngdom

Re: How do I disable to the Grub menu and go directly to log

Postby Head_on_a_Stick » 2019-01-12 20:28

jaytelford wrote:the system is being very slow during boot

Have you tried
Code: Select all
systemd-analyze blame
systemd-analyze critical-chain
systemd-analyze plot > boot.svg # look at boot.svg :)

Useful tools.
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: How do I disable to the Grub menu and go directly to log

Postby bw123 » 2019-01-12 20:51

We don't think you're lying intentionally, we think you're lying because we want facts and you're saying things that make no sense.

Do the systemd-analyze stuff, and then search the forum. It's not that big of a deal. A lot of times it's network or some other service like remote filesystems or whatnot and it slows down the boot. Real debian users don't reboot except in case of death or serious bodily injury.
User avatar
bw123
 
Posts: 3787
Joined: 2011-05-09 06:02

Re: How do I disable to the Grub menu and go directly to log

Postby llivv » 2019-01-12 21:21

p.H wrote:
llivv wrote:I would want to know why grub is still seeing win boot remnants in /efi (if that is the case)

It isn't, as there is no EFI partition. Or the OP blatantly lied to us about the partitioning and "there is nothing Windows left at all".
p.H thanks for noticing that. I do my best (most of the time) to write up my assumptions from what I've read or failed to read in previous posts in a thread. In so, my thinking at the time I posted was the OP had removed all of windows but had not reformatted the disk(s) in doing so. And without knowing one way or another and assuming the OP was experiencing some unwanted behavior from os-prober, led me to believe there might still be some issues unresolved from the win removal process.
I admit I may have (and after reading the OP again most probably did ) misinturpreded this statement in the OP
jaytelford wrote:However; I did not wipe the HDD prior to installing Debian. Instead, I did it as part of the installation process. Deleted and partitioned the HDD as follows

But, in my thinking even though I had a slightly different picture of the issue at the time I posted, still leaves me with the feeling that there may still be possible issues remaining form the windows preinstallation removal process.
Still we don't know exactly how jaytelford removed windows and it might not really be much of an issue
Maybe that is more confusing than my original post (I hope not).....

I just found the boot wiki and I'll be reading it myself shortly.
https://wiki.debian.org/CategoryBootProcess
see 3.BootProcessSpeedup

there is possibly one more trick but it requires rolling your own kernel.
(and I'm not sure it's still available in the make config scripts)
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
User avatar
llivv
 
Posts: 5488
Joined: 2007-02-14 18:10
Location: cold storage

Re: How do I disable to the Grub menu and go directly to log

Postby jaytelford » 2019-01-12 21:24

bw123 wrote:We don't think you're lying intentionally, we think you're lying because we want facts and you're saying things that make no sense.

Do the systemd-analyze stuff, and then search the forum. It's not that big of a deal. A lot of times it's network or some other service like remote filesystems or whatnot and it slows down the boot. Real debian users don't reboot except in case of death or serious bodily injury.


I will do a better job next time. Normally; I wouldn't reboot, I have a Debian server that doesn't get rebooted but since I am installing Debian on a laptop - so I can interact with my server when I am not able to sit at my desk, I need to reboot since a laptop basically has a finite amount of power.

I will do as you suggested but you are right - it isn't such a big deal
jaytelford
 
Posts: 30
Joined: 2018-05-09 10:56
Location: United KIngdom

Re: How do I disable to the Grub menu and go directly to log

Postby jaytelford » 2019-01-12 21:52

Guys, I am really sorry that I was not very clear while making this post. I had been awake for a long time, was tired and instead of providing facts I ascribed thoughts and feelings to a piece of software that totally mislead you all and made me look like a fool.

Again, I apologize.

Let me try to clear up a few things.

First, the boot process was taking a long time and then showing me a screen to chose the OS (with only Debian showing on that screen). Second; I assumed, wrongly perhaps, that since I was seeing the screen to choose which OS I wanted to boot, that the boot loader somehow thought that I was dual booting and using os-prober to see what OSs were installed, finding only Debian and presenting me with only that option on the selection screen.

From what I have read from you all, it does not work that way - so that is out the window. However; I am still being shown the screen to choose which OS I want to boot into and Debian still remains the only option on that screen.

I understand that the Grub menu displays during boot and that this is usually normal behavior unless the system is told otherwise. However; where normally, the Grub menu would time out and the boot process would continue. For me, it is not. I am having to choose my OS (again, only Debian is displayed) for the boot process to continue and it was this, which made me think that Grub thought it was running on a system on which Debian was being dual booted.

Again, this was an assumption on my part and seems, from what I have read from you guys, was also incorrect.

Upon selecting Debian from the previous screen; the system begins booting as expected but still takes a long time. Once the boot process is completed, I can login to Debian and everything works perfectly fine.

The issue is not with the performance of Debian, rather with the time it takes during initial boot and the fact that my system is not automatically booting directly into Debian.

I will do as you all have suggested and hopefully, I will be able to solve this problem. If not, I will come back here and do better the next time.

Again, sorry for confusing you all so much, but I hope that I have now better explained what my problem is.
jaytelford
 
Posts: 30
Joined: 2018-05-09 10:56
Location: United KIngdom

Re: How do I disable to the Grub menu and go directly to log

Postby Dai_trying » 2019-01-12 23:01

Did you try setting
Code: Select all
GRUB_TIMEOUT=-1

and then running (important)
Code: Select all
update-grub

As root (or with sudo)

And regarding you delay when starting, it is possible that your swap space might not match the fstab entry as this can cause a 90 second delay during bootup and as you have been reconfiguring/installing this could be possible.
I would check that the UUID is the same in fstab as it is for your swap partition

Code: Select all
grep "swap" /etc/fstab

Code: Select all
sudo blkid | grep swap

These two UUID's should match.

Of course there could be other reasons for a slow boot but this seems to be quite a common problem when changing things on HDD's
Dai_trying
 
Posts: 707
Joined: 2016-01-07 12:25

Re: How do I disable to the Grub menu and go directly to log

Postby Segfault » 2019-01-13 01:22

Best way to disable Grub screen is not to use Grub. :P Linux EFI stub kernel can be booted directly by UEFI firmware.
Segfault
 
Posts: 896
Joined: 2005-09-24 12:24

Re: How do I disable to the Grub menu and go directly to log

Postby p.H » 2019-01-13 11:26

jaytelford wrote:First, the boot process was taking a long time and then showing me a screen to chose the OS

IIUC, "GRUB Loading" is displayed, then nothing seems to happen and after an unusually long delay the GRUB menu shows up. Am I correct ? Slow disk access or the graphic mode may cause the delay. Do you see the disk light flash during the delay ? If not, you could try to uncomment the GRUB_TERMINAL=console line in /etc/default/grub and run update-grub to fall back to text mode.

jaytelford wrote:where normally, the Grub menu would time out and the boot process would continue. For me, it is not.

Do you mean the countdown timer displayed at the bottom of the GRUB menu does not decrease, or is not displayed at all ?

jaytelford wrote:Upon selecting Debian from the previous screen; the system begins booting as expected but still takes a long time

What part of the boot process actually takes a long time ? Loading of the kernel and initramfs, or other steps ? What is displayed during the delays ? You can boot in rescue mode from the advanced menu for a more verbose boot.

Segfault wrote: Linux EFI stub kernel can be booted directly by UEFI firmware.

Using EFI stub requires a UEFI firmware and an EFI partition. AFAICS, there is no EFI partition.
Also, EFI stub is much less convenient than GRUB : no rescue mode, no kernel command line editor at boot time, no kernel update automatic management, not suitable for fallback EFI boot...
p.H
 
Posts: 1020
Joined: 2017-09-17 07:12

Re: How do I disable to the Grub menu and go directly to log

Postby Segfault » 2019-01-13 12:59

You can enable more than one entry with efibootmgr, so there is fallback, provided by UEFI firmware. Or you can use rEFInd. But indeed, this is no solution for legacy boot.
Segfault
 
Posts: 896
Joined: 2005-09-24 12:24

Next

Return to General Questions

Who is online

Users browsing this forum: Stray and 14 guests

fashionable