Enable Serial Console on Boot: Difference between revisions

From Alpine Linux
No edit summary
Line 33: Line 33:
Notice, if you want to use this for a Xen VM,
Notice, if you want to use this for a Xen VM,
you need to configure the speed at 115200 bps and enable the "serial=pty" setting in the VM config file.
you need to configure the speed at 115200 bps and enable the "serial=pty" setting in the VM config file.
=== Example extlinux.conf ===
<pre>
DEFAULT menu.c32
PROMPT 0
MENU TITLE Alpine/Linux Boot Menu
MENU AUTOBOOT Alpine will be booted automatically in # seconds.
SERIAL 0 115200
TIMEOUT 100
LABEL grsec
  MENU DEFAULT
  MENU LABEL Linux 3.10.33-0-grsec
  LINUX vmlinuz-3.10.33-0-grsec
  INITRD initramfs-3.10.33-0-grsec
  APPEND root=UUID=re-mov-ed-uu-id modules=sd-mod,usb-storage,ext4 console=ttyS0,115200
MENU SEPARATOR
</pre>
Please: adjust the tty speed to 9600 if needed.
The timeout is given in centiseconds, so this would be a 10 second timeout.


[[Category:Booting]]
[[Category:Booting]]
[[Category:Installation]]
[[Category:Installation]]

Revision as of 01:39, 11 March 2014

How to Enable the Serial Console on Boot (1.10.x)

When using syslinux to boot, you'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.

Add the following:

  • serial 0 9600
  • add console=ttyS0,9600 to the append parameter
  • optionally, remove quiet from the append parameter

Example syslinux.cfg

serial 0 9600
timeout 20
prompt 1
default grsec
label grsec
        kernel /boot/grsec
        append initrd=/boot/grsec.gz alpine_dev=sda1:vfat modules=sd-mod,usb-storage console=ttyS0,9600


Example update-extlinux.conf (2.5+)

The update-extlinux.conf apparently can't set the SERIAL parameters in the /boot/extlinux.conf file. But it can at least set the kernel console line.

To do so, change the default entry: default_kernel_opts="quiet" to read like this: default_kernel_opts="console=ttys0,9600"

Notice, if you want to use this for a Xen VM, you need to configure the speed at 115200 bps and enable the "serial=pty" setting in the VM config file.

Example extlinux.conf

DEFAULT menu.c32
PROMPT 0
MENU TITLE Alpine/Linux Boot Menu
MENU AUTOBOOT Alpine will be booted automatically in # seconds.
SERIAL 0 115200
TIMEOUT 100
LABEL grsec
  MENU DEFAULT
  MENU LABEL Linux 3.10.33-0-grsec
  LINUX vmlinuz-3.10.33-0-grsec
  INITRD initramfs-3.10.33-0-grsec
  APPEND root=UUID=re-mov-ed-uu-id modules=sd-mod,usb-storage,ext4 console=ttyS0,115200

MENU SEPARATOR

Please: adjust the tty speed to 9600 if needed. The timeout is given in centiseconds, so this would be a 10 second timeout.