First a little background information. I'm running Ubuntu 11.10 on an older i386. I noticed one day that I couldn't ssh into my system so I went to check on it. The caps-lock and scroll-lock keyboard lights were flashing so no Alt-SysRq-REISUB. I was forced to push the reset button.
Mount failed after the reboot with lots of parent transid verify failed messages. Lucky for me (or not) it was my home partition so I could still get some system access.
First I installed the latest mainline Ubuntu kernel available here:
To actually get btrfs-tools to compile this is what was required.
If you don't already have git installed:
apt-get install git-core
make a directory for the source and cd into it:
get the source:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
install some compile dependencies (You may need more. Watch for errors during make.):
apt-get install zlib1g-dev libattr1-dev uuid-dev
maybe run this:
apt-get build-dep btrfs-tools
cd into the btrfs-progs source:
compile with make:
make && make btrs-select-super && make btrfs-zero-log
sources (sorry if I missed some):