Skip navigation

Tag Archives: Ubuntu

A quick post today, but no less informative, I hope.

We just installed a brand new Cisco wireless controller, and that means converting our older, autonomous access points to lightweight mode so they can interface with the controller.  Cisco would like you to use their (Windows-based) tool, which I tried initially.  While it may be easier and faster in an ideal situation, those are so rare.  I looked around but couldn’t find a good text-based tutorial for doing the upgrade, but I did find some youtube videos, one of which brought me my solution.

Before you get started, you’ll want to collect a few things.  First, you’ll need a recovery image specific to your access point.  You can download the image you need from Cisco–you’ll want the recovery image, which will crucially contain the string “rcv” in its file name.  Download the image and move it to your tftp server root (if you’re using Ubuntu, there’s a good guide for setting up a tftp server here if you don’t already have one).  Don’t worry about extracting the tarball–the access point will handle that for you.

If you’re not upgrading your access points in place, you may also want a serial connection to the AP so you can watch its progress the whole time, but this is optional.  I use minicom for my serial terminal on Ubuntu, though you may already have a package you prefer.

Now that you’ve got everything in place, telnet (or ssh) into your access point (and enter enable mode, but not configure mode) and run the following:

archive download-sw /reload /overwrite tftp://(ip address of your tftp server)/(name of recovery image tarball)

After the access point finishes downloading the image, it should restart automatically, but if there are any unsaved changes lingering on the system, use reload to restart the switch.  The switch will reboot, and if you’re watching on your serial console, you should see the access point going through the process of loading the recovery image, contacting the controller, and then downloading a full image before finally restarting again and coming under full control.

Advertisements

In the summer months this year (and hopefully more summers in the future), my office will be getting some student interns who will work for us for half of the day and then learn things from us for the second half.  One of the first lessons I’m planning is a crash course in Linux.  There are, of course, about a million different distros available, from mainstream releases like Ubuntu/Debian and Fedora to more–specialized releases, such as RebeccaBlackOS.  For my purposes, though, I’m just going to focus on Ubuntu and two variants (the MATE and Cinnamon versions of Linux Mint) because, well, I’m most familiar with Ubuntu and some of its quirks, and while installing a new OS will be part of the first project, I don’t want to spend all of my first class just working through stupid install issues that I can’t help solve quickly.

But I’m offering several different variants because most of what I hope to teach will be happening on the command-line, and it won’t hurt these kids to get to make a few choices about their desktop environment.  I like Unity quite a bit at this point (though I did initially downgrade from 10.10 netbook to 10.04 because GNOME 2 was a lot more stable back then), but I understand that there is a learning curve, which is why I’m offering the more Windows-like Cinnamon and MATE, a fork of GNOME 2 for those who might like a more classic Linux feel (not that I expect any of them to have any working knowledge of Linux coming in to the project).

For those of you who might like to play along at home (I plan to share some of my lessons here if I think they’re any good as a learning tool), I’m starting everyone out with a pretty basic load-out beyond the basic install.  I’m asking everyone to install Guake, my favorite Quake-like drop-down terminal emulator, and Vim, because emacs is for losers and Nano, the default text editor, is no better than just using Notepad.  If you’ve never used Vim before, you should probably go download it and run vimtutor from the command line so that you can get the basics.

So if you’re an Ubuntu user and you use Unity for your desktop and Chromium (or Chrome) as (one of) your browser(s), maybe you’ve been bugged by the placement of the window buttons when you don’t have the window maximized. If you want some consistency, there’s an easy fix that you can run from the command line. If you want to change the placement or order of your window buttons in Chromium, just open up a terminal window and enter

gconftool-2 --set /apps/metacity/general/button_layout --type string "minimize,maximize,close:"

Before

Before

After

After

 

Note that the code above will move the buttons to the left but won’t put them in the right order. If you want to put them in the same order as the window buttons on all your other programs, change the order so “close” is the first item in the above command. The colon in that string indicates the placement of the buttons, so if you want to move the buttons back to the right, move the colon to the beginning of the string (and of course reorder the buttons, unless you like a little bit of inconsistency just to screw with other users on a particular machine).

Credit goes to Leet Tips for the command, though not the explanation (that was me).

So I may be late to the party for Ubuntu 12.10 Quantal Quetzal, but as someone who just upgraded from 12.04.02 Precise Pangolin, I found an important issue affecting my crontab: the path to external media devices such as the backup hard drive I have plugged into my machine has changed.

