Tag Archives: Ubuntu

How to connect to a Cisco device using the serial port on Linux

Using the serial port is still necessary to manage some devices, when it is reseted to factory defaults. It could be also a security choice…

Nowadays many computers – and especially laptops don’t have anymore a built-in serial port. Not a problem, there are many cheap serial-usb converters like this.

As an alternative to the Hyperterminal of Microsoft, there is Minicom on Linux.

It is very easy to install and configure :

$ apt-get install minicom lrzsz

Before going further, you need to know what is the corresponding Linux device for the port where you plugged the router. As I used an usb adapter, my device was /dev/ttyUSB0. Otherwise, it will probably be one of the /dev/ttyS* devices.
Checking the dmesg output while you plug the device will give you the right device to use.

Now start minicom this way to edit the configuration :

$ minicom -s

In the menu, select Serial Port Configuration and :

  • press A and update the serial port path with the one you found in dmesg
  • press E and then C to change the speed to 9600
  • press F to switch off the hardware flow control
  • select Save the configuration as… and name it as, let’s say, “cisco”

You should be able to connect right now. Next time, just start Minicom like this :

$ minicom cisco

That’s it !

Launchpad.net bug report #154274 : Website does not reference Debian visibly

This bug report, created by a Debian developper, reproaches that the Ubuntu website is not refering enough to Debian.

I am both using Debian and Ubuntu and loves each other.

However, on this point, I am defending the Debian side.

Ubuntu should definitely refers more to the Debian community on their website and, in general, be more cooperative – though on the latter, according to some recent news, it is improving.

Ubuntu is doing a great work, but they should not forget that most of its packages come from Debian, and not being graceful for that is, at least, a serious lack of respect.

pm-utils instead of acpi-support ?

I had several issues with gnome-power-manager and acpi-support.

Both are base on the acpid daemon for power management. Acpi-support is a convenient package of scripts to configure the power management.

It is bundled in many distributions, including Ubuntu and Debian.

The problem is that it does not cooperate very well with gnome-power-manager. As a result, I had many small but anoying issues.

The most anoying was, that after a suspend / hibernation, gnome-power-manager was not able anymore to turn off the screen for power saving. Workaround : kill it and start it again. Not good !

Pretty annoying, especially since I stopped using a screen saver with my LCD screens…

So I tried a new alternative to acpi-support : pm-utils. This is another collection of scripts, attached to the Freedesktop.org project, as gnome-power-manager : the integration with Gnome should now be much better, shouldn’t it ?

So :

$ aptitude remove acpi-support
$ aptitude install pm-utils

Now we copy the default configuration file to the /etc directory. All files will be parsed, but the one in /etc has the priority if you change a value :

$ cp /usr/lib/pm-utils/defaults /etc/pm/config.d/

With my laptop, I had to edit a line to activate suspend-to-ram, so that it looks like :

S2RAM_OPTS="-f -a 3"

And that’s it ! I did not go deeper, but there are already much fewer issues with gnome-power-manager (though it still need some work).

Easy search on Planet Debian and Planet Ubuntu

Russel Coker, a famous Debian developper, took a really interesting initiative.

He used the Google Custom search to create 2 Google search engines :

  • one to search on Planet Debian
  • one to search on Planet Ubuntu

These blogs beeing a big source of information, these engines will be extremely convenient.

The links are available on the author’s page.

Note that you can easely access them through a dedicated link (homepage) , and you can also, from the Google page, get a link to embed them on your own homepage… what I will do soon.

Thanks to Russel Coker !

How to dupplicate your packages selection

You may want to save your selection of packages, in order to reinstall all your softs later without having to look for and manually install them one after another. It is a convenient way to move a server to a new machine.

On Debian / Ubuntu, this is quite easy.

A while ago the solution used to be :

$ dpkg --get-selections > file.txt

and then, an a freshed installed machine :

$ dpkg --set-selections < file.txt
$ apt-get upgrade

But, for some reason I don’t know and that I would be happy to learn, it seems that this does not work anymore.

Below is the way I got it to work, though it is a little bit more complicated.

So, let’s save the selection of packages into a clean list file, though we are only interested in the packages names :

$ COLUMNS=200 dpkg -l | awk '/^[hi]i/{print $2}' | xargs > liste-apt.txt

and to install on the new machine :

$ cat liste-apt.txt | xargs apt-get install -y

So far, it worked very well on my servers ! APT is a great tool.