Tools/Linux/Ubuntu/HeadlessInstall14.04
From UIT
(Difference between revisions)
(Created page with "{{public}} {{TOC right}} Here is how to install Ubuntu 14.04 LTS on a computer without display. It will use the serial port (RS232) for configuring the computer to be installe...") |
(→Configuring grub and the kernel) |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 8: | Line 8: | ||
** A terminal emulator | ** A terminal emulator | ||
** A software for writing USB bootable media [http://unetbootin.sourceforge.net unetbootin] | ** A software for writing USB bootable media [http://unetbootin.sourceforge.net unetbootin] | ||
− | |||
* One target computer | * One target computer | ||
* One RS232 null-modem cable (female-female) | * One RS232 null-modem cable (female-female) | ||
== Tested on == | == Tested on == | ||
− | * PC Engines [ | + | * PC Engines [[Hardware/PCEnginesAPU1D4|apu14d]] |
− | + | == Go for it == | |
− | * Install Ubuntu 14.04 Netinstall on a bootable media (use unetbootin) | + | * Install Ubuntu 14.04 Netinstall (64 bit if possible) on a bootable media (use unetbootin) |
* Edit syslinux.cfg on the bootable media | * Edit syslinux.cfg on the bootable media | ||
<source lang="bash"> | <source lang="bash"> | ||
Line 33: | Line 32: | ||
* Boot the board on the bootable media, follow the steps | * Boot the board on the bootable media, follow the steps | ||
** '''''Warning : ''''' GRUB setup : don't choose the USB media as install destination ! | ** '''''Warning : ''''' GRUB setup : don't choose the USB media as install destination ! | ||
+ | ** '''''Warning : ''''' Don't forget to install <code>openssh-server</code> | ||
+ | |||
+ | == Configuring the console on the serial port == | ||
+ | The console must be configured for the BIOS, the bootloader (grub) and for the login. | ||
+ | |||
+ | === Configuring grub and the kernel === | ||
+ | |||
+ | * Edit the corresponding grub entry options by typing <code> e</code>. Find the line with <code> linux </code> at the beginning and add <code>console=tty0 console=ttyS0,115200n8</code> at the end of this line. Ctrl-X to boot with these options. | ||
+ | * Don't forget to activate <code> root</code> by typing <code> sudo passwd root</code>, then switch user to <code> root</code>. | ||
+ | * Then add the following lines to /etc/default/grub, using <code> sudoedit /etc/default/grub</code> | ||
+ | <source lang="bash"> | ||
+ | # Setup grub output on serial port | ||
+ | GRUB_TERMINAL=serial | ||
+ | GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1" | ||
+ | |||
+ | # Setup the kernel output to the serial port | ||
+ | GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8" | ||
+ | |||
+ | # Boot even after failing a boot | ||
+ | GRUB_RECORDFAIL_TIMEOUT=10 | ||
+ | |||
+ | # To see the boot process, let leave the string empty | ||
+ | GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" | ||
+ | |||
+ | </source> | ||
+ | * reinstall grub using <code>sudo update-grub</code> |
Latest revision as of 14:23, 22 July 2015
|
Here is how to install Ubuntu 14.04 LTS on a computer without display. It will use the serial port (RS232) for configuring the computer to be installed.
Prerequisites
- One host computer
- A serial port (A USB to RS232 convert will work)
- A terminal emulator
- A software for writing USB bootable media unetbootin
- One target computer
- One RS232 null-modem cable (female-female)
Tested on
- PC Engines apu14d
Go for it
- Install Ubuntu 14.04 Netinstall (64 bit if possible) on a bootable media (use unetbootin)
- Edit syslinux.cfg on the bootable media
serial 0 115200 default do_it prompt 0 menu title Headless Ubuntu 14.04 LTS setup timeout 100 label do_it menu label Setup Ubuntu kernel /ubnkern append initrd=/ubninit console=ttyS0,115200
- Connect the serial cable between the two computers
- Boot the board on the bootable media, follow the steps
- Warning : GRUB setup : don't choose the USB media as install destination !
- Warning : Don't forget to install
openssh-server
Configuring the console on the serial port
The console must be configured for the BIOS, the bootloader (grub) and for the login.
Configuring grub and the kernel
- Edit the corresponding grub entry options by typing
e
. Find the line withlinux
at the beginning and addconsole=tty0 console=ttyS0,115200n8
at the end of this line. Ctrl-X to boot with these options. - Don't forget to activate
root
by typingsudo passwd root
, then switch user toroot
. - Then add the following lines to /etc/default/grub, using
sudoedit /etc/default/grub
# Setup grub output on serial port GRUB_TERMINAL=serial GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1" # Setup the kernel output to the serial port GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8" # Boot even after failing a boot GRUB_RECORDFAIL_TIMEOUT=10 # To see the boot process, let leave the string empty GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
- reinstall grub using
sudo update-grub