4

So, this is an inversion of the classic question: "Why is my terminal blank on boot?" -- How do I make my terminal blank on boot?

I'm creating a Debian Wheezy system with GRUB as the boot loader that will output video over nodm ("no display manager" -- requires no user login). I don't want users to see any boot information on their video screen at startup.

At the display manager level I use nodm and that seems to work great.

At the GRUB level I'm using these params in /etc/default/grub (and then running update-grub):

GRUB_DEFAULT=0
GRUB_FORCE_HIDDEN_MENU=true
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_DISTRIBUTOR=
#GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="silent splash loglevel=3 console=tty2 earlyprintk=tty2"
GRUB_CMDLINE_LINUX=""

And for inittab I use a custom program:

#!/bin/sh

cat -

/etc/inittab:

1:2345:respawn:/sbin/getty 38400 -i -w -n -l /usr/bin/nothing tty1

Then finally I'm tweaking the BIOS settings as much as it will allow me.

The log output I still see appears to be GRUB related, it's roughly as follows:

"Booting GNU/Linux .... " <-- I think this is the GRUB option at index 0 that is loading

"Decompressing the kernel"
"Booting the kernel" <-- not sure if these are GRUB or Kernel related?

Does anyone have some advice on purging these final bits of text?

--Update--:

This link indicates those final lines may require a kernel patch to remove:

https://forums.gentoo.org/viewtopic-t-975550.html

  • Easy quick hack: put the console on a serial port. You won't see anything on the video output device! – Celada Jul 27 '15 at 14:11
  • Where would that be done? The output messages I'm seeing currently seem to be GRUB related. I already set the kernel to go to tty2 using GRUB_CMDLINE_LINUX_DEFAULT. – mpr Jul 27 '15 at 14:47
  • 1
    That is usually done with these 3 lines in /etc/default/grub: GRUB_CMDLINE_LINUX="nofb console=ttyS0,115200" and GRUB_TERMINAL=serial and GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1". – Celada Jul 27 '15 at 14:53
  • Hmm that looked very promising but I'm still seeing the "Welcome to GRUB...Booting...Decompressing...Booting" output. I will keep investigating to see if it's something in how I'm supplying the params. – mpr Jul 27 '15 at 15:53
1

The GRUB banner is printed before configuration files are read, so the only way to get rid of them is patching the source or the binaries. There is prior art in this field, though, if you really mean it. Syslinux behaves the same in this respect. The boot loader banner is often used as a "progress bar": different parts of it are printed by different stages of the bootstrap.

On the other hand, most kernel log messages (everything besides serious errors) are suppressed by the quiet kernel parameter. Try that instead of silent.

  • Yeah it's looking like unfortunately there would be two source level patches required: one for GRUB and one for the kernel. – mpr Jul 28 '15 at 13:44
  • I don't think you need to patch the kernel. The quiet parameter did the trick for me. – Ferenc Wágner Jul 28 '15 at 17:29
  • I still see it "early console in decompress kernel"..., etc. I'm running kernel version 3.16. GRUB_CMDLINE_LINUX_DEFAULT="quiet splash loglevel=0 console=ttyS0,115200 earlyprintk=ttyS0,115200 nofb" – mpr Jul 28 '15 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.