Created
January 13, 2012 13:17
-
-
Save np422/1606068 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Serial console for both OS and GRUB | |
echo "sx:2345:respawn:/sbin/agetty 9600 ttyS1 vt100" >> /etc/inittab | |
cd /boot/grub | |
mv grub.conf grub.conf.orig | |
cat <<EOF >grub.conf | |
serial --unit=1 --speed=9600 | |
terminal --timeout=10 serial console | |
default=0 | |
timeout=5 | |
EOF | |
perl -e 'undef $/;$a=<>;$a =~ /^(title.*)/sm; $b=$1; $b =~ s/rhgb quiet/console=ttyS1,9600/g; print "$b\n";' < grub.conf.orig >>grub.conf | |
echo "ttyS0" >> /etc/securetty | |
echo "ttyS1" >> /etc/securetty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment