Ubuntu

You are currently browsing articles tagged Ubuntu.

Over the 2008-2009 holiday season, I rebuilt my home network. I included the notes and information from my home network rebuild in an article that described the Mac OS X-Ubuntu integration resulting from the rebuild. Since that time, I’ve added a larger hard drive to the home server to make more room for Time Machine backups, movies, music, and other files. Things seemed to be working very well. Until the other day…

My wife made an offhand comment that she couldn’t access the shared music library from her laptop. I tested the connection and, sure enough, every time I clicked the shared library icon it simply disappeared. No error, no warning, no entries in any log files…it just disappeared. I searched the Windows event logs, and I searched the log files on the Ubuntu server downstairs. Neither computer had any entries whatsoever that provided any insight as to why this one computer would not connect to the shared music library.

Being the geeky troubleshooter that I am, I attempted to replicate the problem on some of the other computers on the network. My MacBook Pro worked fine. Three other Windows laptops on the network, running the same version of Windows (Windows XP Professional) and the same Service Pack revision, also worked fine. The problem seemed to be isolated to her computer. Perhaps it was only when she was on the wireless network…nope, the same problem regardless of the network connection.

I upgraded iTunes to the latest version. That didn’t work. I disabled the Windows Firewall on her computer. That didn’t work. I made sure that no traffic was being blocked by the firewall on the Ubuntu server; no traffic was being blocked. In other words, that didn’t work. I was about to give up and just write it off as one of those strange aberrations that couldn’t be resolved and chalk it up to Windows.

Then I stumbled onto this site. I’d already created a daapd.service file for Avahi to use previously, but this site described some additional entries in the daapd.service file that I didn’t have. I made some edits, based on the information on the site, and here’s the daapd.service file I had for Avahi:

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM “avahi-service.dtd”>
<service-group>
<name replace-wildcards=”yes”>Home Media Server</name>
<service>
<type>_daap._tcp</type>
<port>3689</port>
<txt-record>txtvers=1</txt-record>
<txt-record>iTSh Version=131073</txt-record>
<txt-record>Version=196610</txt-record>
</service>
</service-group>

After changing the daapd.service file to the version listed above, I restarted Avahi. Upon the shared media server re-appearing in iTunes, I clicked on it and…drum roll please…it worked! The previous version I had been using did not have the txt-record entries, and I really have no idea why adding the txt-record entries suddenly made my wife’s iTunes connect properly. I suppose it doesn’t matter why it works, it just matters that I FIXED IT! (ePlus engineers who attended our NSM this year will get this joke.)

Still, in the event you’re running into the same issue—a Windows installation of iTunes that fails to connect to a shared music library running on Firefly Media Server—then perhaps updating your Avahi configuration will correct the problem.

Tags: , , , , , ,

Apparently my Ubuntu-Mac integration article is quite popular; it’s been picked up for re-publication on a couple of different sites:

http://linux.sys-con.com/node/803618
http://opensource.sys-con.com/node/803618

Cool! I hope the article is useful to others.

As a quick follow-up to that article, you may recall that I ran into a strange issue with OpenVPN and mt-daapd prior to the home network rebuild. I just finished installing OpenVPN last night and, anticipating the problem, did some digging to see how I’d fix the problem this time around. Turns out there’s nothing to worry about; Avahi skips point-to-point interfaces by default, and OpenVPN tags its interfaces as point-to-point. So, everything works as expected.

Tags: , , , ,

One of my projects over the Christmas holiday has been to rebuild the home network. You’d think I’d want to avoid that sort of thing since I’ve been on vacation from work for the past two weeks, but working on a home network is a different sort of beast than working on a network for a company. There are different challenges to be addressed.

My primary goals for this “home network rebuild” were the following:

  1. Rebuild the home server with a newer version of Linux, and possibly switch to a different distribution.
  2. Continue to provide DNS, DHCP, HTTP, and HTTP proxying/content filtering services to the home network.
  3. Continue to provide file sharing services via Server Message Block/Common Internet File System (SMB/CIFS) for Windows-based systems on the home network.
  4. Continue to have a shared music library available via Digital Audio Access Protocol (DAAP, aka iTunes) available to all systems on the home network.
  5. Provide file sharing services to Macs on the network via AppleTalk Filing Protocol (AFP) over TCP.

Ideally, I also wanted to enable Time Machine backups from my Mac laptop to the home server.

After doing a fair amount of research, I settled on the use of Ubuntu 8.04 LTS (”Hardy Heron”) for the server build. I didn’t go with Ubuntu 8.10 (”Intrepid Ibex”) simply because a) I already had 8.04.1 downloaded and burned to a CD; and b) Hardy Heron is an LTS release, so I should have better support over the long term.

