Skip to content

Instantly share code, notes, and snippets.

@tonejito
Last active April 26, 2017 15:22
Show Gist options
  • Select an option

  • Save tonejito/51691fcda48ea4a31506394958be59da to your computer and use it in GitHub Desktop.

Select an option

Save tonejito/51691fcda48ea4a31506394958be59da to your computer and use it in GitHub Desktop.
Debian 8 boot configuration for grub2, rcS and systemd getty / rc.local

Boot configuration for @Debian 8

  • Verbose boot messages for GNU GRUB 2
  • Verbose boot config in /etc/default/rcS
  • Disable VT clear when launching getty via @systemd
  • Enable rc.local facility
# /etc/systemd/system/[email protected]/getty.conf
# = ^ . ^ =
# https://wiki.debian.org/systemd
# https://www.freedesktop.org/software/systemd/man/systemd.unit.html
# https://lists.debian.org/debian-user/2015/09/msg00082.html
# http://raspberrypi.stackexchange.com/a/37419
# https://wiki.archlinux.org/index.php/Systemd_FAQ
[Service]
# the VT is cleared by TTYVTDisallocate
# We must unset the value before modifying
TTYVTDisallocate=
TTYVTDisallocate=no
# /etc/default/grub
# = ^ . ^ =
# 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=3
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
# https://www.kernel.org/doc/Documentation/kernel-parameters.txt
GRUB_CMDLINE_LINUX_DEFAULT="earlyprintk=vga,keep verbose INIT_VERBOSE=yes init=/sbin/init -v"
GRUB_CMDLINE_LINUX="consoleblank=0"
# 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=1024x768
GRUB_GFXPAYLOAD_LINUX=keep
# 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"
# /etc/systemd/system/rc-local.service.d/rc-local.conf
# = ^ . ^ =
# Be sure to chmod +x /etc/rc.local after setting this file in place
# https://www.debian.org/doc/manuals/debian-faq/ch-customizing.en.html
# https://www.freedesktop.org/software/systemd/man/systemd.unit.html
# https://www.linuxbabe.com/linux-server/how-to-enable-etcrc-local-with-systemd
# http://superuser.com/a/898203
# https://wiki.archlinux.org/index.php/Systemd#Forward_journald_to_.2Fdev.2Ftty12
# https://bbs.nextthing.co/t/running-rc-local-on-restart/8918
[Service]
StandardOutput=tty
#!/bin/sh -e
#
# /etc/rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/usr/bin/setterm --blank 0 --powersave off --powerdown 0
exit 0
# /etc/default/rcS
# = ^ . ^ =
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.
# delete files in /tmp during boot older than x days.
# '0' means always, -1 or 'infinite' disables the feature
TMPTIME=0
# spawn sulogin during boot, continue normal boot if not used in 30 seconds
#SULOGIN=no
# do not allow users to log in until the boot has completed
#DELAYLOGIN=no
# be more verbose during the boot process
VERBOSE=yes
# automatically repair filesystems with inconsistencies during boot
#FSCKFIX=no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment