Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #239288
| From | Ángel <debian-user@debian.16bits.net> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: disk recovery question |
| Date | 2021-08-24 22:30 +0200 |
| Message-ID | <CPLdw-OF-3@gated-at.bofh.it> (permalink) |
| References | <CPLdw-OF-5@gated-at.bofh.it> <CPABw-2pJ-81@gated-at.bofh.it> <CPAL7-2sX-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2021-08-24 at 12:12 +0300, Reco wrote: > Hi. > > On Tue, Aug 24, 2021 at 12:04:40PM +0300, Semih Ozlem wrote: > > I accidentally turned my hard disk to swap (I was using a usb for > > swap, > > when entering the command I wrote the wrong disk id). Can I recover > > the > > disk to its previous form? > > Most of the files are likely were left intact, but the partition > table > is likely to be destroyed. > I suggest doing the usual: > > 1) Immediately copy all disk contents by ddrescue (or equvalent) > elsewhere. > 2) Put the disk in question aside, do not attach it to anything. > 3) Operate on disk copy from pt 1 only. > 4) Install "testdisk" package, and feed your disk image to photorec > (it's > provided by "testdisk"). > > Reco Actually, testdisk itself (not photorec) is probably able to recover the header. mkswap seems to only touch little more than the first 1000 bytes (plus a label). *If* it wasn't actually used as a swap disk (in which case, who knows what might have been overwritten), everything will be there. If you turned into a swap the full disk, and not a partition, then "only" the partition table and/or bootloader will have been overwritten, which should be quite recoverable by testdisk (and reinstalling grub, probably). Good luck
Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread
disk recovery question Semih Ozlem <semihozlemlinuxuser@gmail.com> - 2021-08-24 11:10 +0200
Re: disk recovery question Reco <recoverym4n@enotuniq.net> - 2021-08-24 11:20 +0200
Re: disk recovery question Ángel <debian-user@debian.16bits.net> - 2021-08-24 22:30 +0200
csiph-web