I won’t bore readers with the details of the rebuild, but it took about a day or two to get a larger hard drive installed, Ubuntu installed and configured, and services running like DHCP (including some static reservations for certain computers, like my laptop and my iPhone), DNS (using MaraDNS, much easier to figure out than BIND), Apache, and Squid with SquidGuard. At this point, I’d completed tasks #1 and #2.

On to task #3. This was pretty simple and straightforward and easily accomplished via Samba, with nothing really unique to document here. The one interesting thing that I did find was a way to map the long usernames that Mac OS X uses (like “Bob Jones”) to a short username (like “bjones”). I used this command in the /etc/samba/smb.conf file:

username map = /etc/samba/usermap.conf

In this file, I simply placed lines that mapped the long usernames to the short usernames. Since Mac OS X defaults to the long username when connecting to the server, this allows me to simply type in a password and connect. I searched for hours trying to find a way to have Mac OS X supply my current password to the Samba server so that I wouldn’t get prompted, but could not find any information. If anyone knows the trick, I’d love to hear about it. After configuring a few shares, setting Linux permissions and the umask, and then testing from both my Mac laptop and a Windows laptop, task #3 was finished.

Task #4, providing an iTunes-compatible music server, was also really straightforward and easy. For this, I again selected Firefly Media Server, formerly mt-daapd, which I’d used before with great success. Again, nothing unusual or unique to document here, except for the potential interaction with Avahi (more on that later).

The final task was installing Netatalk to provide AFP over TCP file sharing services for Macs on the network. Fortunately for me, one of the sites I’d been using to help in my project pointed me to this blog post, which had a prebuilt package for Netatalk that included the necessary SSL support that Mac OS X requires. That saved me the trouble of compiling Netatalk from source. Following the steps in the Kremalicious article as well as information from this guide, I configured Netatalk to present a volume to use for Time Machine backups. It was at this point that I noticed a strange interaction with Avahi.

Avahi is a multicast DNS (what Apple calls Bonjour) server for Linux. It’s responsible for advertising services to multicast DNS-enabled systems, such as other Linux systems running Avahi or Macs. I’d installed Avahi earlier and used some service definitions from this article and this blog post to advertise Samba and HTTP. In addition, after installing Firefly, I’d noticed that Firefly starting advertising its presence automatically through Avahi with no service definition required.

Upon installing Netatalk, I also noticed that Netatalk started advertising automatically via Avahi as well, but using the IP address of the server. In order to be able to control how Netatalk advertises via Avahi, I had to change this line in /etc/avahi/avahi-daemon.conf:

enable-dbus=no

The suggestion for this change came from this thread on the Ubuntu Forums. Upon making the change and restarting Avahi, the odd Netatalk entry went away, but so did Firefly! To advertise both Netatalk and Firefly, I added a couple of files to /etc/avahi/services:

afpd.service:

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM “avahi-service.dtd”>
<service-group>
<name replace-wildcards=”yes”>Intrepid Time Machine</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=AirPort</txt-record>
</service>
</service-group>

daapd.service:

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM “avahi-service.dtd”>
<service-group>
<name replace-wildcards=”yes”>Home Music Server</name>
<service>
<type>_daap._tcp</type>
<port>3689</port>
</service>
</service-group>

After placing these two files into /etc/avahi/services, the new services starting advertising immediately. By the way, you’ll note the extra “device-info” entry in afpd.service; that sets the icon that will be used by Macs when they discover this service. I made mine look like a Time Capsule by using the setting listed above.

During this work with Avahi, I uncovered a couple of interesting things:

  • I found that restarting the Avahi daemon is actually more problematic than just leaving it alone; in order to make it start advertising services again after a restart, you’ll have to open one of the files in /etc/avahi/services and then close it again. No changes are necessary to the file, but opening it will kickstart Avahi into service advertisement.
  • Advertising SMB/CIFS and AFP together with the same name caused my Mac to ignore the SMB/CIFS services and only use AFP. I had to separate SMB/CIFS and AFP into different entries. Since I was using AFP really only for Time Machine backups and SMB/CIFS for everything else, it wasn’t really a big deal.
  • Advertising SMB/CIFS and RFB (Screen Sharing, as outlined here) works fine together.

At this point, task #5 was pretty much complete. I had originally envisioned providing file sharing services to the same locations via both AFP and SMB/CIFS, but in the end—partially because of the odd issue with AFP and SMB/CIFS being advertised together as described above—settled for using AFP only for Time Machine and SMB/CIFS for everything else.

Along the way, I also configured screen sharing as outlined here, and it seems to work just fine. I have to leave an account logged in to the Ubuntu server, but I can just lock the screen when I’m not logged in remotely.

The last step was to enable Time Machine backups to the Ubuntu server via AFP. First, the hack to enable non-Time Capsule network backups (this should be all on one line):

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

