Ted Leung on the air
Ted Leung on the air: Open Source, Java, Python, and ...
Mon, 16 Jan 2006
How to recover crashed Linux volumes

Our Christmas day power outage finally ended happily. Recall that a Christmas day power outage corrupted an ext3 filesystem that was managed by the Linux LVM. e2retreive ran for almost 3 weeks and in the end was unable to actually recover any files. A bunch of other free/open source programs also failed to do the job.

My initial round of Googling turned up a pieces of software called Kernel by Nucelus Technologies. They offered a demo version of their software which would tell you if it could recover files, but not actually recover them (for that you had to cough up some money). Kernel runs on Windows, but there are versions for lots of operating systems. Given that I thought our problems were more due to LVM rather than ext3, I was a little skeptical that Kernel would be able to do much of anything. I'm glad that I was wrong. Kernel was able to recover all the files off of the disk (you better believe I paid), so we have all of our data back. The only thing I'm unhappy with is that Kernel didn't preserve the file dates, even though it was able to display the dates. Still, I'm very happy to have my data back, and Kernel definitely makes the recommended list. So if you have a corrupted ext3 partition under LVM, Kernel had a decent chance of working.

The Google research that I did has convinced me that using LVM is more dangerous than the convenience of it, so I'll definitely be reformatting the offending disk as plain old ext3.

[15:23] | [computers/operating_systems/linux] | # | TB | F | G | 3 Comments | Other blogs commenting on this post
Wed, 19 Oct 2005
Breezy was a breeze

[via Ubuntu ]:

Last week the Ubuntu folks released their latest version, which had the code name "Breezy Badger". A few weeks before I switched my Hoary box over to Breezy, just by changing the sources in my apt sources list, and letting apt-get do its thing. I expected the upgrade to be painless since that's been my experience on the various Debian boxes that I am running. One thing that I didn't expect was the the sound on my Shuttle box started working after I did the upgrade. I didn't even have to re-run the installer.

[00:57] | [computers/operating_systems/linux/ubuntu] | # | TB | F | G | 1 Comments | Other blogs commenting on this post
Thu, 03 Feb 2005
A G5 at last - a Shuttle G5 that is.

For work I got a new Intel based PC, a Shuttle G5 9500 XPC. This is an AMD64 nForce3 based machine. Mine has an AMD64 3500, 1Gig of RAM and 74G 10000RPM Raptor. It's not the top of the line, but it's pretty close. The form factor is great (goes right under one of the shelves of my desk), the heat is nice in the winter, and the noise is tolerable (but could be better)

I've spent the last few days wrestling with the machine. To do the job, the machine needs to run Windows XP, Fedora Core n (which is our supported Linux) and Ubuntu (because I'm willing to do the work to get things going on Ubuntu).

I started by grabbing the latest Hoary AMD64 Live CD, in order to make sure that Ubuntu could detect all the hardware. I had some concerns about the SATA disks and the Ethernet controller on the nForce. The LiveCD's found everything, put up a beautiful GNOME desktop, and seemed to run just fine. Next stop Hoary Install CD for AMD64. This installed like a champ, but wouldn't boot. I got dropped into the Intel PXE netboot. Something was messed up with the boot records. A frenzy of wiping, repartitioning, reinstalling ensued punctuated by reboot after reboot (I ended up blasting Windows too). I learned about Debian From Scratch, which is a handy way of using Debian as a rescue CD.

In the end I put Ubuntu on a primary partition (it had been on an extended paritition), installed GRUB's master boot record on that partition, and then copied that boot record to Windows, where I could put it into boot.ini and use the Windows boot loader to load GRUB which would then boot Ubuntu. I had never done anything with GRUB before Ubuntu, and I now know more about it that I wanted to. But at least I have a working dual boot system.

Next problem, building Chandler on AMD64. This turned out to be too big of a hurdle for a one night project. Installing the ia32-libs package helped some, but not enough. The big remaining problem seems to be weirdness with Hoary's current packageing of gcj-3.4, which is needed for PyLucene. I was tempted to go do the chrooted 32bit library thing, but I think I need to learn a little more about 64 vs 32 bit environments before I do that. I ended up grabbing a 32bit i386 Hoary CD and installing that into the partition intended for Fedora Core 3. After I did that I was able to successfully get the prebuilt Chandler to run (I have no doubt I'll be able to get it to compile if I need to). The last snag is that Chandler/wxWidgets runs great on the Xorg X xserver in Ubuntu, but when I try to run it using XQuartz on the Mac, Chandler crashes. So, for native Linux, we're AOK, for the case which would be more convenient for my working, there's a bit more to go.

