From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alli Quaknaa Subject: Re: Restoring BTRFS partition Date: Wed, 21 Apr 2010 07:45:27 +0000 Message-ID: References: <20100420155538.GB3634@laptop.oracle.com> <20100420165049.GA6352@flcl.lan> <20100420203017.GA4532@lelouch.nomadic.ncsu.edu> <20100421003045.GA10361@flcl.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 To: Alli Quaknaa , Wengang Wang , linux-btrfs@vger.kernel.org Return-path: In-Reply-To: <20100421003045.GA10361@flcl.lan> List-ID: Okay, I've got it working! Huge thanks to everybody and especially to Sean for identifying that what I was seeing wasn't the real superblock. So my steps to fix it were (for future generations searching through the archives): 1. Find the real superblock 2. play with dd ibs=1 skip=nnnnnnn for a while to get an image where the checksum is at 0x0 and the _BHRfS_ starts at 0x40 3. create the zeros - dd if=/dev/zero of=pad bs=1 count=65536 4. append the data with dd if=/dev/sda of=pad oflag=append conv=notrunc skip=nnnnnnn ibs=1 ~ that's basically it. Converting the skip offset to some bigger units (512 in my case) helps speed, also some garbage at the end of the file doesn't seem to cause any harm, so if one doesn't know the exact end of the partition, it is better to get some more but not necessary to compute the exact size. al-Quaknaa