c065021199936542f9874cd938a06166254d9aa3
[csit.git] / resources / tools / disk-image-builder / ubuntu / scripts-remote / serial-console-ubuntu-16.04.1.sh
1 #!/bin/sh -e
2
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:
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15
16 ##
17 ## Serial console
18 ##
19 echo "********** CONFIGURING SERIAL CONSOLE AND DISABLING IPV6 **********"
20 cat - > /etc/default/grub <<"_EOF"
21 # If you change this file, run 'update-grub' afterwards to update
22 # /boot/grub/grub.cfg.
23 # For full documentation of the options in this file, see:
24 #   info -f grub -n 'Simple configuration'
25
26 GRUB_DEFAULT=0
27 GRUB_TIMEOUT=1
28 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
29 GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8 ipv6.disable=1"
30
31 GRUB_TERMINAL=serial
32 GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
33
34 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
35 #GRUB_DISABLE_LINUX_UUID=true
36
37 # Uncomment to disable generation of recovery mode menu entries
38 #GRUB_DISABLE_RECOVERY="true"
39
40 # Uncomment to get a beep at grub start
41 #GRUB_INIT_TUNE="480 440 1"
42 _EOF
43
44 update-grub