Previously, if I’d wanted to access the contents of the external disk SCALZI from the command-line, I would have simply gone to /media/SCALZI/; this, however, is no longer the case.  In the new scheme, this media mounts at /media/[username]/[device]/, so in the case above, I would instead go to /media/hilary/SCALZI/.

The more you know.

(Yes, I name my external media after authors.  I have, among my collection of flash drives, Scalzi, Asimov, Gaiman, Pratchett, and Pierce.)

Well, I said that I was going to build a server to do a larger-scale test for AirPrinting from iOS devices here on campus, and by gum I did.  Right now, under my desk, there’s an Ubuntu 12.04.1 Precise server named Goodmountain (see what I did there?) whose only job is to serve up AirPrint printers for campus iDevices.

Nothing more glamorous than an old ThinkCentre shoved under a desk, amiright?

Here it is (center).  Nothing more glamorous than an old ThinkCentre shoved under a desk, amiright?

So how’s it working so far?  Well, I’ve printed a couple pieces of short fiction from my iPad to two of the printers that I’ve made available for this pilot program, and everything’s gone just fine.  There aren’t any students around this week, and I don’t know how much demand there’s been for iPad printing.  For this pilot, I’ve only made four printers available in the locations where the iPads get used most often, and I’ll be waiting to see if there’s more demand and/or how much the service gets used before I do anything else.  Top on my list of priorities is moving this to an actual server that isn’t hanging out under my desk, but that only happens if this is something that there’s heavy demand for.

Now, what have I learned?  Well, top on my list is that the Ubuntu server installer doesn’t recognize full-sized Apple SATA drives (or at least drives that have been pulled out of the bin and have an Apple logo on them–I don’t actually know if it’s the drives or something about the partitions, and I don’t care to test that right now).  More important than that, though, is that if you’re going to be serving multiple printers, you need to have a separate .service XML file under /etc/avahi/services/ for each printer or none of them are going to show up.  If you’ve already built a nice big file for all your printers and you need to cut it up into a bunch of individual files, just consider it more Vim practice.  Yank is your friend.

Expect to see another report here once I have some usage statistics.

Like many other private schools, there have been rumblings at my workplace about going one-to-one (that is computers to students). At the moment, those rumblings point towards a pilot program rolling out iPads in the Middle School. We have a lot of smart teachers doing interesting things with iPads in their classrooms already, and I think that an iPad program could have a number of benefits in the classroom (though it will require a thoughtful digital citizenship curriculum), but that’s not what I’m most concerned with at the moment. I’m concerned with how the kids and teachers will print to all our legacy printers from their shiny new tablets.

A week or two ago, I was asked to research a product that is supposed to simply and seamlessly solve the problem of using legacy printers for AirPrint. The idea, which is a decent idea, is that you plug this box into your network and it discovers all your printers and makes them available for AirPrint. The problem, which I’ve heard from other sysadmins at schools in the area, is that this particular product doesn’t scale well–one of the boxes costs about $100, and each of them is “good” for about 7 printers, but even then, they apparently have a tendency to lock up and require frequent hard resets. There are software solutions available, but they cost money and run on Macs, and I don’t want to make us get a dedicated Mac to act as an AirPrint server if there’s a way to get the system running for free on open-source software.

Well, it turns out there is a way. At this point, I’ve only done a small-scale proof-of-concept, but as of this writing, I have printed a document from my iPad to my office’s HP 3505n, which is certainly a step in the right direction, and in the future, I’ll probably do a scaled-up test and then hopefully put the system into full deployment. In my test case, there was no noticeable lag between my submitting the print job from my iPad and the printer firing up compared to printing directly from my computer.

To get this running, I used my Linux workstation, which is running Ubuntu 12.04.1. Ubuntu comes with Avahi pre-installed, which is great, because you need that, too. (You may remember my mentioning Avahi before.) After installing your printer or printers, you need to make sure that they’re shared, then edit your CUPS configuration and create a configuration file for Avahi. Full instructions are on gyttja’s blog, though the original article referenced seems to be down, so you’ll want to go here to get it on the wayback machine.

You’ll want to restart CUPS and Avahi after you’ve put through all the changes, otherwise, you probably won’t get any results, and some swearing might ensue. To do that, just run

sudo service cups restart
sudo service avahi-daemon restart

Look for another post on this subject here once I get a solution working on our campus.