Install Ubuntu 14.04/16.04 Debian 7/8/9 with USB stick and serial console

This default install CD images cannot be used to install a server that does not have a VGA display.
Many new embedded systems only have a serial console that can be used for installation.
This will explain howto install an Ubuntu or Debian distro without a VGA display

For this you need a serial cable to connect to you PC or an USB serial adapter in your PC does not have and serial port.
To connect to the serial port you can use putty or CRT or your favorite terminal program.
Communication parameters are usually baud:115200, 8 bit, none parity, 1 stop bit.
Terminal is usually TV100+ but VT100 works good enough.
You also need a network cable with internet connectivity plugged in.

Create a bootable USB stick

First create a bootable USB stick with  “Universal USB Installer” and the distribution you want.
Choose “Ubuntu server installer” if ubuntu or “Debian netinst” if Debian.
Recommend to choose format so you have a clean install stick.
Choose you USB flash and click create.

Change /boot/grub/grub.cfg on USB stick

Ubuntu 16.04:
Add in menuentry “Install Ubuntu Server”
linux /install/…../linux console=ttyS0,115200 cdrom=……

Ubuntu 14.04:
Add in menuentry “Install Ubuntu Server”
append  file=/cdrom….seed console=ttyS0,115200 cdrom=……

Debian 8:
Change in menuentry “Install” or all
Replace vga=788 with console=ttyS0,115200

Debian 7:
No change necessary

Changes in /isolinux/txt.cfg on USB stick

Ubuntu 16.04:
replace vga=788 in “label install” section
append file=…..seed console=ttyS0,115200 cdrom=…..

Ubuntu 14.04:
add in “Install Ubuntu Server” section
append file=…..seed console=ttyS0,115200 cdrom-detect/…..

Debian 8:
Replace vga=788 with console=ttyS0,115200

Debian 7:
Replace vga=788 with console=ttyS0,115200

Minimal installation

To make sure that you can access you device after installation I will recommend to install “ssh server”

Post changes

After installation is finished you need to change /boot/grub/grub.cfg to redirect console to serial port.

  1. When booting and you are presented the grub menu, press “e” (edit) to edit the commands before boot.
  2. Scroll down to the line that begins with “Linux /boot/vm….” and add “console=ttyS0,115200” before “root=…”
  3. Press Ctrl-x to boot.

After logged in as root, edit /boot/grub/grub.conf and do as in point 2 above.
Press “:w!” to save if you are using vi and “ZZ” to end.

Type reboot and you are in business.

Usefull Links

Ubuntu 16.04: GRUB2 and Linux with serial console

 


add in top.
serial –unit=0 –speed=115200 –word=8 –parity=no –stop=1
terminal_input serial
terminal_output serial

?Changes in /isolinux/isolinux.cfg???

#path

#default vesamenu.c32

Will boot direct to install

Del dette: