Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

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

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
jaytelford
Posts: 36
Joined: 2018-05-09 10:56
Location: United KIngdom

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

#1 Post by jaytelford »

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

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

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

#2 Post by Dai_trying »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#3 Post by Head_on_a_Stick »

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
deadbang

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

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

#4 Post by llivv »

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.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

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

#5 Post by p.H »

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".

jaytelford
Posts: 36
Joined: 2018-05-09 10:56
Location: United KIngdom

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

#6 Post by jaytelford »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#7 Post by Head_on_a_Stick »

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.
deadbang

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

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

#8 Post by bw123 »

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.
resigned by AI ChatGPT

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

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

#9 Post by llivv »

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.

jaytelford
Posts: 36
Joined: 2018-05-09 10:56
Location: United KIngdom

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

#10 Post by jaytelford »

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: 36
Joined: 2018-05-09 10:56
Location: United KIngdom

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

#11 Post by jaytelford »

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.

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

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

#12 Post by Dai_trying »

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

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

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

#13 Post by Segfault »

Best way to disable Grub screen is not to use Grub. :P Linux EFI stub kernel can be booted directly by UEFI firmware.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

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

#14 Post by p.H »

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...

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

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

#15 Post by Segfault »

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.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

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

#16 Post by p.H »

Segfault wrote:You can enable more than one entry with efibootmgr, so there is fallback, provided by UEFI firmware.
Other EFI boot entries are not fallback. Fallback is used when there is no EFI boot entry or none works, and uses a hardcorded path \EFI\BOOT\BOOT${ARCH}.EFI instead ($ARCH being "X64" for 64-bit PC UEFI firmware for example). However this does not allow to pass the initramfs pathname and the root filesystem specification required by the Debian kernel EFI stub, so it will result in a kernel panic.

jaytelford
Posts: 36
Joined: 2018-05-09 10:56
Location: United KIngdom

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

#17 Post by jaytelford »

I have fixed this issue this morning.

Instead of digging into the problem, I thought I would start from scratch as Debian had only just been installed and there was nothing much for me to loose in doing so. This time however; instead of deleting partitions and formatting the HDD during install, I did it first. I then changed some settings so the system would boot from DVD first, inserted the disk and restarted.

I went through the whole Debian set up and installation process and this time, I am not having the very slow or weird boot issues.

So the problem is fixed, though I still don't know what was causing it in the first place. Perhaps when i thought that I had removed all the Windows partitions, I had missed something or something just went wrong during the installation.

I really don't know but at least I have this issue fixed now.

kevinthefixer
Posts: 190
Joined: 2018-05-05 22:30

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

#18 Post by kevinthefixer »

Just curious, how old is the media you installed from? A few months back, a kernel update caused similar problems for some of us with systems "low on entropy", whatever that might mean. We'd just about sorted it out when another update fixed it. Just wondered if you might have install media from that few days, and perhaps this time you had an internet connection while installing that updated the kernel? FWIW I still set my GRUB timeout to 1 (that's one second) so that if I do have a problem it's possible to access GRUB's advanced menus but boot time is still only one more second. My old Dell laptop boots in 20 seconds from punch-the-button to working desktop that way (it has an SSD in it).

Post Reply