On the whole, I'm happy with how the Ubuntu install went -- much better than my previous Debian installs (and most of my Debian knowledge carried right over), and without many cuts. In fact, when I just made one huge Ubuntu partition, things went really easily. The problem came in with me wanting a triple (perhaps now I'll need quadruple) boot setup, being inexperienced with GRUB, and trying to build a 64 bit Chandler, which I'll eventually figure out how to do.

[02:44] | [computers/operating_systems/linux/ubuntu] | # | TB | F | G | 10 Comments | Other blogs commenting on this post
Sun, 30 Jan 2005
Shorewall tip

If your are using shorewall as your firewall, be sure to update the contents of your rfc1918 file periodically, as networks get reassigned by IANA. I had a very out of date version, which was making my website inaccessible to people on various networks.

Fortunately shorewall includes a Python script for generating the appropriate parts of the file.

[22:34] | [computers/operating_systems/linux/debian] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Fri, 10 Dec 2004
Another reason why I'm excited about Ubuntu

Daniel Stone and Thom May sit down to smack down Ubuntu's boot time.

[22:50] | [computers/operating_systems/linux/debian] | # | TB | F | G | 2 Comments | Other blogs commenting on this post
Fri, 12 Nov 2004
An apt proxy for Bittorrent

While I'm not having problems with downloading Debian packages (I have a cron job that downloads updated packages daily), I think that additional uses for bittorrent is a good thing. apt-torrent is a proxy for apt that uses bittorrent as the transport.

[00:03] | [computers/operating_systems/linux/debian] | # | TB | F | G | 1 Comments | Other blogs commenting on this post
Sat, 18 Sep 2004
Ubuntu (which means "Humanity to Others") is a new Debian based distribution which looks very promising. OSNews had an interview with Jeff Waugh (from the GNOME team, and one of the Ubunto developers) as well as a bevy of screenshots.

I hope that the Ubuntu community is able to stick to a 6 month release schedule, and that there will be a significant and bidirectional cooperation with the Debian project.

[23:26] | [computers/operating_systems/linux/debian] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Sun, 22 Aug 2004
I wish Debian was Fedora
Jon Udell's interview with Michael Tiemann helped me to understand the goals of Fedora. I like the way that Fedora is incorporating new features such as SELinux into the distribution, and it's sort of tempting to take a look at Fedora. Debian has been really good to me, and I haven't heard that any RPM based system can rival the quality of Debian. I just wish that the Debian people would stop letting ideology ruin the distribution. I use Debian because it works the best. Perhaps the Canonical team [via edd] will be able to appeal to folks like me.
[22:52] | [computers/operating_systems/linux/debian] | # | TB | F | G | 7 Comments | Other blogs commenting on this post
Fri, 20 Aug 2004
Edd can blame Ted Tso
Edd Dumbill is on a mission to get people to use Linux and other free software on notebooks (apparently, he was unhappy about the number of Powerbooks at OSCON). When I started at OSAF, I was seriously in love with the IBM T40p series machines. But when I started Googling (google: thinkpad t40 linux), I found large number of pages that described building custom kernels and madwifi drivers and so on. When I got to Ted Tso's T40 page, I decided that I would pass on a Linux notebook for this round of machine.

Last week when I was at OSAF I saw Ducky's new T41. Her box is running Gentoo and the wireless card was working. However, power management (sleep/hibernate) was not. But the combination of the machine and Edd's post got me thinking about it again.

I like the Powerbook. The software is great, but the hardware is mediocre. I feel that the processor is underpowered, the screen resolution is less than I would like, and the battery life of 2:30 is poor compared to today's Centrino based notebooks.

Here's a list of things that would need to happen in order for me to look seriously at a Linux powered notebook:

  • Support for recent hardware (Pentium M + 802.11 a/b/g)
  • Good power management (fast hibernate and fast sleep/wakeup)
  • Something that works with iChat A/V: I love e-mail and IM/IRC as much as the next open source guy, but using the iSight really makes a difference
  • Something like SubEthaEdit: in combination with audio/video chat, this really makes it easy to debug problems live.
  • Something like Launchbar/Quicksilver: These launchers are just so good
  • A really good RSS reader
[00:06] | [computers/operating_systems/linux] | # | TB | F | G | 6 Comments | Other blogs commenting on this post
Wed, 04 Aug 2004
The server that we store our digital photos on ran out of space, so I had to slap another hard drive into the machine. While I was at it, I turned on Logical Volume Manger (LVM) support, so that this will be slightly less painful the next time this happens. I had already compiled LVM support into the kernel (2.6.5), so all I needed to do was install Debian's lvm2 package and follow the directions in the LVM-HOWTO. It turned out to be much less painful than I anticipated.
[00:16] | [computers/operating_systems/linux/debian] | # | TB | F | G | 4 Comments | Other blogs commenting on this post
Wed, 07 Jul 2004
linux tips
Adam Rosi Kessel has a good list of useful Linux tricks. I particularly liked the Firefox remote new tab one.

