Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #237337

Repair partition after dd

From Andrea Neroni <bignero_86@yahoo.it>
Newsgroups linux.debian.user
Subject Repair partition after dd
Date 2021-07-14 00:40 +0200
Message-ID <CAzeh-7PR-5@gated-at.bofh.it> (permalink)
References <CAzei-7PR-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi all,
While preparing a bootable USB a wild dd command was executed on the wrong partition, namely on /dev/sda5 instead of the intended /dev/sdb.The consequences are easy to imagine. However, as the start of the disk has not been touched (the command run on sda5) I still have some hope to be able to recover part of the data before wiping out the disk and reinstalling (the overwritten portion of the disk is very small).
Running fdisk on /dev/sda yields the following:
> fdisk -l /dev/sdaDisk /dev/sda: 596.17 GiB, 640135028736 bytes, 1250263728 sectorsDisk model: SAMSUNG HM641JI Units: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0x3d27ec68
Device     Boot   Start        End    Sectors   Size Id Type/dev/sda1  *       2048    1050623    1048576   512M  b W95 FAT32/dev/sda2       1052670 1250263039 1249210370 595.7G  5 Extended/dev/sda5       1052672 1250263039 1249210368 595.7G 83 Linux

The partition table should be intact, sda5 is a partition inside the extended sda2. The partition should be Ext4.

Question: having those information, is it possible to repair the partition to a state where I can copy away as much data I can and how can I do it?
Thanks to everybody!

Andrea
PS: yes, I know, data should have been backed up. Lesson learned.

Back to linux.debian.user | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Repair partition after dd Andrea Neroni <bignero_86@yahoo.it> - 2021-07-14 00:40 +0200
  Re: Repair partition after dd songbird <songbird@anthive.com> - 2021-07-14 04:50 +0200
    Re: Repair partition after dd <tomas@tuxteam.de> - 2021-07-14 09:00 +0200
      Re: Repair partition after dd "Alexander V. Makartsev" <avbetev@gmail.com> - 2021-07-14 09:30 +0200
        Re: Repair partition after dd <tomas@tuxteam.de> - 2021-07-14 09:40 +0200
          Re: Repair partition after dd "Thomas Schmitt" <scdbackup@gmx.net> - 2021-07-14 10:10 +0200
            Re: Repair partition after dd <tomas@tuxteam.de> - 2021-07-14 11:10 +0200
            Re: Repair partition after dd "neroni_andrea@yahoo.it" <neroni_andrea@yahoo.it> - 2021-07-14 13:00 +0200
              Re: Repair partition after dd <tomas@tuxteam.de> - 2021-07-14 13:40 +0200
                Re: Repair partition after dd songbird <songbird@anthive.com> - 2021-07-14 14:50 +0200
  Re: Repair partition after dd "Alexander V. Makartsev" <avbetev@gmail.com> - 2021-07-14 05:50 +0200
  Re: Repair partition after dd Brian <ad44@cityscape.co.uk> - 2021-07-14 12:10 +0200
    Safer ways to write an ISO onto USB stick [was Re: Repair partition after dd] "Thomas Schmitt" <scdbackup@gmx.net> - 2021-07-14 12:50 +0200
      Re: Safer ways to write an ISO onto USB stick [was Re: Repair  partition after dd] David Christensen <dpchrist@holgerdanske.com> - 2021-07-15 02:30 +0200

csiph-web