Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/releng:master commit in: releases/weekly/scripts/
Date: Mon, 25 Apr 2016 23:27:57
Message-Id: 1461626864.430eda0a519869fd59c7ac791e83e06af2a5e876.robbat2@gentoo
1 commit: 430eda0a519869fd59c7ac791e83e06af2a5e876
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 25 23:24:56 2016 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 25 23:27:44 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=430eda0a
7
8 cloud-prep: make grub accessible on serial console, just like the kernel.
9
10 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
11
12 releases/weekly/scripts/cloud-prep.sh | 9 +++++++--
13 1 file changed, 7 insertions(+), 2 deletions(-)
14
15 diff --git a/releases/weekly/scripts/cloud-prep.sh b/releases/weekly/scripts/cloud-prep.sh
16 index 20f3c5a..d1f98f3 100644
17 --- a/releases/weekly/scripts/cloud-prep.sh
18 +++ b/releases/weekly/scripts/cloud-prep.sh
19 @@ -16,9 +16,14 @@ grep -v rootfs /proc/mounts > /etc/mtab
20 echo 'net.ipv4.conf.eth0.arp_notify = 1' >> /etc/sysctl.conf
21 echo 'vm.swappiness = 0' >> /etc/sysctl.conf
22
23 -# Let's configure out grub
24 +# Let's configure our grub
25 +# Access on both regular tty and serial console
26 mkdir /boot/grub
27 -echo 'GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"' >> /etc/default/grub
28 +cat >>/etc/default/grub <<EOF
29 +GRUB_TERMINAL='serial console'
30 +GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"
31 +GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
32 +EOF
33 grub2-mkconfig -o /boot/grub/grub.cfg
34 sed -r -i 's/loop[0-9]+p1/LABEL\=cloudimg-rootfs/g' /boot/grub/grub.cfg
35 sed -i 's/root=.*\ ro/root=LABEL\=cloudimg-rootfs\ ro/' /boot/grub/grub.cfg