<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Chris</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Chris"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Chris"/>
	<updated>2026-05-03T08:11:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Enable_Serial_Console_on_Boot&amp;diff=16308</id>
		<title>Enable Serial Console on Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Enable_Serial_Console_on_Boot&amp;diff=16308"/>
		<updated>2019-09-05T06:03:20Z</updated>

		<summary type="html">&lt;p&gt;Chris: /* Add your serial console to the trusted local terminal list */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How to Enable the Serial Console on Boot (1.10.x)==&lt;br /&gt;
&lt;br /&gt;
When using syslinux to boot, you&#039;ll need to modify the syslinux.cfg file in the root directory of the boot device. If using a disk-based Alpine, modify the /boot/extlinux.cfg file.&lt;br /&gt;
&lt;br /&gt;
Add the following:&lt;br /&gt;
* &amp;lt;tt&amp;gt;serial 0 9600&amp;lt;/tt&amp;gt;&lt;br /&gt;
* add &amp;lt;tt&amp;gt;console=ttyS0,9600&amp;lt;/tt&amp;gt; to the &amp;lt;tt&amp;gt;append&amp;lt;/tt&amp;gt; parameter&lt;br /&gt;
* optionally, remove &amp;lt;tt&amp;gt;quiet&amp;lt;/tt&amp;gt; from the &amp;lt;tt&amp;gt;append &amp;lt;/tt&amp;gt; parameter&lt;br /&gt;
&lt;br /&gt;
=== Example syslinux.cfg ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
serial 0 9600&lt;br /&gt;
timeout 20&lt;br /&gt;
prompt 1&lt;br /&gt;
default grsec&lt;br /&gt;
label grsec&lt;br /&gt;
        kernel /boot/grsec&lt;br /&gt;
        append initrd=/boot/grsec.gz alpine_dev=sda1:vfat modules=sd-mod,usb-storage console=ttyS0,9600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== extlinux.conf (3.0+)==&lt;br /&gt;
