A script that modify a Linux Installation Disk, in order to boot in serial console.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



I wanted to install Yunohost on a PC-Engines APU2 board. But it was not as simple as i thought. Before that you shall :

  • get serial port cable
  • modify the ISO of the distribution
  • do the installation in a serial port console
  • compromise about the drive you want to use

Anyway, for the second point, i used the following tutorial from PC-Engines forum to make an iso for the pc-engines apu2: Howto install Debian Jessie (8.2) via the serial console using boot media (USB stick)

Instead of taking the Debian CD, i took yunohost-jessie-0127171259-amd64-stable.iso

Next, i made yunohost-mkserialiso.sh to have all the procedure in a script.

Procedure / What does the script ?


You need to : sudo apt install syslinux isolinux xorriso

(Optionnally : sudo apt install minicom socat)

A place to work

Have some directory to work (for example mkdir yunohost-serial;cd yunohost-serial;). In fact, if you get the GIT repository, then you already have a place to work.

Get a Yunohost iso

Go an iso at https://build.yunohost.org/ and or directly get https://build.yunohost.org/yunohost-jessie-0127171259-amd64-stable.iso (URL for 2017, november 7th), if the board have 64bit processor .

Launch the script to make a new iso

First, allow the script to be executed chmod +x ./yunohost-mkserialiso.sh

To build a new iso file with updated SYSLINUX informations to boot in serial console, do : ./yunohost-mkserialiso.sh yunohost-jessie-0127171259-amd64-stable.iso If it didn't fails, you got : yunohost-jessie-0127171259-amd64-stable-serialboot-115200.iso

Use dd to write the iso

You can optionnally use dd command prepared in the script like that :
./yunohost-mkserialiso.sh dd yunohost-jessie-0127171259-amd64-stable-serialboot-115200.iso /dev/sdX where /dev/sdX is your USB key device.

Prepare the installation

Put with the way you can, the iso in your machine. (Virtual ISO / USB port)

With VirtualBox

In the VirtualBox machine configuration (section 'Serial Ports'),you shall define a 'Host Pipe' nammed /tmp/yunohost.

To listen you can use socat command prepared in the script like that :
./yunohost-mkserialiso.sh socat /tmp/yunohost

Note that the listening of port shall start after the virtual machine has started. (Because it doesn't exist before.)

Real board

For boot sequence, use Putty or Minicom to listen the serial port. Notice that 'usbserial' module shall be loaded in 'lsmod' in order to have this device.

You have to choose where to install the new system.

You can use minicom command prepared in the script like that :
./yunohost-mkserialiso.sh minicom /dev/ttyUSB0

Note that the listening of port shall begin before the boot sequence.


Boot your machine... (In my case. Installation on a SDCard fails, so i changed target drive to a Sata Hard Drive)