summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2016-04-25 16:24:56 -0700
committerJorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>2016-04-26 21:22:08 +0000
commitf242cd9dca6651c440dc50f566d8928b75acb1d2 (patch)
tree3ef869df07af0381be3fa482ad7ba0e71464ec31
parentcloud-prep: ensure migrate-pax is executable. (diff)
downloadreleng-f242cd9dca6651c440dc50f566d8928b75acb1d2.tar.gz
releng-f242cd9dca6651c440dc50f566d8928b75acb1d2.tar.bz2
releng-f242cd9dca6651c440dc50f566d8928b75acb1d2.zip
cloud-prep: make grub accessible on serial console, just like the kernel.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--releases/weekly/scripts/cloud-prep.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/releases/weekly/scripts/cloud-prep.sh b/releases/weekly/scripts/cloud-prep.sh
index 20f3c5aa..d1f98f32 100644
--- a/releases/weekly/scripts/cloud-prep.sh
+++ b/releases/weekly/scripts/cloud-prep.sh
@@ -16,9 +16,14 @@ grep -v rootfs /proc/mounts > /etc/mtab
echo 'net.ipv4.conf.eth0.arp_notify = 1' >> /etc/sysctl.conf
echo 'vm.swappiness = 0' >> /etc/sysctl.conf
-# Let's configure out grub
+# Let's configure our grub
+# Access on both regular tty and serial console
mkdir /boot/grub
-echo 'GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"' >> /etc/default/grub
+cat >>/etc/default/grub <<EOF
+GRUB_TERMINAL='serial console'
+GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"
+GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
+EOF
grub2-mkconfig -o /boot/grub/grub.cfg
sed -r -i 's/loop[0-9]+p1/LABEL\=cloudimg-rootfs/g' /boot/grub/grub.cfg
sed -i 's/root=.*\ ro/root=LABEL\=cloudimg-rootfs\ ro/' /boot/grub/grub.cfg