The FreeBSD Diary |
(TM) | Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link. |
Serial Consoles can be very useful
20 September 2002
|
This article isn't fully complete yet. I wanted to have two serial cables going from one box to the other. But what's here and in Adding a new drive via the serial console using dump/restore should be enough to get you going.
Serial consoles have their uses. Unfortunately, this seems to be a hard learned lesson.
Especially when you have locked yourself out of the box during
a firewall rule change, or a During a recent -STABLE upgrade of two remote boxes, I managed to lock myself out of the box (see my post to the mailing list. Luckily, the solution was rather simple, and I recovered both boxes. The elapsed time between problem discovery and problem resolution was about four days (I found the problem on a Sunday, and fixed it on Thursday morning). If a serial console had been available, the problem would have been fixed within 30 minutes. The fact that I was in Ottawa and the machines were in New Zealand didn't help the situation. Luckily, the staff at CityLink have been very helpful and kind to me over the years... |
The handbook
|
Have you heard about the FreeBSD Handbook?
If not, where have you been? I count over 200 references to the handbook from within my website. If you've never
read this document, you need to. In fact, as I type this, I'm about to start reading the section on serial
communications which deals with I think you should I will not be going into detail about what I did to get the serial console running. I will only be providing points which I had to deal with for my situation. Your needs will vary and that necessitates that you read that document. |
My particular situation
|
In my situation, I have two computers, over which I have exclusive access, and which are the same location. They have two serial cables between them. Each has com1 [also known as sio0] configured to be a serial console and is listening on com2 to the other computer. That is, each computer has a null modem cable from going from its own COM1 to the other computer's COM2. My objective is the ability to access the broken box from the other box. The assumption is that at one box will be running fine whenever the other box breaks. |
What it looks like during the boot
|
The following is what the reboot looked like after my first attempt. I was using
That wasn't good enough. I also wanted the boot sequence. So I changed the options to -Dh .
Then I saw this:
|
Connecting to the serial console
|
On the other box (i.e. the one which is working and does not have the problem), enter this command:
To disconnect the serial session, type |
This article brought to you by the letter A...
|
Coincidentally, my copy of Absolute BSD: The Ultimate Guide to FreeBSD by Michael W. Lucas arrived today. Just in time for me to use Chapter 20 which contains a section on the serial console. |