Share the post "Ubuntu Server 10.10 headless installation via serial console"
Some time ago I have successfully installed CentOS 5.5 on my headless server (you can read the guide in older posts).
Now I would like to upgrade the box to Ubuntu distro. After several tests and several cds toasted I can release this practical guide to have a bootable CD configured to use serial console as input/output.
My setup is based on Ubuntu Server 10.10 32 bit, 9600 8n1 serial console and a Samsung USB CD/DVD writer.
This is the step-by-step procedure to have the bootable CD:
- Download Ubuntu Server 10.10 ISO image from http://www.ubuntu.com
- Create a temp work dir:
mkdir /tmp/ubuntucd - Mount ISO image on previous directory:
sudo mount -o loop -t iso9660 <isoimage.iso> /tmp/ubuntucd - Create another temp dir
mkdir /tmp/serialinstaller - Copy all files from mounted ISO to your new dir
cp -Rv /tmp/ubuntucd /tmp/serialinstaller - Change file permissions in serialinstaller directory
chmod -R +w isoinstaller/ - Edit isolinux/isolinux.cfg under serialinstaller. Your new file will be:
serial 0 9600 0x003
# D-I config version 2.0
include menu.cfg
default vesamenu.c32
prompt 0
timeout 0 - Save the file
- Edit isolinux/txt.cfg (or text.cfg. depends by your OS version) under serialinstaller. Your new file will be:
default install
label install
menu label ^Install Ubuntu Server
kernel /install/vmlinuz
append file=/cdrom/preseed/ubuntu-server.seed vga=788 initrd=/install/initrd.gz quiet console=ttyS0,9600n8 —
label cloud
menu label Install Ubuntu ^Enterprise Cloud
kernel /install/vmlinuz
append file=/cdrom/preseed/cloud.seed vga=788 initrd=/install/initrd.gz quiet console=ttyS0,9600n8 —
label check
menu label ^Check disc for defects
kernel /install/vmlinuz
append MENU=/bin/cdrom-checker-menu vga=788 initrd=/install/initrd.gz quiet console=ttyS0,9600n8 —
label memtest
menu label Test ^memory
kernel /install/mt86plus
label hd
menu label ^Boot from first hard disk
localboot 0x80 - Save the file
- Move one level top in your dir
cd /tmp - Rebuild your cooked setup in a brand new ISO:
sudo sudo mkisofs -r -V “Ubuntu Serial Boot” -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ubuntu1010serial.iso serialinstaller - You can now burn your new ISO using your CD Burner or from command line:
cdrecord dev=/dev/cdrom ubuntu1010serial.iso - Connect your serial cable to headless server and set your terminal on 9600,8,N,1
- Boot your headless server and follow instruction
IMPORTANT: in order to avoid problems during setup process(EDD: Error reading sector XXX or Unable to mount CD-ROM) please burn your ISO at 2x and use a high quality USB CD reader. During my tests I have encountered lots of failure and I have burned different CDs, using different modes (DAO,TAO,etc…) and different speed. The problem was solved changing my SAMSUNG USB CD/DVD recorder with a PLEXTOR USB CD/DVD.

How to do serial install with a 11.04 server via USB bootable media made by pendrivelinux? Thank you!!
You can follow pendrivelinux procedure to install a standard UBUNTU distro and then follow this guide starting from point 6 to point 10.
I never try to do this ma I hope to test in the next days….could be useful to have a serial bootable pen drive 😉
Thanx a lot.
Andrea
Great! It works.
But there’s one error in your description: At point 12 ist must be “serialinstaller” instead of “ubuntuinstaller”
And in my Ubuntu 10.04 LTS, the File is called “text.cfg” instead of “txt.cfg” (Point 9), but this might be different because of the Versions….
Thanks anyway, it helped me…
Patrick
Hi Patrick,
thanx for your post. I have changed the post with your suggestions.
Have a nice day!
Andrea
It’s an excellent post, beside that, I would like to know why you put the 0x003 in the entry serial 0 9600 0×003. Thank you very much.
Hi Alfonoso,
0x003 is used to force flowcontrol parameter. In my example it is 0x001 (Assert DTR) + 0x002 (Assert RTS for a NULL modem cable).
I used it to fix comms problem on my serial port. You can try different values on your setup.
Please refer to isolinux.cfg docs in order to have a complete codes bitmap.
Andrea
Hi Andrea, thank you very much for the fast answer, now I understood how the flow control of the serial works. I tried different combinations, but always get a big, white rectangle in the space of a character, and it didn’t accept any key. I’m trying to install Ubuntu Server 12.04 LTS in a Cisco CE507 Content accelerator. Regards.
Alfonso
Hi Andrea! Thank you for helpfully guide.
I have a task to install a ubuntu to the pcm-3343 board without VGA. I am novice in linux. I have downloaded the ubuntu-12.04.3-server-i386.iso from http://www.ubuntu.com, and have installed it in oracle virtual box.
Then i have put the same ISO image (ubuntu-12.04.3-server-i386.iso) to the /home/phdkot folder.
I have created a temp work dir: mkdir /tmp/ubuntucd
And have tryed to mount ISO image: sudo mount -o loopback -t iso9660 ubuntu-12.04.3-server-i386.iso /tmp/ubuntucd
My linux gives me such error: mount: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error In some cases useful info is found in syslog – try dmesg | tail or so
Where was my mistake?
Hi Andrea!
Previous problem i have solved using the command:
sudo mount -o loop -t iso9660 ubuntu-12.04.3-server-i386.iso /tmp/ubuntucd
instead
sudo mount -o loopback -t iso9660 ubuntu-12.04.3-server-i386.iso /tmp/ubuntucd
Is it right way?
I have the second question:
After the command
sudo mkisofs -r -V “Ubuntu Serial Boot” -cache-inodes -K -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ubuntu1010serial.iso serialinstaller
I have received the error: genisoimage: unrecognized option ‘-K’
I have tried to solve it by remove -K option.
Is it right way?
Hi!
Thanx for your comment and apologize for the late answer 🙁
The mount option “-o loop” is correct and you can use it without problem: I have fixed it in the article.
The option -K is a typo, you have to use -J (Generate Joliet directory records in addition to regular iso9660 file names. This preserves the case (upper/lower) of file and directory names).
Andrea
U 13.04 fails to install from bootable USB stick when the USB is made from copying the ISO DVD to it .
The Installer demands a CD be inserted .
Is there a cure ?