bzip’d tar file returns error

Geekery, Linux — Eric on January 29, 2008 at 8:26 pm

right. so I got this today when trying to untar all of my academic work from an archive:

ericgar@babbage extusb$ tar -xjf columbia-2007-10-31.tar.bzip2
You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.
tar: Child returned status 2
tar: Error exit delayed from previous errors

ericgar@babbage extusb$ bzip2recover columbia-2007-10-31.tar.bzip2
bzip2recover 1.0.4: extracts blocks from damaged .bz2 files.
bzip2recover: searching for block boundaries ...
bzip2recover: I/O error reading `columbia-2007-10-31.tar.bzip2', possible reason follows.
bzip2recover: Input/output error
bzip2recover: warning: output file(s) may be incomplete.

I was thinking, “Well, data loss sucks.”

But it turns out the underlying filesystem was mounted read-write on a read-only mount point. D’oh. I feel like tar and bzip2recover could have told me that off the bat.

Sendmail SMTP AUTH Config Explanation

Geekery, Linux — Eric on April 10, 2007 at 7:34 pm

Both for my own knowledge and that of the internet, I took the time to finely document my sendmail.mc configuration file for use with SMTP AUTH to an external SMTP server. In this configuration, my local users can send mail to the rest of the internet by authenticating with my ISP’s SMTP server and send mail through it.

The following sites were extremely helpful when initially trying to configure this:

You can download my configuration file as it is printed below.
(more…)

IMAPProxy: MD5_DIGEST_LENGTH undeclared

Geekery, Linux — Eric on February 24, 2007 at 9:26 am

When I attempted to compile IMAPProxy on Linux 2.6.18 with GCC 4.1.1, I received this error:

src/imapcommon.c: In function 'Get_Server_conn':
src/imapcommon.c:380: error: 'MD5_DIGEST_LENGTH' undeclared (first use in this function)

The post by Jakob Hirsch on the IMAPProxy mailing list provided the answer:

Problem is that md5.h is not longer included by evp.h (which is included
by src/imapcommon.c), so MD5_DIGEST_LENGTH is not defined.
“#include ” in src/imapcommon.c fixed it for me.

ssh_config usefulness

Geekery, Linux — Eric on February 22, 2007 at 12:05 pm

I’m sad to say it, but I didn’t know about ssh_config until last week. Sometimes you think you’re not that bad at what you do, but then there’s just something that makes you realize you don’t know as much as you think.

A long time ago, I obtained a copy of wireless hacks from a talk that was given on campus. Most of it were things I’d already thought of, the rest uninteresting. A good book for anyone who doesn’t know anything about using wireless networking to their advantage. There was mention of using bash shortcuts to ssh into remote machines easily.

So, instead of typing ssh -X -Y -A ekg2002@canberra.cc.columbia.edu each time I wanted to remotely log into a Columbia machine, I put that exact line into a executable file somewhere in my path. That way, I could just type $ canberra at my prompt and be logged in.

The problem with this scheme is that I can’t easily, say, scp to the same machine. I always found this to be annoying.

Then I found ssh_config. It allows you to define host shortcuts in a single file including any ssh options. man ssh_config gives lots of information on it. So, to replicate the above ssh command, I add this to ~/.ssh/config:

Host canberra
HostName ekg2002@canberra.cc.columbia.edu
User ekg2002
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes

I can do this for all machines to which I ssh regularly. This is beneficial for two reasons: I can ssh and scp equally easily and I can manage this file centrally (and install it on all of my hosts). The downside is that I have four more characters to type to connect to a given host (which can be reduced to two through aliasing).

MythTV problem

Geekery, Linux — Eric on February 9, 2007 at 8:32 pm

I just fixed a random problem with our MythTV box. The backend crashed for some reason, so we had to power cycle the computer. Upon starting mythbackend up, there was an error message about a failed schema update.

The fix was to manually decrement the DBSchemaVer setting:


mysql> update settings set data=data-1 where value='DBSchemaVer';

And reload the backend.

Thecus N2050 on Gentoo Linux

Geekery, Linux — Eric on December 14, 2006 at 2:00 pm

I just received my two Seagate 7200.9 250GB drives and have already installed them into my Thecus N2050 RAID DAS device (both hd and das on NewEgg). I was initially worried because the 7200.9 drives are not listed on the Thecus approved drive list, despite the 7200.7 and 7200.10 devices being there. They work fine. The 7200.9 250GB drives were $10 cheaper than the 7200.10 drives. Since I don’t really need performance but do want space, the older model was fine for me.

I’m fairly impressed with the setup. The box was easy to install: I slapped the two drives in, installed the included SATA card (Silicon Image, Inc. SiI 3512) in my Linux box, compiled modules for siimage and sata_sil (I’m not yet sure if I need the former; there is no documentation for installation on Linux).

My future plans are to purchase another N2050 in which I’ll place the two 250G 7200.9 drives I already have in my Linux box (currently doing LVM to extend the partition space to 500GB, but no RAID). The only problem is that I’ve run out of PCI slots in my server, so I’d either have to use another server or buy a SATA PCI card with two eSATA connectors. Oh the problems of a geek.

I should also buy another 7200.9 250GB for the event that a drive fails. I’m not sure whether to buy this extra drive now as the 7200.10s are hitting the market or to wait a while. Or, I may not even do this and just rely on Seagate’s ridiculous 5 year warranty. On second thought, I’ll probably just do that.

Update 12/26/06: I’ve been using the sata_sil driver without any problems. Below are my (fairly decent) stats for the drive:


/dev/sdc:
Timing cached reads: 1728 MB in 2.00 seconds = 864.08 MB/sec
Timing buffered disk reads: 156 MB in 3.02 seconds = 51.58 MB/sec

Flash Player 9 for Linux Released

Linux — Eric on October 18, 2006 at 9:30 pm

(I’d like to do my part for contributing to a PageRank:) I’m very pleased to see that the Flash team over at Adobe has released a very working Flash Player 9 Beta for Linux.

I’ve tested it on a few videos in YouTube and the results are obvious: Sound and video are now synchronized well. I may very well be using my Linux desktop a whole lot more now.

I give a big thanks to the Flash team, especially Emmy Huang, the team leader.

For reference, I had to place the libflashplayer.so file into /usr/lib/nsbrowser/plugins and delete /usr/lib/nsbrowser/plugins/flashplayer.xpt. It kind of seems odd to me that my installation of Firefox is using the nsbrowser directory rather than the /usr/lib/mozilla-firefox/plugins directory. Whatever floats its boat, I guess.

Update: I unmerged ebuild netscape-flash from Portage to get rid of /usr/lib/nsbrowser. Firefox still believed I had Flash Player 7 installed. Then, I enabled the configuration option plugin.expose_full_path in about:config and figured out that the plugin it found was in /usr/lib/mozilla-firefox/plugins and despite the fact that that file has a date of October 19, it wasn’t Flash Player 9. Deleted the libflashplayer.so there, restarted, and works well.

Eclipse + JBossAS + EJB 3.0 setup instructions

Coding, Linux — Eric on October 17, 2006 at 8:30 pm

Today I was tasked with getting my software engineering group’s development environment set up. The requirement for our project is to build a three-tier application using a major component model framework. We chose to use:

  • Java/EJB because it is well documented and in a language we all know (and since we don’t want to use COM+ or .Net as we don’t have Windows boxes, the only language we could use)
  • Eclipse because it is the best Java IDE and is cross platform
  • JBoss AS because it is a well supported J2EE application server and seemed to have good Eclipse support. Additionally, it is one of the few ASes to have J2EE 3.0 support (sort of, see below).

The combination of these tools is supposed to be easy, but I found it fairly tricky because of lack of documentation. I’m sure it could be worse had the guys over at JBoss not worked as hard as they have to bring a J2EE platform to the open-source world. The rest of this post include the steps that we took to install these tools and get them running. Hopefully they’ll be of help for those of you who got here through Google.

(more…)

Samba hangs on service start up

Linux — Eric on October 14, 2006 at 12:41 pm

I just encountered a problem where Samba failed to start and just hung before daemonizing.

Samba fails to start.
The last few messages left in /var/log/samba/log.smbd referred to trying to find CUPS: “cups server left to default localhost” and “Unable to connect to CUPS server localhost - Connection timed out”. I don’t use CUPS since I don’t have a printer and the service was not active.

Samba error log
Why would it hang on connecting to a service that doesn’t exist? For kicks, I started up CUPS without any defined printers to see what would happen to SMB. No luck, smbd still hung at exactly the same place.

Then I realized that I’m a big dummy. Network interface lo was not loaded. I’m not entirely sure how it was removed from my startup configuration. After doing an ‘ifconfig lo up’, I started samba:

Samba starts.

Moral of the story: services need lo to use other services on the same box.

oh linux.

Linux — Eric on July 5, 2006 at 5:08 pm

So I decided a while ago that Xen + Linux was a brilliant idea. I quickly learned, however, that Xen + Gentoo is just a pure mess. I’ve read about a lot of people having trouble with it and I personally found it hard to install.

I gave up.

I installed Kubuntu. Then I didn’t like that so…

I installed Fedora. And it’s treating me well. Until just now. I wanted to install X headers to compile a theme I downloaded to make my box look like this guy’s. So I start up Fedora’s “Package Manager” click on the package that I want (oh, and a anti-RSI program) and next thing I know I’m in package dependency hell. That’s bad for a program that claims to manage dependencies. So I’m clicking away thinking, “Alright, I must really need these random X headers.” Then it complains about dependencies. So I click a bit more. And some more. Then I click finish. Hooray! Dependencies resolved, it’s going to go download some packages for me. The first package: evolution-data-server. How did I get duped into installing that?

Grr. I miss gentoo. But to get to the state where I am now with Gentoo would have taken days and a lot of patience. I kind of like Fedora. I even have anti-aliased fonts right out of the box!

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. | Eric Garrido