I've also used several variants of "Email yourself after a long task". One is to send the e-mail to a pager, the other is to use the Mac OS X "say" command to give a spoken notification.

[21:25] | [computers/operating_systems/linux] | # | TB | F | G | 3 Comments | Other blogs commenting on this post
Mon, 05 Jul 2004
Early this weekend I installed postgrey, a greylister for Postfix based on Postfix 2.1's support for SMTP Access Policy Delgation. The theory behind greylisting is to temporarily delay mail message delivery in the hopes that spambots will not attempt to redeliver delayed messages. Based on my experiences, I'd say that hopes are high.

mailgraph is another utility written by David Schweikert, the author of postgrey. This graph shows the effects of turning on postgrey. I turned postgrey on late Friday/early Saturday, and you can see that the number of messages that were either spam or viruses decreased dramatically, while the number of rejected messages increased. The number of spams delivered to inboxes also decreased.


One thing that you need in order for postgrey to work is an script for starting up and shutting down. In Debian, such scripts go in /etc/init.d. postgrey doesn't supply a script, so I've made mine available. I'm not an init.d wizard, so if you improve the script please let me know. [ update: postgrey is now a package in Debian unstable ]

To date our anti-spam measures consist of postfix, postgrey, amavisd-new, clamav, and spamassasin on the server, and a bayesian filter in the clients. The arms race goes on.

[23:49] | [computers/operating_systems/linux/debian] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Tue, 29 Jun 2004
Desktop Linux
Bart Decrem has revised the study that Mitch Kapor talked about in his OSCON Keynote last year. The revised version is available as the ACM Queue article Desktop Linux: Where art thou?.
[13:09] | [computers/operating_systems/linux] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Tue, 15 Jun 2004
Debian AMD64
I'm sort of in the market for some new Intel Hardware -- I've been in the market for a new primary Intel box for the last 4 years or so, but for various reasons (almost all related to my inclination to wait for cool features) I keep putting it off. For a while it was 800MHz FSB, then it was Centrino, then it was Dothan, then I got the Powerbook. In the meantime, hardware keeps getting cheaper, and I could really use high performance Intel box -- my primary box has a pair of 750MHz P3's in it, which is hugely behind today's 3-3.4 GHz machines with their 800MHz FSB's. So the latest version of the waiting for cool features game goes like this: AMD64 vs (non-shipping) Intel64. This box is mostly going to run Debian, so the announcement that the AMD64 port for Debian is just about done got my attention.

Ironically, this hasn't been such a high priority for me since I got the Powerbook. Yes, I am popping X windows from the Linux boxes onto the PowerBook, and feeling the lack of speed that way. I'm accessing the existing Windows box via RDC, and that's also feeling the lack of speed. But mostly I'm happy on the Powerbook, except for two or three tasks. Now, if we were talking Powerbook G5, I might be in more of a hurry...

