From: Andrei Borzenkov <arvidjaar@gmail.com>
To: "Henk Slager" <eye1tm@gmail.com>, "Maximilian Böhm" <winlux@gmail.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: dd on wrong device, 1.9 GiB from the beginning has been overwritten, how to restore partition?
Date: Mon, 13 Jun 2016 07:51:41 +0300 [thread overview]
Message-ID: <575E3BDD.5000405@gmail.com> (raw)
In-Reply-To: <CAPmG0jZxM65Fn3WsUMEO-EJ8oVEEW7DT=S09q2fLv8cXkoqUGA@mail.gmail.com>
13.06.2016 01:49, Henk Slager пишет:
> On Sun, Jun 12, 2016 at 11:22 PM, Maximilian Böhm <winlux@gmail.com> wrote:
>> Hi there, I did something terribly wrong, all blame on me. I wanted to
>> write to an USB stick but /dev/sdc wasn't the stick in this case but
>> an attached HDD with GPT and an 8 TB btrfs partition…
>
> GPT has a secondary copy at the end of the device, so maybe gdisk can
> reconstruct in first main one at the beginning of the disk, I don't
> know all gdisk commands.
kernel should automatically fall back to secondary GPT if booted with
gpt=1 parameter. Otherwise it is 'x' for expert mode and 'b' to rebuild
primary GPT from secondary copy. Also 'c' to load partition information
from secondary (without writing anything). But note that kernel will
also check for valid PMBR (unless gpt is force with parameter mentioned
above), so you will need yet another 'x' to enter second expert mode and
'n' to create new protective MBR.
next prev parent reply other threads:[~2016-06-13 4:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-12 21:22 dd on wrong device, 1.9 GiB from the beginning has been overwritten, how to restore partition? Maximilian Böhm
2016-06-12 22:15 ` Martin Steigerwald
2016-06-12 22:49 ` Henk Slager
2016-06-13 4:51 ` Andrei Borzenkov [this message]
2016-06-14 14:34 ` Maximilian Böhm
2016-06-20 14:24 ` Maximilian Böhm
2016-06-12 23:02 ` Chris Murphy
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=575E3BDD.5000405@gmail.com \
--to=arvidjaar@gmail.com \
--cc=eye1tm@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=winlux@gmail.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).