Skip to content

Instantly share code, notes, and snippets.

@abeyt
Forked from stefanozanella/enable_serial_console.sh
Last active September 19, 2022 16:57
Show Gist options
  • Save abeyt/9c3665c4b742d87c84bb to your computer and use it in GitHub Desktop.
Save abeyt/9c3665c4b742d87c84bb to your computer and use it in GitHub Desktop.

Revisions

  1. abeyt revised this gist Aug 6, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion enable_serial_console.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    echo "ttyS0" > /etc/securetty
    echo "ttyS0" >> /etc/securetty

    vi /etc/default/grub
    # Add console=ttyS0 to the end of kernel line(s) "GRUB_CMDLINE_LINUX"
  2. abeyt revised this gist Jul 29, 2015. 1 changed file with 7 additions and 6 deletions.
    13 changes: 7 additions & 6 deletions enable_serial_console.sh
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,15 @@
    echo "ttyS0" > /etc/securetty

    vi /etc/grub.conf
    # Add console=ttyS0 to the end of kernel line(s)

    vi /etc/sysconfig/init
    vi /etc/default/grub
    # Add console=ttyS0 to the end of kernel line(s) "GRUB_CMDLINE_LINUX"
    grub2-mkconfig -o /boot/grub2/grub.cfg
    reboot
    #vi /etc/sysconfig/init
    # Edit ACTIVE_CONSOLES to look like:
    ACTIVE_CONSOLES="/dev/tty[1-6] /dev/ttyS0"
    #ACTIVE_CONSOLES="/dev/tty[1-6] /dev/ttyS0"

    # If on a live system, do the following
    init q
    #init q

    # After that, if on KVM virtual machine, it should be possible to do
    virsh console <vm_name>
  3. @stefanozanella stefanozanella created this gist Jan 16, 2013.
    15 changes: 15 additions & 0 deletions enable_serial_console.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    echo "ttyS0" > /etc/securetty

    vi /etc/grub.conf
    # Add console=ttyS0 to the end of kernel line(s)

    vi /etc/sysconfig/init
    # Edit ACTIVE_CONSOLES to look like:
    ACTIVE_CONSOLES="/dev/tty[1-6] /dev/ttyS0"

    # If on a live system, do the following
    init q

    # After that, if on KVM virtual machine, it should be possible to do
    virsh console <vm_name>
    # and see the console output