[00:06] | [computers/operating_systems/linux/debian] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Sat, 05 Jun 2004
Postfix 2.1 and SMTP Access Policy Delgation
[ via BoneHunter [ via Planet Debian ] ] Postfix 2.1 is out and one of the new features is SMTP Access Policy Delegation which allows you to run some code after Postfix sees the RCPT TO command. The README for this feature includes references to a perl server that performs mail greylisting. This looks something that I'd like to put into operation (having to deal with perl code notwithstanding). Ironically, the file greylist.pl doesn't appear in the Debian package for Postfix 2.1, so I'll have to go grab a source distribution. This is probably going to have to wait till after I get back from San Francisco, as the next day or so are going to be quite full.
[00:13] | [computers/operating_systems/linux/debian] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Fri, 04 Jun 2004
The Beagle has landed.
[ via Nat Friedman's blog] Beagle is a C# app for indexing data in GNOME. It's related to the GNOME dashboard project. I hope that progress on Beagle means that work on dashboard is progressing as well.
[22:57] | [computers/operating_systems/linux] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Thu, 27 May 2004
A good outliner for GNOME?!
Bring it on!

Jeff Waugh records some movement in this direction...

[00:24] | [computers/operating_systems/linux] | # | TB | F | G | 2 Comments | Other blogs commenting on this post
Sun, 11 Apr 2004
Last week, a few of us from OSAF had a meeting with Greg Stein to talk about protocols that we might use for our item sharing feature. In addition to a very interesting discussion, I learned about ClamAV, a GPL'ed virus scanner that runs on Linux. I was already running spamassassin on our mail box but I didn't know there was a good virus scanner for Linux. So I spent this morning installing the Debian ClamAV packages, as well as amavisd-new, which I used to hook both spamassassin (I had been using per-user procmail files) and ClamAV up to postfix.
[01:02] | [computers/operating_systems/linux/debian] | # | TB | F | G | 4 Comments | Other blogs commenting on this post
Thu, 01 Apr 2004
nameif is mostly your friend.
Thanks to the folks who wrote and recommended nameif as the solution for my kernel 2.6 interface swapping woes. It turns out that nameif isn't able to swap interfaces easily. In order to make it work you need to give your eth1 a bogus name, swap that interfaces MAC to eth0 and the swap the other MAC to eth1. Thanks (as usual) to Google and the debian-users list for the fix. Note that you cannot do this from an /etc/mactab, so you need to change /etc/init.d/networking (on Debian) and include the calls to nameif directly. You have to modify /etc/init.d/networking anyway because it doesn't check for an /etc/mactab and try to run nameif, and that's probably just as well.

At least I'm happily running 2.6 now.

[22:15] | [computers/operating_systems/linux/debian] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Thu, 18 Mar 2004
Well, there went 420 days of uptime...
The trusty 1GHz P3 that is the main server for the house has been up for 420 days. Until today. One of the hazards of living on an island is that occasionally the wind comes roaring across and knocks down some power lines. It happened twice today. The UPS kept the machine running through the first outage, but the second one was too close, and the UPS wasn't able to recharge. At least the UPS can talk to Debian via nut, so there was an orderly shutdown instead of a crash.

With the hubris of long uptime now removed, I decided to try and upgrade the kernel from 2.4.19 to 2.6.4. My development server is running 2.6.1 with no problems so I figured I had tested. The next problem was that I tried to get fancy. Not only did I try to upgrade to 2.6.4, I tried to patch 2.6.4 for User Mode Linux, which I've been dying to try. That didn't work at all. The patched versions of the kernel just wouldn't build. So I scrapped that idea and just built a stock 2.6.4. Using make oldconfig which saved a huge amount of time. I wish I had learned about that one a few years ago.

2.6.4 booted like a champ and everything was fine until the system started the firewall. It seems that eth0 and eth1 decided to switch which NIC's they were assigned to, breaking the firewall rules and a host of other interface dependent stuff. After a little googling and fussing, I decided to give up. I'm supposed to fly to PyCon tomorrow, and a new kernel on the machine is just not a smart idea. So I'm going to just leave it the way it is an try to fix it when I get back. If anyone can explain to me *why* the network interfaces switched or more importantly, how I can switch them back, I'd really appreciate a comment.

Time to pack for PyCon now...

[22:44] | [computers/operating_systems/linux] | # | TB | F | G | 2 Comments | Other blogs commenting on this post

twl JPG


Ted Leung FOAF Explorer

I work at the Open Source Applications Foundation (OSAF).
The opinions expressed here are entirely my own, not those of my employer.

Creative Commons License
This work is licensed under a Creative Commons License.

Now available!
Professional XML Development with Apache Tools : Xerces, Xalan, FOP, Cocoon, Axis, Xindice
Technorati Profile
PGP Key Fingerprint
My del.icio.us Bookmarks
My Flickr Photos

RSS 2.0 xml GIF
Comments (RSS 2.0) xml GIF
Atom 0.3 feed
Feedburner'ed RSS feed

< January 2006 >
1 2 3 4 5 6 7
8 91011121314


Macintosh Tips and Tricks

Blogs nearby
geourl PNG

/ (1567)
  books/ (33)
  computers/ (62)
    hardware/ (15)
    internet/ (58)
      mail/ (11)
      microcontent/ (58)
      weblogs/ (174)
        pyblosxom/ (36)
      www/ (25)
    open_source/ (145)
      asf/ (53)
      osaf/ (32)
        chandler/ (35)
        cosmo/ (1)
    operating_systems/ (16)
      linux/ (9)
        debian/ (15)
        ubuntu/ (2)
      macosx/ (101)
        tips/ (25)
      windows_xp/ (4)
    programming/ (156)
      clr/ (1)
      dotnet/ (13)
      java/ (71)
        eclipse/ (22)
      lisp/ (34)
      python/ (86)
      smalltalk/ (4)
      xml/ (18)
    research/ (1)
    security/ (4)
    wireless/ (1)
  culture/ (10)
    film/ (8)
    music/ (6)
  education/ (13)
  family/ (17)
  gadgets/ (24)
  misc/ (47)
  people/ (18)
  photography/ (25)
    pictures/ (12)
  places/ (3)
    us/ (0)
      wa/ (2)
        bainbridge_island/ (17)
        seattle/ (13)
  skating/ (6)
  society/ (20)

[Valid RSS]

del.icio.us linkblog



Listed on BlogShares

Locations of visitors to this page
Where are visitors to this page?

pyblosxom GIF