I was then able to select the Ubuntu-hosted AFP volume for Time Machine backups. Attempting to run a Time Machine, backup, however, reported an error about being “unable to create the disk image”. Fortunately, a number of different articles pointed to the use of hdiutil to create the disk image, and that seemed to fix the problem. Time Machine is now backing up to the AFP volume, although I suspect I still have a few issues to work through (for example, it looks as though I have to keep the Time Machine AFP volume mounted in order for automatic backups to run).

So, when everything is said and done, I was able to achieve all my stated goals. The only outstanding issue that I haven’t yet figured out yet centers on automatic logins; for both AFP and SMB/CIFS, I get prompted for a password when connecting, even though I keep my password synchronized (manually) between my Mac and the Ubuntu server. Any tips on how to resolve that would certainly be appreciated.

Along the way, I found the following sites to be quite helpful. I’m sure there are others that I used along the way, and I apologize if I’ve failed to extend credit where credit is due.

Limit size of Time Machine backups on Time Capsule
Set up Time Machine on a NAS in three easy steps
Make Ubuntu a Perfect Mac File Server and Time Machine Volume
Five Guides on How to Integrate Ubuntu into a Mac OS X Network
Time Machine Wireless Backups without Time Capsule

Tags: , , , , , , ,

Nexenta (also called GNU/OpenSolaris) is a blend of OpenSolaris, GNU, and Debian (Ubuntu, specifically).  It’s pretty cool, actually—blending the OpenSolaris kernel with Ubuntu userland binaries to create something that’s not quite Solaris and not quite Linux, but has some of the values of both.  For those of you interested in running it on VMware ESX Server, I’m happy to report that it does work just fine.

To install Nexenta as a VM in ESX, I used the following settings:

  • 512 MB of RAM
  • 4GB virtual disk (pre-allocated); obviously, you would want more space if wanted to do anything useful with Nexenta
  • LSI Logic SCSI controller
  • “Flexible” network adapter

The installation went very smoothly and very quickly (quicker than Solaris 10 and a couple of the other Linux distributions I’ve tried on ESX).  The system came up very smoothly and was immediately accessible across the network.  I didn’t try anything useful or meaningful with it; it is an alpha version, after all.

It’s worth keeping an eye on, at least.  I’ll be interested to see how it develops.

Tags: , , , , , ,

Once I’d gotten Ubuntu up and running on my HP nc8230 laptop, the next order of business was—due to business needs—get a copy of Windows XP Professional running under VMware Workstation on Ubuntu.  While I’m not a huge Windows fan (I prefer Mac OS X and Linux to Windows, generally), I also recognize the need for Windows in a world where your customers all run Windows.

I’d never installed VMware Workstation on a Linux host before, so this would be a new experience for me.  It couldn’t be that hard, right?  Well, it wasn’t as easy as I had hoped it would be, that’s for sure.

In order to get VMware Workstation 5.5.1 to install on Ubuntu 5.10, here’s what I had to do:

  1. Copy the VMware Workstation 5.5.1 software onto the machine.
  2. Using apt-get, install gcc, g++, and the appropriate Linux headers.
  3. Untar the VMware Workstation software and run the installation script.  When prompted, go ahead and compile a custom vmmon module.

That should do it.  One site I found while preparing for this also suggested installing the “build-essential” package, but I didn’t install this and VMware Workstation seems to run just fine.

Coming up soon:  installation of Solaris x86 under VMware Workstation running on Ubuntu Linux!

Tags: , , ,

I was issued a new HP Compaq nc8230 laptop today, with the standard corporate image of Windows XP Professional Service Pack 2 and the assorted applications.  One of the very first things I did was install Ubuntu 5.10.  Here’s some additional information on a few of the hurdles involved (there aren’t many, fortunately).

I was already familiar with Ubuntu 5.10, having already installed it for my daughters on two older Compaq laptops.  However, I’d never installed it on brand-new equipment, so I was a bit concerned that all the hardware wouldn’t be detected properly.  A bit of searching came up with this article indicating that Ubuntu 5.04 had installed succesfully, so I felt fairly confident that everything would be fine.

So I popped in the Ubuntu installation CD, pressed Enter when prompted, and was soon greeted with a blank screen.  That was odd.  I rebooted, and got the same behavior.  Upon the next reboot, I pressed F1 at the “boot:” prompt to review some parameters.  I quickly stumbled onto the “vga=771” parameter.  At the boot prompt, I used “linux vga=771” and the system booted into the installation menu.  My first hurdle was overcome.

The rest of the installation seemed to go smoothly, right up until the point where the installation crashed with a message that it couldn’t copy files from the CD-ROM.  In fact, it couldn’t detect that the CD-ROM drive even existed.

