linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alli Quaknaa <alquaknaa@gmail.com>
To: Alli Quaknaa <alquaknaa@gmail.com>,
	Wengang Wang <wen.gang.wang@oracle.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: Restoring BTRFS partition
Date: Wed, 21 Apr 2010 07:45:27 +0000	[thread overview]
Message-ID: <m2m8c113a261004210045hbba63a41s4f22d5e6fe2e49fe@mail.gmail.com> (raw)
In-Reply-To: <20100421003045.GA10361@flcl.lan>

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

  reply	other threads:[~2010-04-21  7:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 14:56 Restoring BTRFS partition Alli Quaknaa
2010-04-20 15:55 ` Wengang Wang
2010-04-20 16:50   ` Sean Bartell
2010-04-20 17:14     ` Alli Quaknaa
2010-04-20 18:13       ` Alli Quaknaa
2010-04-20 20:30         ` Sean Bartell
2010-04-20 22:25           ` Alli Quaknaa
2010-04-21  0:32             ` Sean Bartell
2010-04-21  7:45               ` Alli Quaknaa [this message]
2010-04-21  2:49     ` Wengang Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2m8c113a261004210045hbba63a41s4f22d5e6fe2e49fe@mail.gmail.com \
    --to=alquaknaa@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wen.gang.wang@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).