Skip to content

Instantly share code, notes, and snippets.

@maixuanhan
Last active April 6, 2023 06:41
Show Gist options
  • Save maixuanhan/93c99a533d9f7b198cd8173283dfd787 to your computer and use it in GitHub Desktop.
Save maixuanhan/93c99a533d9f7b198cd8173283dfd787 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
@lixit
Copy link

lixit commented May 20, 2020

thanks. It works!

@MichaelZaidman
Copy link

Will it work with 16.04 LTS?

@maixuanhan
Copy link
Author

Will it work with 16.04 LTS?

It should, both support serial console

@rajhlinux
Copy link

rajhlinux commented Jul 17, 2021

Can this work for Ubuntu 21.04 Desktop Release for the Raspberry Pi 4?

@svandive
Copy link

Can this work for Ubuntu 21.04 Desktop Release for the Raspberry Pi 4?

Did you find a way to do this with 21.04??

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