Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kimjj81/52c736979a50e775e6a0329277939b25 to your computer and use it in GitHub Desktop.
Save kimjj81/52c736979a50e775e6a0329277939b25 to your computer and use it in GitHub Desktop.
Install Ubuntu server 18.04 via USB disk and serial console

Tested on NCA-1510B Lanner Electronics Inc.

Requirements

  • Ubuntu machine with network connection for making bootable USB.
  • An 8GiB USB.

Steps

  1. Download latest ubuntu server distro image. Recommend ubuntu-server 18.04

http://cdimage.ubuntu.com/releases/18.04.1/release/?_ga=2.12074420.164276020.1537186949-1883798353.1537186949

OR (local only)

http://192.168.81.12/iso/ubuntu-18.04.1-server-amd64.iso

  1. Create a bootable USB using usb-creator-gtk.

  2. Connect to device via minicom.

sudo minicom -c on

Configure the serial console. The command dmesg | grep tty help to identify the identity of the serial.

  1. Press TAB or DEL to config BIOS Boot option to UEFI, select the USB for primary boot device. Save BIOS and start booting the device.

  2. At Installation Menu, quickly move the cursor to Install Ubuntu Server and press e. Point the console to the corresponding tty by adding console=ttyS0,115200n8 text as a parameter of linux command. Remove quiet option. Example:

  set gfxpayload=text
	linux	/install/vmlinuz  file=/cdrom/preseed/ubuntu-server.seed console=ttyS0,115200n8 text ---
	initrd	/install/initrd.gz

Press Ctrl+X to start booting with new grub configuration.

TADA!!!! Now you can install Ubuntu server in text mode.

After installation, at first time bootup, hit ESC quickly to show grub menu. Try to edit Ubuntu entry as same as above step. After login to Ubuntu, put the additional parameters to grub config and update accordingly.

sudo vim /etc/default/grub
# Set GRUB_CMDLINE_LINUX="console=ttyS0,115200n8 text"
# Save the file.

sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo update-grub
@kimjj81
Copy link
Author

kimjj81 commented Nov 6, 2019

How to enable serial , In Rasberrypi 2 B Ubuntu 18.04

@kimjj81
Copy link
Author

kimjj81 commented Nov 6, 2019

GRUB_DEFAULT=0
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT=""
#GRUB_CMDLINE_LINUX="console=tty1 console=ttyS0,115200"
GRUB_CMDLINE_LINUX="console=ttyS0,115200n8 text"
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment