Archive

Archive for the ‘Ubuntu’ Category

Renaming a host (UNIX, OpenVMS)

5 September 2009 ddouthitt Leave a comment

Renaming a host is not, in general, a pleasant experience. The general requirement is that you must find everywhere that your hostname is specified and change it.

In OpenVMS, this can be an extensive process, and even require relicensing if you have licenses that depend on your hostname. It can also require rebooting of an entire VMS cluster if you miss changing a parameter. The full details are in the VMS FAQ such as this one (dated from 2001) from faqs.org or this one from HP (undated). Hoffman Labs has a copy from September 2006; there is information on changing a node name in section 5.7.

Not that in changing the OpenVMS hostname in a cluster, you must change the SCSNODE parameter (which changes the cluster node’s nodename). If you change the SCSNODE parameter, you must change the SCSSYSTEMID as well or the entire cluster will refuse to function until it is reconfigured. The cluster tracks the pairing between these two parameters, and if the pair changes, then the cluster stops working normally.

For UNIX in general, one way to do it is to go to the /etc directory as root and run a search:

$ su -
Password:
# cd /etc
# find . -type f -print | xargs grep -i myhost

After running this, change all of the instances of myhost that is found.

This is the way to change hostnames in Solaris, including Solaris 9 and Solaris 10. Debian and derivatives (including Ubuntu and Linux Mint) and HP-UX make it simpler.

In Debian, there is a file called /etc/hostname. This will contain the current setting of the hostname. Change this to your desired new hostname, then run the shell script /etc/init.d/hostname.sh.

In HP-UX, change to root and run the program set_parms with the hostname option:

# set_parms hostname

For all of these possibilities, the best thing to do is to reboot afterwards: this will test the new setup as well as change any in-memory hostname settings.

Changing a hostname is a drastic measure, and will include much in the way of system modification and updates. Changing the actual hostname is very likely only the beginning; there may be clients that are set up to contact the host, and any services that the server provided (e.g., NTP server, FTP server, web server, NIS server, etc.) will require reconfiguration on the clients to use the new hostname.

In summary, the very best thing to do is to get the name right in the first place.

Powered by ScribeFire.

UNIX and OpenVMS Online Resources

2 September 2009 ddouthitt Leave a comment

It is possible to get free online access to UNIX or to OpenVMS; these can be useful in building up your experience on a platform when starting from scratch – or when a review is required.

One of the oldest public access systems in the country is the Super Dimension Fortress (or SDF as it is usually called). SDF offers free accounts, but does ask for US$1 to gain standard access. This isn’t because access is expensive, but because too many people have used the facilities for nefarious purposes (the process suggests that the new user is not a person who will strike and leave).

SDF runs NetBSD on DEC Alphas; this was driven mainly by security and stability. Previously, Stephen Jones, the proprietor, ran SDF using Linux on Intel for several years (which he describes as “the dark years”). BSDTalk had an interview with him back in 2006.

You could also try PolarHome – this shell provider provides access to hosts running Linux (Red Hat, Debian, SUSE, Ubuntu, or Mandriva), OpenVMS (Alpha or VAX), OpenBSD, FreeBSD, NetBSD, HPUX, IRIX, QNX, Solaris, Ultrix, AIX, Tru64, and OpenStep. Unfortunately it requires payment for shell accounts – again because of abuse. The payment is 10 units of your local currency or US$2, whichever is more – and this is per host as well. No other site provides this diverse of a selection.

For truly free UNIX shell accounts, one can try Grex, which is a more professionally-run system (Polarhome and SDF are sole proprietorships). Grex offers totally free shell accounts, but also has memberships (for people to help support the site). It is possible that Grex has the most users as well. Like the others, paid membership does have its privileges – but unlike the others, membership is mainly to provide support for Grex, rather as a security feature.

For OpenVMS, there is a very unique online shell provider: Deathrow Cluster. This is a cluster of three machines running OpenVMS 7.3 – one VAX, one Alpha, and one emulated VAX (SIMH) on a dual Xeon machine. This last is a perfect example of what can be done with an emulator, especially with SIMH which can emulate all manner of old Digital and IBM hardware. However, SIMH does not emulate the Digital Alpha, unfortunately. Like Grex, Deathrow provides completely free shell accounts; like SDF and Polarhome, it is (or appears to be) mainly one person’s purpose to keep it running with a lot of volunteer help.

Any of these will be good sources to keep your shell skills sharp – and in some cases, programming as well. They’re also good people to support; why not offer them some donations if you can?

