This site is now 100% read-only, and retired.

Connecting to Sun machines over a serial cable

Posted by Steve on Mon 22 Nov 2004 at 03:39

Tags: none.

If you want to install Debian upon a Sun machine, such as a Netra, you'll need to get familiar with accessing a system over a serial console. It's also something you'll need to do if you wish to interface with a Cisco router, or other piece of hardware that doesn't have networking enabled properly yet.

Half the job of accessing a system over a remote serial console is getting hold of the correct cable.

A Sun Netra will require the use of a cable with a serial connection at one side, and a RJ-45 at the other end. This cable is identical to those used for Cisco console connections, and is described in this Sun cabling guide.

Connect the cable to the machine you wish to access, and the Debian host machine - note that the equipment should be powered down.

Now you're ready to start.

On the host machine you'll need to install minicom, this is the program we use to connect over the cable.

As root run:

minicom -s

(The '-s' flag tells minicom to start in setup mode, and only needs to be used the first time you connect to configure the serial setup, etc).

This should present you with a small menu, which you can navigate with the up and down arrows and the return key.

Move down to the "Serial port setup", and press return. The menu that you'll see will have several options.

The obvious one to change is the name of the serial device if you're not using /dev/ttyS0. To change this press the letter to the left of the setting - in our case A.

Once this is done you can press 'E' to change the speed setting. A slow default of 9600 should be sufficient.

Press return when done, and then return to return to the main menu.

One other thing you'll need to change is the modem setup.

MOve to the modem setting screen and type "A" to change the modem init string - change it to read:

A - Init string ......... ~^M~        

Press return to move back to the main menu and select Save setup as dfl. This will save the settings you've configured as the system-wide default ones, so that in future you can just run minicom with no arguments.

Then choose "Exit". This will attempt to connect you to the device, which you should now power on.

All being well you should see the device status messages and be able to control it.

To quit minicom use Ctrl + A, then q.

If you wish to make tweaks to your settings use Ctrl + A, then o.

If you're interested in the Sun Netra specifically then see this guide to installing Debian upon it.