I rebooted, tried again, got a little bit farther, and got the same message again.  Examining the CD a bit closer, I didn’t see anything wrong with the disc (no obvious scratches, dirt, smudges, etc.), but cleaned the CD nevertheless and tried again.  This time the installation process was successful, and everything was golden.

Until the X Server didn’t work on the final reboot.  Sigh.  Referring back to this article I’d found earlier, I followed the instructions to remove (if possible) and reinstall the xorg-driver-fglrx package and then reconfigure X.  When I had finally completed those steps, the X Window System started up and dropped me onto a customized GNOME desktop.  Finally!

From there, I proceeded to install a 686 kernel (instead of the generic 386 kernel) and run an “apt-get upgrade” to pick up the latest packages from the Ubuntu repositories.  So far (knock on wood), everything has been pretty stable and pretty functional.

UPDATE:  Scratch that functional part.  The laptop has locked up more times in one afternoon than my PowerBook has in the 2+ years that I’ve owned it.  I’m not really sure what’s going on with this thing, but clearly something isn’t quite right.

Tags: , ,

Ubuntu 5.10

A few days ago I mentioned Kubuntu 5.10Kubuntu is the KDE-based variant of Ubuntu.  After having installed and used Kubuntu, I decided to try Ubuntu, the GNOME-based cousin.  I downloaded the ISO image of the install CD last night and installed it today while reviewing HSRP configurations for an upcoming Cisco installation.

I am equally as pleased with Ubuntu as with Kubuntu.  I find that version 2.12 of GNOME, which ships with Ubuntu, is much better than the older versions of GNOME that I had used.  In addition, the overall fit and finish of the distribution is very good, and I continue to enjoy using apt-get to update and upgrade packages on the system.  As a matter of fact, the only downside to either distribution so far is that Kubuntu doesn’t include Firefox by default (note that Firefox is included with Ubuntu).

So, I currently have two older Compaq Armada E500 laptops that I’ve loaded with Linux—one is running Kubuntu, and the other is running Ubuntu.  Both work flawlessly, including full interoperability with my wireless network.

Tags: ,

Updating Kubuntu to KDE 3.5

Kubuntu 5.10, the KDE-based variant of Ubuntu, normally comes with KDE 3.4.3.  With KDE 3.5.0 just recently released, however, I wanted to update Kubuntu to use the latest version of KDE.  Here’s what I had to do to make it work.

First, from this page, I downloaded and added the appropriate GPG key.  Once that was done, I used “apt-get update” to download the latest package information and “apt-get upgrade” to upgrade packages.  That upgraded most of KDE, but there were a few packages that still refused to upgrade (they were reported by apt-get as “held back”).

After poking around with apt-get for a while, I discovered that there was one missing file—libgnokii2—that couldn’t be found in the apt-get sources.  I manually reviewed the apt-get sources and finally found this package in the universe section of the main Ubuntu apt-get source.  I edited /etc/apt/sources.list to enable the other sections, then manually installed the missing file with these commands:

apt-get clean
apt-get update
apt-get install libgnokii2

I then edited /etc/apt/sources.list again to disable the other sources and upgraded the remainder of the KDE packages:

apt-get clean
apt-get update
apt-get upgrade

This last round of apt-get removed a few obsolete packages and then updated the remainder of the KDE packages.

I don’t know if this is the “correct” way of doing things, but it seemed to be the only way to make it work as anticipated.  If anyone has a better way, please let me know.

Tags: , , ,

Kubuntu 5.10

After wrestling with installing, configuring, and supporting Fedora Core 3 on an older Compaq Armada E500 laptop, I decided to break with my Red Hat/Fedora legacy and try Kubuntu, the KDE-based Ubuntu variation.  Ubuntu itself is a relative newcomer to the Linux distribution arena, based on (as I understand it) Debian.

In previous stints using Linux as my desktop OS, I’d always been partial to KDE instead of GNOME.  Some would say that it’s because KDE has traditionally been more “Windows-like” than the other Linux graphical environments; perhaps that’s the case.  I’ve typically found KDE easier to work with, and since this laptop would eventually be used by the kids I felt like ease of use was important.

The install went very quickly and very smoothly.  When the install was done, I then proceeded to update KDE to version 3.5.0 (which had just been released a few days before).  Along the way, I learned a handy piece of information about HTTP proxies and command-line utilities (I’ll soon post information on that as well).  Eventually, I managed to get apt-get to download and install the updated KDE 3.5 packages.  I rebooted the system and found that I was now running the updated version of KDE.  (Side note:  There are still some KDE packages that won’t upgrade for some reason; I’m currently working on resolving that issue.)

It’s still too early to tell for certain, but I may just have found a new desktop Linux version.

Tags: , , ,