Keyspan Drivers and Linux (Debian/Ubuntu/Mint)

30 August 2009 ddouthitt Leave a comment

The drivers for the Keyspan USB-Serial Adapter are in the mainline kernel (as of 2.6.x), as Keyspan notes. However, the drivers are (according to Keyspan) not in the Debian or Ubuntu kernels.

This is only partly true: Debian refused to use the Keyspan drivers due to their license; the fact that Keyspan drivers were missing from the latest Ubuntu kernels is a bug (#334285).

Since Linux Mint is based on Ubuntu, one can only hope that the kernel bug is fixed soon; I’d wanted to use my Keyspan driver with my laptop running Linux Mint 7.

NO PUBKEY errors from APT (Ubuntu Linux)

25 August 2009 ddouthitt Leave a comment

When you are using APT (the package manager for Debian and Ubuntu Linux), you might receive some NO PUB_KEY errors – warnings that no public key could be found for one software repository or another. You can keep on going without fixing these warnings, but in the interest of security you should fix the problem. It is rather simple, after all.

Firstly, if you are running Ubuntu, you can use the Ubuntu key server to help you fix this problem. The server uses the SKS Key Server software to provide this valuable service.

The method is to first import the key into GPG (GNU Privacy Guard) via the Ubuntu key server (or indeed, any other), and then import it into APT via the apt-key command:

gpg --keyserver subkeys.pgp.net --recv 0123456789ABCDEF
gpg --export --armor 89ABCDEF | sudo apt-key add -

In place of 0123456789ABCDEF put the tag given in the NO PUB KEY message, and then insert the code given in the response from gpg in place of 89ABCDEF for the export.

However: apt-key has an apparently little known command option that will pass options directly to gpg. Using this option (“adv”), the update of the key can be done in one step instead of two:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0123456789ABCDEF

If you already have the appropriate gpg key – or can get it from an appropriate web site or FTP site – you can add it directly to your APT key ring using apt-key. For example, here is an example adapted from Google’s Linux Repository Configuration page:

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

One could just as easily use any other method to get the file that supported the given URL. Remember that you must add the key as root; it won’t work otherwise. If you have the file locally, this is sufficient:

sudo apt-get add somekeyfile.gpg

Hope this helps you.

Disabling compcache in Ubuntu Jaunty (and Related Swap Errors)

19 July 2009 ddouthitt Leave a comment

If you have installed Ubuntu recently, you may have compcache enabled. This is a memory-based swap cache and its presence is unnecessary and unexpected in a permanent installation (it was designed for LiveCD operations). There is a bug report about compcache being enabled, along with directions on how to remove it.

This bug can also be seen if you are seeing errors like these:

Mar 6 17:27:29 server kernel: [14438.135859] compcache: Error allocating memory for compressed page: 60594, size=4096
Mar 6 17:27:29 server kernel: [14438.135871] Write-error on swap-device (254:0:484752)
Mar 6 17:27:29 server kernel: [14438.136813] allocation failed: out of vmalloc space - use vmalloc= to increase size.
Mar 6 17:27:29 server kernel: [14438.136824] compcache: Error allocating memory for compressed page: 60595, size=2093
Mar 6 17:27:29 server kernel: [14438.136835] Write-error on swap-device (254:0:484760)
Mar 6 17:27:29 server kernel: [14438.137088] allocation failed: out of vmalloc space - use vmalloc= to increase size.
Mar 6 17:27:29 server kernel: [14438.137098] compcache: Error allocating memory for compressed page: 60596, size=4079
Mar 6 17:27:29 server kernel: [14438.137108] Write-error on swap-device (254:0:484768)

You can also see it when you print swap information with the command swapon -s – if compcache is enabled, one of the swap entries will be “ramzswap”.

To disable compcache completely, do this:

rm -f /usr/share/initramfs-tools/conf.d/compcache && update-initramfs -u

The file compcache contains this line – which is what enables (and sizes) compcache:

COMPCACHE_SIZE="25%"

This was summarized nicely in this email on the ubuntu-users mailing list in February of this year.

Installing SmartEiffel in Ubuntu Jaunty

17 July 2009 ddouthitt Leave a comment

Turns out that SmartEiffel has not been a part of the Ubuntu repositories since Dapper, per this bug report. The version of SmartEiffel in CVS is 2.4, the most current is 2.3.

However, to this day the problem remains: SmartEiffel will not compile under Ubuntu direct from source. The Ubuntu bug report states FTBFS (which turns out to mean Fails To Build From Source – clear, eh?).

The fix is to remove optimization from the configuration – switching the flags from -O2 to -O1. Follow these steps to get SmartEiffel working:

  • Unpack the archive and change into the directory it creates.
  • Add ${PWD}/bin to the current path: export PATH=${PWD}/bin:$PATH
  • Run make interactive.
  • Press the Enter key to get the menu.
  • Select item 2 (Choose the C compilers and options for each C mode).
  • Choose boost (the normal default)
  • Change the C compiler options and the C++ compiler options from using -O2 to using -O1
  • Return to the previous menu.
  • Return to the previous menu (again).
  • Choose Write the configuration file to disk.
  • Now choose Install SmartEiffel.

Making these changes should result in a successful build of SmartEiffel. However, despite the success, this does not in actuality install SmartEiffel into /usr/local or other recommended locations; it remains in the current directory.

To actually install SmartEiffel into the system, you’ll have to copy items over yourself. I’ll have more when I figure this out; SmartEiffel is perfectly usable after configuring your path and building from source as described here. Java compilation (that is, compiling Eiffel code to Java JVM code) still appears to have problems, though.

Getting the PalmPilot to work in Ubuntu Jaunty

16 July 2009 ddouthitt Leave a comment

I was surprised when I found that the Gnome Pilot Applet didn’t work – it didn’t appear at all. In the past I just brushed it off: but then, I decided it was time to get it fixed.

Strangely enough, there is a bug report about this and it is fixed in Karmic Koala (the upcoming version of Ubuntu) but not in Jaunty. This could be fixed in Jaunty but it isn’t. Can’t say why – makes no sense to me. The fix is to use an updated version of gnome-pilot which includes a patch to fix the bug – but this updated package is only available for Karmic.

However, loading the updated version of the gnome-pilot package (using the i386 version) was simple and there were no problems. I then restarted the gnome-pilot daemons for good measure:

sudo pkill gpilot

Probably overkill – but it doesn’t hurt. Then add the Pilot Applet to the panel and you should see the icon – and your gpilotd daemon will start in the background.

Next, click on the applet itself – and wait. The gnome-pilot Settings window should appear shortly. Make sure that the ID is not zero. This causes a bug (which is described in another bug report) where installs do not work. If the ID is zero, then click on Edit and change the PDA ID to another number (I used 5). Then click on Send to PDA and follow the instructions.

If you change the ID, you will have to go back into the Conduits tab (again in gnome-pilot Settings) and enable all of the conduits you want to use.

Once all of this is done, you should find that your PalmPilot is working up to par. Too bad that a distribution such as Ubuntu or Mint (both of which are billed as Linux for the normal person’s desktop) don’t properly support a PalmPilot “out of the box”.

A Little Known Utility: Regex-Markup

14 July 2009 ddouthitt Leave a comment

This little utility is a wonder. It lets you highlight items in text files or other text streams, using regular expressions and multiple configurations. I’ve seen other highlighting utilities, but none offer the flexibility of the remark program (short for regex-markup).

Unfortunately, it hasn’t been updated in two years – but it doesn’t really need it. The current Debian package works fine on Ubuntu. The utility was written by Oskar Liljeblad.

For example, the Debian package comes preconfigured for text output from diff, make, ping, traceroute, and syslog. The regular expressions are the same as used in regex(7) and the syntax for creating the rules files is very flexible and is explained well in the man pages for remark(1).

When looking at highlighted output such as remark puts out (as well as others) you’ll want to utilize the -R (raw) option to less. I use the command


less -RSXmg

With a preconfigured ruleset, you can change the foreground and background colors of anything you can match with a regular expression.

This becomes very useful when you want to scan a lot of text for certain output on a regular basis: things that are not all that important – but that you don’t necessarily want to leave out – can be left in with an appropriate color scheme so that the more important stuff isn’t missed.

Unfortunately, this tool is almost unheard of and is always a pain for me to relocate – but now I won’t lose it again! Give it a try and see if you like it. Kudos to Oskar for a beautiful package!

About a Ubuntu Add-on CD

4 June 2009 ddouthitt 6 comments

Where I live, there is only three choices for Internet: dial-up, cellular 3G, and satellite. There is no cable – no DSL – no BBoP – nothing that has any high-speed capabilities. Cellular (new in the area!) works but there is a 5Gb limit for the month – otherwise they will assume that you are performing tasks against your usage contract and reserve the right to cancel without notice (!).

There has been lots of talk about creating an Ubuntu Add-On CD, but nothing official and nothing lasting. There is an Add On CD Creation project as well as a (dated) Unofficial Ubuntu 5.10 Add On CD: neither of these projects seem to have continued. Over at Bounty Source, there is another project called the Ubuntu Plus AddOnCD; likewise, this has not kept pace. There used to be something at Ubuntu Guide but the link is no longer valid to that specific page, although the site seems active and current.

There’s also a DVD built by one or more Indonesian containing Ubuntu repositories; if I could read Indonesian, I could read the websiteand tell you more about it. There do appear to be multiple distributors across Indonesia.

There are two sources that seem to have kept pace, although neither supports Ubuntu Jaunty Jackalope or its descendents. One is an Italian who creates an add-on CD and posts it; it is the UbuntuPiù CD. Another is called the Ubuntu ADDONCD. Hopefully one or both of these sites will update with Jaunty Jackalope soon.

The main method of creating an Ubuntu add-on CD is to create an Ubuntu (Debian) repository then burn it onto CDROM. This is fine as far as it goes – however, the current Ubuntu repositories are 70+ gigabytes in size and mirroring the entire repository at this point is a big deal – especially when terabyte drives are not yet common.

The Debian APT Repository How To is an expansive document describing how to make your own repository. There is also an excellent article on creating an Ubuntu repository with apt-mirror.

Also, some projects assume that you have downloaded all of your added packages without ever having run “apt-get clean” – despite the fact that the apt-get man page recommends that you do so and says that any program that uses dselect will call apt-get clean as part of its normal processing. Using this download cache seems to be very short-sighted, but it is done by tools such as aptoncd which are otherwise very promising.

The apt-move How To, while otherwise quite useful, also makes this assumption. The assumption that “apt-get clean” will not be run is not a valid one!

Perhaps the only way to resolve the matter is to force a download of the desired packages – but currently there doesn’t seem to be any way to download a package and all dependencies not found in the Ubuntu install CDROM – in fact, there’s no way to download all dependencies at all. It should be possible to create a script to do it some how.

To download a specific package – but without its dependencies – is to do thus:

apt-get install --reinstall -dy package

This will put the package into the apt cache for use by other programs that seem to think the cache is never cleaned out.

To get a list of dependencies, you have to use apt-cache and massage the output to get a list:

apt-cache depends bzflag | sed -n '/^[^ ]/d; /]*>/d; s/^.*: //; s/^ *//; p;'

Once you have this list of dependencies you might be able to download the files with something like:

apt-get install --reinstall -dy $(cat resultsfile)

…if you’ve saved it to a file called resultsfile. One problem is that a dependency could be a virtual package – and since the program is working from a cache of repositories, it reports all packages that provide the virtual package, not those that are installed.

One more thing – if you are trying to build a repository and are building from the system’s APT cache – then you can only build a repository relating to the current environment. Thus, if running Ubuntu Hardy Heron, you can’t use the cache to create a repository for Ubuntu Jaunty Jackalope.

I can’t let this end without mentioning RPM. Debian’s biggest weakness is, in my opinion, dpkg: RPM when combined with APT-RPM is so much more powerful than the dpkg and APT environment. RPM is very clean and is even portable: administrators running RPM on Solaris and other machines is not entirely unusual: running dpkg on Solaris would be news-making. Too bad there isn’t a version of Ubuntu that uses RPM (is that a hint?).

Categories: Debian, RPM, Ubuntu Tags: , ,

Linux Mint 7 Released!

Linux Mint 7 was released yesterday; it is available on CDROM. I’ve installed it onto an hp nc4010 laptop with no problems whatsoever.

So far, Linux Mint is absolutely beautiful. This is a nice contrast to Ubuntu, on which Linux Mint is based – the color scheme of Ubuntu (which seems to be firmly and stubbornly entrenched) is a dark, oppressive, and dirty brown; whereas Linux Mint uses a vibrant and uplifting green. It is a small thing, but a very common (American?) complaint against Ubuntu – and colors do affect mood.

Linux Mint also focused strongly on ease of use – including making sure that everything works out of the box. Listen to anything – view anything – it all works, and straight out of the box.

Ubuntu tries to make it easy to upgrade to view and listen to what you like: Linux Mint makes it unnecessary to upgrade or install anything.

Like Debian and Ubuntu, on which Linux Mint is based, the number of available applications is insane – no other distribution has as many packages available. In particular, Debian has the best support for Lisp I’ve ever seen.

Powered by ScribeFire.