-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add basic support of access via serial console * Add avanced serial console support * Fix vagrant push action * Cleanup of post install action
- Loading branch information
Showing
5 changed files
with
67 additions
and
14 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
#!/bin/bash | ||
echo test > /root/test-post-install | ||
set -x | ||
readonly LOG_FILE="/root/post-install.log" | ||
touch $LOG_FILE | ||
exec 1>$LOG_FILE | ||
exec 2>&1 | ||
|
||
echo "##### Start post install actions ..." | ||
|
||
echo "### Start configure of serial-getty ..." | ||
systemctl enable [email protected] | ||
systemctl start [email protected] | ||
echo "### Finish configure of serial-getty." | ||
|
||
echo "### Start configure of serial access on GRUB ..." | ||
sed -i -r 's/^(GRUB_CMDLINE_LINUX_DEFAULT)/#\1/' /etc/default/grub | ||
sed -i -r 's/^(GRUB_CMDLINE_LINUX=).*/\1"console=tty0 console=ttyS0,115200n8"/' /etc/default/grub | ||
sed -i -r 's/^#?(GRUB_TERMINAL=).*/\1"console serial"/' /etc/default/grub | ||
egrep -q "^GRUB_SERIAL_COMMAND=" /etc/default/grub && sed -i -r 's/^(GRUB_SERIAL_COMMAND=).*/\1"serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"/' /etc/default/grub || echo 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >> /etc/default/grub | ||
update-grub | ||
echo "### Finish configure of serial access on GRUB." | ||
|
||
echo "##### Finish post install actions." |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
# D-I config version 2.0 | ||
# search path for the c32 support libraries (libcom32, libutil etc.) | ||
serial 0 9600 | ||
path ubuntu-installer/amd64/boot-screens/ | ||
default ubuntu-installer/amd64/boot-screens/vesamenu.c32 | ||
prompt 0 | ||
timeout 5 | ||
timeout 150 | ||
#default Ubuntu16 | ||
|
||
label Ubuntu16 | ||
label Ubuntu16serial | ||
menu default | ||
menu LABEL Ubuntu16serial | ||
kernel ubuntu-installer/amd64/linux | ||
append initrd=ubuntu-installer/amd64/initrd.gz domain={{ domain }} hostname={{ hostname }} preseed/url={{ pxe_proto }}://{{ pxe_path_preseed }}/preseed.txt mirror/http/hostname={{ pxe_mirror }} mirror/protocol=http debian-installer/allow_unauthenticated_ssl=true locale=en_US.UTF-8 debian/priority=critical vga=normal debian-installer/keymap=us console-keymaps-at/keymap=us console-setup/layoutcode=en_US netcfg/choose_interface=auto localechooser/translation/warn-light=true localechooser/translation/warn-severe=true console=tty0 console=ttyS0,115200n8 console-setup/ask_detect=false FRONTEND_BACKGROUND=noninteractive - | ||
|
||
|
||
label Ubuntu16 | ||
menu LABEL Ubuntu16 | ||
kernel ubuntu-installer/amd64/linux | ||
append initrd=ubuntu-installer/amd64/initrd.gz domain={{ domain }} hostname={{ hostname }} preseed/url={{ pxe_proto }}://{{ pxe_path_preseed }}/preseed.txt mirror/http/hostname={{ pxe_mirror }} mirror/protocol=http debian-installer/allow_unauthenticated_ssl=true locale=en_US.UTF-8 debian/priority=critical vga=normal debian-installer/keymap=us console-keymaps-at/keymap=us console-setup/layoutcode=en_US netcfg/choose_interface=auto localechooser/translation/warn-light=true localechooser/translation/warn-severe=true console-setup/ask_detect=false FRONTEND_BACKGROUND=original - | ||
append initrd=ubuntu-installer/amd64/initrd.gz domain={{ domain }} hostname={{ hostname }} preseed/url={{ pxe_proto }}://{{ pxe_path_preseed }}/preseed.txt mirror/http/hostname={{ pxe_mirror }} mirror/protocol=http debian-installer/allow_unauthenticated_ssl=true locale=en_US.UTF-8 debian/priority=critical vga=normal debian-installer/keymap=us console-keymaps-at/keymap=us console-setup/layoutcode=en_US netcfg/choose_interface=auto localechooser/translation/warn-light=true localechooser/translation/warn-severe=true console=ttyS0,115200n8 console=tty0 console-setup/ask_detect=false FRONTEND_BACKGROUND=noninteractive - |
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