3 # Copyright (c) 2016 Cisco and/or its affiliates.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
19 echo "********** CONFIGURING SERIAL CONSOLE AND DISABLING IPV6 **********"
20 cat - > /etc/init/ttyS0.conf <<"_EOF"
23 # This service maintains a getty on ttyS0 from the point the system is
24 # started until it is shut down again.
26 start on stopped rc RUNLEVEL=[12345]
27 stop on runlevel [!12345]
30 exec /sbin/getty -L 115200 ttyS0 vt102
33 cat - > /etc/default/grub <<"_EOF"
34 # If you change this file, run 'update-grub' afterwards to update
35 # /boot/grub/grub.cfg.
36 # For full documentation of the options in this file, see:
37 # info -f grub -n 'Simple configuration'
41 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
42 GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8 ipv6.disable=1"
45 GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
47 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
48 #GRUB_DISABLE_LINUX_UUID=true
50 # Uncomment to disable generation of recovery mode menu entries
51 #GRUB_DISABLE_RECOVERY="true"
53 # Uncomment to get a beep at grub start
54 #GRUB_INIT_TUNE="480 440 1"