# How do I configure a serial console in Ubuntu 10.04 Server ?



## NewtownGal (Sep 20, 2010)

Hello,

I have a serial console running on several Ubuntu Server 8.04.x machines, and have installed Ubuntu Server 10.04 on a new machine. Since grub has been replaced by grub2, and /boot/grub/menu.lst does not exist anymore, I can't figure how what file to edit, and what the content should be, to make a serial console run on ttyS1 on 10.04 the same way it ran on 8.04.

Here's a snippet of what I used in 8.04:

# Enable console output via the serial port. unit 0 is /dev/ttyS0, unit 1 is /dev/ttyS1...
password --md5 <xyz>
serial --unit=1 --speed=115200 --word=8 --parity=no --stop=1
terminal --timeout=15 serial console

<snip>

title Ubuntu 8.04.1, kernel 2.6.24-19-server (tty0 primary, ttyS1 secondary)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-server root=UUID=f90e62c3-4764-484c-970b-e4367f9ea142 ro quiet splash console=ttyS1,115200n8 console=tty0
initrd /boot/initrd.img-2.6.24-19-server
quiet

title Ubuntu 8.04.1, kernel 2.6.24-19-server (ttyS1 primary, tty0 secondary)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-server root=UUID=f90e62c3-4764-484c-970b-e4367f9ea142 ro quiet splash console=tty0 console=ttyS1,115200n8
initrd /boot/initrd.img-2.6.24-19-server
quiet

How do I write this in 10.04 and what file do I put it in ?

Thank you.

-- NewtownGal


----------



## oracle2b (Dec 29, 2007)

Edit this file:/etc/default/grub

If you change this file, run


> update-grub


 afterwards to update

more info here


----------



## NewtownGal (Sep 20, 2010)

Thank you for your e-mail. However, I don't understand what text I need to put into /etc/default/grub. What text, and where in that file, exactly, do I need to put into that file to have the same functionality that I had before to define primary (keyboard) and secondary (serial) consoles on primary boot, or vice-versa on alternate boot, and to set the parameters for ttyS1 ?

Here are the default contents of /etc/default/grub in 10.04. I don't see anything that looks anything like the text that I had before in 8.04:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

-- NewtownGal


----------