&lt;br /&gt;
The /etc/update-extlinux.conf is read by the update-extlinux utility.&lt;br /&gt;
&lt;br /&gt;
To do so, change the default entry:&lt;br /&gt;
&amp;lt;pre&amp;gt;default_kernel_opts=&amp;quot;quiet&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
to read like this:           &lt;br /&gt;
&amp;lt;pre&amp;gt;default_kernel_opts=&amp;quot;console=ttyS0,9600 quiet&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the serial port and baud rate to match the default_kernel_opts line above:&lt;br /&gt;
&amp;lt;pre&amp;gt;serial_port=0&lt;br /&gt;
serial_baud=9600&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Xen ===&lt;br /&gt;
&lt;br /&gt;
Notice, if you want to use this for a Xen VM,&lt;br /&gt;
you need to configure the speed at &#039;&#039;&#039;115200&#039;&#039;&#039; bps and enable the &lt;br /&gt;
&amp;lt;pre&amp;gt;serial=&amp;quot;pty&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
setting in the VM config file.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Xen can be configured to use and log to a serial console by editing /etc/update-extlinux.conf to include the following lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
default_kernel_opts=&amp;quot;console=hvc0 earlyprintk=xen nomodeset&amp;quot;&lt;br /&gt;
xen_opts=&amp;quot;dom0_mem=256M com1=115200,8n1 console=com1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the [http://wiki.xen.org/wiki/Xen_Serial_Console Xen wiki] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Example /boot/extlinux.conf ===&lt;br /&gt;
&lt;br /&gt;
This is a complete file, written by the update-extlinux command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DEFAULT menu.c32&lt;br /&gt;
PROMPT 0&lt;br /&gt;
MENU TITLE Alpine/Linux Boot Menu&lt;br /&gt;
MENU AUTOBOOT Alpine will be booted automatically in # seconds.&lt;br /&gt;
SERIAL 0 9600&lt;br /&gt;
TIMEOUT 100&lt;br /&gt;
LABEL grsec&lt;br /&gt;
  MENU DEFAULT&lt;br /&gt;
  MENU LABEL Linux 3.10.33-0-grsec&lt;br /&gt;
  LINUX vmlinuz-3.10.33-0-grsec&lt;br /&gt;
  INITRD initramfs-3.10.33-0-grsec&lt;br /&gt;
  APPEND root=UUID=re-mov-ed-uu-id modules=sd-mod,usb-storage,ext4 console=ttyS0,9600&lt;br /&gt;
&lt;br /&gt;
MENU SEPARATOR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please: adjust the tty speed to 115200 if needed (Xen!!).&lt;br /&gt;
&lt;br /&gt;
The timeout is given in centiseconds, so this would be a 10 second timeout.&lt;br /&gt;
&lt;br /&gt;
If the file is read by pygrub, the same value is interpreted as seconds, resulting in a 100s bootup delay per VM.&lt;br /&gt;
&lt;br /&gt;
== Enabling a login console ==&lt;br /&gt;
&lt;br /&gt;
This is done in /etc/inittab. There is commented entry for ttyS0. Just enable it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Put a getty on the serial port&lt;br /&gt;
ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To start the getty, restart init:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kill -HUP 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enabling two consoles during boot ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to output to both the serial and vga console during the system boot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
append &amp;quot;quiet console=ttyS0,9600 console=tty0&amp;quot;&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not known how to do the same thing in the extlinux menu. &lt;br /&gt;
You might find a starting point in this thread: http://patchwork.openembedded.org/patch/45175/&lt;br /&gt;
&lt;br /&gt;
== Add your serial console to the trusted local terminal list ==&lt;br /&gt;
If you face the problem that the login prompt always refuses your password when you use serial console, you missed this entry.&lt;br /&gt;
&lt;br /&gt;
Add this to the &amp;lt;tt&amp;gt;/etc/securetty&amp;lt;/tt&amp;gt; file:   &lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
ttyS0&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Booting]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Chris</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Enable_Serial_Console_on_Boot&amp;diff=16307</id>
		<title>Enable Serial Console on Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Enable_Serial_Console_on_Boot&amp;diff=16307"/>
		<updated>2019-09-05T06:02:44Z</updated>

		<summary type="html">&lt;p&gt;Chris: /* Enabling two consoles during boot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How to Enable the Serial Console on Boot (1.10.x)==&lt;br /&gt;
&lt;br /&gt;
When using syslinux to boot, you&#039;ll need to modify the syslinux.cfg file in the root directory of the boot device. If using a disk-based Alpine, modify the /boot/extlinux.cfg file.&lt;br /&gt;
&lt;br /&gt;
Add the following:&lt;br /&gt;
* &amp;lt;tt&amp;gt;serial 0 9600&amp;lt;/tt&amp;gt;&lt;br /&gt;
* add &amp;lt;tt&amp;gt;console=ttyS0,9600&amp;lt;/tt&amp;gt; to the &amp;lt;tt&amp;gt;append&amp;lt;/tt&amp;gt; parameter&lt;br /&gt;
* optionally, remove &amp;lt;tt&amp;gt;quiet&amp;lt;/tt&amp;gt; from the &amp;lt;tt&amp;gt;append &amp;lt;/tt&amp;gt; parameter&lt;br /&gt;
&lt;br /&gt;
=== Example syslinux.cfg ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
serial 0 9600&lt;br /&gt;
timeout 20&lt;br /&gt;
prompt 1&lt;br /&gt;
default grsec&lt;br /&gt;
label grsec&lt;br /&gt;
        kernel /boot/grsec&lt;br /&gt;
        append initrd=/boot/grsec.gz alpine_dev=sda1:vfat modules=sd-mod,usb-storage console=ttyS0,9600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== extlinux.conf (3.0+)==&lt;br /&gt;
&lt;br /&gt;
The /etc/update-extlinux.conf is read by the update-extlinux utility.&lt;br /&gt;
&lt;br /&gt;
To do so, change the default entry:&lt;br /&gt;
&amp;lt;pre&amp;gt;default_kernel_opts=&amp;quot;quiet&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
to read like this:           &lt;br /&gt;
&amp;lt;pre&amp;gt;default_kernel_opts=&amp;quot;console=ttyS0,9600 quiet&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the serial port and baud rate to match the default_kernel_opts line above:&lt;br /&gt;
&amp;lt;pre&amp;gt;serial_port=0&lt;br /&gt;
serial_baud=9600&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Xen ===&lt;br /&gt;
&lt;br /&gt;
Notice, if you want to use this for a Xen VM,&lt;br /&gt;
you need to configure the speed at &#039;&#039;&#039;115200&#039;&#039;&#039; bps and enable the &lt;br /&gt;
&amp;lt;pre&amp;gt;serial=&amp;quot;pty&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
setting in the VM config file.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Xen can be configured to use and log to a serial console by editing /etc/update-extlinux.conf to include the following lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
default_kernel_opts=&amp;quot;console=hvc0 earlyprintk=xen nomodeset&amp;quot;&lt;br /&gt;
xen_opts=&amp;quot;dom0_mem=256M com1=115200,8n1 console=com1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the [http://wiki.xen.org/wiki/Xen_Serial_Console Xen wiki] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Example /boot/extlinux.conf ===&lt;br /&gt;
&lt;br /&gt;
This is a complete file, written by the update-extlinux command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DEFAULT menu.c32&lt;br /&gt;
PROMPT 0&lt;br /&gt;
MENU TITLE Alpine/Linux Boot Menu&lt;br /&gt;
MENU AUTOBOOT Alpine will be booted automatically in # seconds.&lt;br /&gt;
SERIAL 0 9600&lt;br /&gt;
TIMEOUT 100&lt;br /&gt;
LABEL grsec&lt;br /&gt;
  MENU DEFAULT&lt;br /&gt;
  MENU LABEL Linux 3.10.33-0-grsec&lt;br /&gt;
  LINUX vmlinuz-3.10.33-0-grsec&lt;br /&gt;
  INITRD initramfs-3.10.33-0-grsec&lt;br /&gt;
  APPEND root=UUID=re-mov-ed-uu-id modules=sd-mod,usb-storage,ext4 console=ttyS0,9600&lt;br /&gt;
&lt;br /&gt;
MENU SEPARATOR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please: adjust the tty speed to 115200 if needed (Xen!!).&lt;br /&gt;
&lt;br /&gt;
The timeout is given in centiseconds, so this would be a 10 second timeout.&lt;br /&gt;
&lt;br /&gt;
If the file is read by pygrub, the same value is interpreted as seconds, resulting in a 100s bootup delay per VM.&lt;br /&gt;
&lt;br /&gt;
== Enabling a login console ==&lt;br /&gt;
&lt;br /&gt;
This is done in /etc/inittab. There is commented entry for ttyS0. Just enable it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Put a getty on the serial port&lt;br /&gt;
ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To start the getty, restart init:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kill -HUP 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enabling two consoles during boot ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to output to both the serial and vga console during the system boot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
append &amp;quot;quiet console=ttyS0,9600 console=tty0&amp;quot;&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not known how to do the same thing in the extlinux menu. &lt;br /&gt;
You might find a starting point in this thread: http://patchwork.openembedded.org/patch/45175/&lt;br /&gt;
&lt;br /&gt;
== Add your serial console to the trusted local terminal list ==&lt;br /&gt;
If you face the problem that you see the login prompt always refuses the password when you use serial console, you missed this entry.&lt;br /&gt;
&lt;br /&gt;
Add this to the &amp;lt;tt&amp;gt;/etc/securetty&amp;lt;/tt&amp;gt; file:   &lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
ttyS0&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Booting]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Chris</name></author>
	</entry>
</feed>