An RS-232 serial console allows Linux to be controlled from a terminal or modem attached to an asynchronous serial port. The monitor, mouse and keyboard are no longer required for system administration.
- Linux Serial Console Howto
- Linux Serial Console Setup For Windows 10
- Serial Console Linux
- Linux Connect To Serial Console
This instruction show you how to install Ubuntu with serial console without VGA.We have tested the following instructions under UEFI boot and legacy boot mode.
USB boot-disk setup
- Download an ubuntu server amd64 iso file
- Create a USB boot disk using unetbootin
- Modify the following files. If you still use legacy bios boot mode, modify
isolinux/isolinux.cfg
,isolinux/txt.cfg
,syslinux.cfg
. If you use UEFI boot mode, modifyboot/grub/grub.cfg
only.isolinux/isolinux.cfg
isolinux/txt.cfg
syslinux.cfg
boot/grub/grub.cfg
Add serial console options and remove quiet option in the menuentry of 'Insatall Ubuntu Server'
![Serial Serial](/uploads/1/2/6/4/126432984/293184525.png)
Hardware configuration
- Enter BIOS.
- Setup serial port setting to allow console redirection.
- Enter 'Advanced Setup Configurations' Tab
- Enter 'Super IO Configuration' option
- Enter 'Serial Port Console Redirection' option
- Select boot partition
- Enter 'Boot' Tab
SetUEFI USB disk boot
orUSB disk
as first boot priority at Boot Option - Save current BIOS configuration and reboot
Client setup
- Attach serial console from client
Ubuntu Installation
- Proceed normal Ubuntu installation.
- At the phase of GRUB installation, select your correct boot disk for boot loader.An Ubuntu 14.04 installation boot disk may be '/dev/sda' in case that you use USB boot.
- Install SSH daemon and avahi-daemon to configure the system after this installation.
- (Optional) When you see the dialog at 'Finish the installation', check ' and select 'start shell' to check host IP address in a DHCP environment with the following command.
First boot after the installation
- Enter
editing mode
of grub boot option with keye
, when you see grub boot menu on serial console. - Add console options after
ro
in linux boot options - Boot linux with current grub configuration by
Ctrl-x
Post setup
- Grub configuration
- Edit /etc/default/grub as follows:
- Update grub configuration
Tested Ubuntu and Hardware
Ubuntu version
- Ubuntu 14.04 LTS
- Ubuntu 15.10
- Ubuntu 16.04 LTS
- Ubuntu 16.04.1 LTS
Tested hardware
- Lanner FW-7551
- Lanner FW-8896
- Lanner NCA-4010
- Riava Rangeley server
Reference
Active3 months ago
I am trying to connect minicom to a serial device that is connected via a USB-to-serial adapter. This is a PL2303 and from everything I've read no additional drivers are required. The device is recognised as a PL2303.
I'm a beginner at minicom. Is this the correct command to execute? Or do I need to configure something?
Peter Mortensen14.5k1919 gold badges8989 silver badges118118 bronze badges
codingJoecodingJoe1,64688 gold badges3737 silver badges5656 bronze badges
10 Answers
First check with
dmesg | grep tty
if system recognize your adapter.Then try to run minicom with sudo minicom -s
, go to 'Serial port setup' and change the first line to /dev/ttyUSB0
. Don't forget to save config as default with 'Save setup as dfl'. It works for me on Ubuntu 11.04 on VirtualBox.
MatejMatej1,14411 gold badge1111 silver badges2424 bronze badges
You will need to set the permissions every time you plug the converter in.I use PuTTY to connect. In order to do so, I have created a little Bash script to sort out the permissions and launch PuTTY:
P.S. I would never recommend that permissions are set to 777.
Peter Mortensen14.5k1919 gold badges8989 silver badges118118 bronze badges
McPartyMcParty
The serial port communication programs
moserial
or gtkterm
provide an easy way to check connectivity and modify /dev/ttyUSB0
(or /dev/ttyUSB1
!) settings. Even though there maybe only a single USB to RS232 adapter, the n
designation /dev/ttyUSBn
can and does change periodically! Both moserial
and gtkterm
will show what port designation is relevant in their respective pull down menus when selecting an appropriate port
to use.Check out help.ubuntu.com/community/Minicom for details on
minicom
.EkimEkim
I had fix this with
adduser *username* dialout
. I never had this error again, even though previously the only way to get it to work was to reboot the PC or unplug and replug the usb to serial adapter.Linux Serial Console Howto
RomanRoman
Long time reader, first time helper ;)
I'm going through the same
hellish
experience here with a Prolific USB <> Serial adapter and so far Linux is the easiest to get it to work.On CentOS, I didn't need to install any drivers etc.. That said,
dmesg | grep -i tty
ordmesg | grep -i usb
showed me /dev/ttyUSB0.screen ttyUSB0 9600
didn't do the trick for me like it did in OSX- minicom is new to me but it was complaining about lack of /dev/modem
However, this helped: https://www.centos.org/forums/viewtopic.php?t=21271
So install minicom (
yum install minicom
) then enter its settings (minicom -s
). Then select
Serial Port Setup
and change the Serial Device (Option A) to /dev/ttyUSB0, or whatever your device file is as it slightly differs per distro. Then change the Bps (Option E) to 9600 and the rest should be default (8N1 Y N)
Save as default, then simply
minicom
and Bob's your uncle.Linux Serial Console Setup For Windows 10
HTH.
Sam GreadlySam Greadly
I get get the same minicom error, 'cannot open /dev/ttyUSB0: No such file or directory'
Three notes:
- I get the error when the device attached to the serial port end of my Prolific Technology PL2303 USB/Serial adapter is turned off. After turning on the device (an embedded controller running Linux) minicom connected fine.
- I have to run as super user (i.e.
sudo minicom
) - Sometimes I have to unplug and plug back in the USB-to-serial adapter to get minicom to connect to it.
I am running Ubuntu 10.04 LTS (Lucid Lynx) under VMware (running on Windows 7). In this situation, make sure the device is attached to VM operating system by right clicking on the USB/Serial USB icon in the lower right of the VMware window and select Connect (Disconnect from Host).
Remember to press Ctrl + A to get minicom's prompt, and type X to exit the program. Just exiting the terminal session running minicom will leave the process running.
Peter MortensenSerial Console Linux
14.5k1919 gold badges8989 silver badges118118 bronze badges
user1271729
I had the exact same problem, and it was fixed by doing a
Peter Mortensenchmod 777 /dev/ttyUSB0
. I never had this error again, even though previously the only way to get it to work was to reboot the VM or unplug and replug the USB-to-serial adapter. I am running Ubuntu 10.04 (Lucid Lynx) VM on OS X.14.5k1919 gold badges8989 silver badges118118 bronze badges
Joshua EtienneJoshua Etienne
I suggest that newbies connect a PL2303 to Ubuntu, chmod 777 /dev/ttyUSB0 (file-permissions) and connect to a CuteCom serial terminal. The CuteCom UI is simple intuitive. If the PL2303 is continuously broadcasting data, then Cutecom will display data in hex format
gatorbackgatorback23911 gold badge44 silver badges2424 bronze badges
I just got my GUC232A cable with a molded-in PL2302 converter chip.
In addition to adding myself and br to group
dialout
, I found this helpful tip in the README.Debian file in /usr/share/doc/bottlerocket
:This package uses debconf to configure the /dev/firecracker symlink, should you need to change the symlink in the future run this command:
dpkg-reconfigure -pmedium bottlerocket
That will then prompt you for your new serial port and modify the symlink. This is required for proper use of bottlerocket.
Linux Connect To Serial Console
I did that and voila! bottlerocket is able to communicate with my X-10devices.
Peter Mortensen14.5k1919 gold badges8989 silver badges118118 bronze badges
DexterIsMyHeroDexterIsMyHero
Putty on ubuntuThere is no need to install the driver for PL2303So only type the command to enable the puttySudo chmod 666 /dev/ttyUSB0DoneOpen the putty.
Nikhil ParasharNikhil Parashar