I accidentally deleted a very important EXT4 partition

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Post Reply
User avatar
Leon8200
Level 2
Level 2
Posts: 69
Joined: Sat Nov 21, 2015 11:15 am

I accidentally deleted a very important EXT4 partition

Post by Leon8200 »

Hi guy's, so I installed peppermint the other day on my slave HDD, and during the install somehow my backup partition on my master HDD got deleted, I didn't touch it or anything so it the data should still be intact
does anyone know how I can recover the lost partition :(
here is a pic, and the partition was placed from 84297728 - 156312575
here is a pic, and the partition was placed from 84297728 - 156312575
Image
Cosmo.
Level 23
Level 23
Posts: 17817
Joined: Sat Dec 06, 2014 7:34 am

Re: I accidentally deleted a very important EXT4 partition

Post by Cosmo. »

Install testdisk from the repositories. Good luck. (No idea, how you managed to remove a partition by installing a software.)
User avatar
Leon8200
Level 2
Level 2
Posts: 69
Joined: Sat Nov 21, 2015 11:15 am

Re: I accidentally deleted a very important EXT4 partition

Post by Leon8200 »

Cosmo. wrote:Install testdisk from the repositories. Good luck. (No idea, how you managed to remove a partition by installing a software.)
thanx for the reply Cosmo, I'm not sure how to use this software, I'm stuck at this part

Code: Select all

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org


Disk /dev/sda - 80 GB / 74 GiB - ST3808110AS                  41N3267 LEN

Please select the partition table type, press Enter when done.
 [Intel  ] Intel/PC partition
 [EFI GPT] EFI GPT partition map (Mac i386, some x86_64...)
 [Humax  ] Humax partition table
 [Mac    ] Apple partition map
 [None   ] Non partitioned media
 [Sun    ] Sun Solaris partition
>[XBox   ] XBox partition
 [Return ] Return to disk selection




Note: Do NOT select 'None' for media with only a single partition. It's very
rare for a drive to be 'Non-partitioned'.
and I'm not sure if this software is up to the task, the software says it's for EXT2 and EXT3 partition's, and says nothing about EXT4.
Image
Laurent85
Level 16
Level 16
Posts: 6937
Joined: Tue May 26, 2015 10:11 am

Re: I accidentally deleted a very important EXT4 partition

Post by Laurent85 »

Hi Leon8200,
Ext4 too, see for yourself, http://www.cgsecurity.org/wiki/TestDisk
Filesystems
TestDisk can find lost partitions for all of these file systems:

BeFS ( BeOS )
BSD disklabel ( FreeBSD/OpenBSD/NetBSD )
CramFS, Compressed File System
DOS/Windows FAT12, FAT16 and FAT32
XBox FATX
Windows exFAT
HFS, HFS+ and HFSX, Hierarchical File System
JFS, IBM's Journaled File System
Linux btrfs
Linux ext2, ext3 and ext4
Linux GFS2
Linux LUKS encrypted partition
Linux RAID md 0.9/1.0/1.1/1.2
RAID 1: mirroring
RAID 4: striped array with parity device
RAID 5: striped array with distributed parity information
RAID 6: striped array with distributed dual redundancy information
Linux Swap (versions 1 and 2)
LVM and LVM2, Linux Logical Volume Manager
Mac partition map
Novell Storage Services NSS
NTFS ( Windows NT/2000/XP/2003/Vista/2008/7 )
ReiserFS 3.5, 3.6 and 4
Sun Solaris i386 disklabel
Unix File System UFS and UFS2 (Sun/BSD/...)
XFS, SGI's Journaled File System
Wii WBFS
Sun ZFS
Image
kwisher
Level 5
Level 5
Posts: 780
Joined: Wed Mar 05, 2008 12:54 pm
Location: Greentown, Indiana USA

Re: I accidentally deleted a very important EXT4 partition

Post by kwisher »

I would highly suggest making a disk image of the disk you are working on BEFORE attempting any type of recovery. There are a lot of how-to web resources on how to use testdisk.
The instructions suggested Windows XP or better, so I installed Linux :)
User avatar
Leon8200
Level 2
Level 2
Posts: 69
Joined: Sat Nov 21, 2015 11:15 am

Re: I accidentally deleted a very important EXT4 partition

Post by Leon8200 »

thanx for the reply guy's I already tried to recover the partition, what the software did is it "WAS" supposed to place my files in my "document's" folder but instead it just tossed'em in the filesystem folder, I had to reboot my PC and when I booted my HDD that has mint installed I got a boot error saying "error: no such partition grub rescue" so I booted into peppermint from my slave HDD and tried to access mint that is on my master, and I can't gain access to my home folder to access the data that was recovered, I'm afraid to install testdisk on peppermint as it did NOT place the files in my "document's" folder as I told it to do, and screwed up my mint, so I don't know what to do now, any advice guys ? :(

BTW I could care less about the mint installation, I can reinstall later, I only care about the recovered data in the installation
Image
kwisher
Level 5
Level 5
Posts: 780
Joined: Wed Mar 05, 2008 12:54 pm
Location: Greentown, Indiana USA

Re: I accidentally deleted a very important EXT4 partition

Post by kwisher »

Sounds like a permissions problem. Either try changing the perm's on the recovered files to your user or just boot to a live boot and copy the files to somewhere safe.
The instructions suggested Windows XP or better, so I installed Linux :)
User avatar
Leon8200
Level 2
Level 2
Posts: 69
Joined: Sat Nov 21, 2015 11:15 am

Re: I accidentally deleted a very important EXT4 partition

Post by Leon8200 »

kwisher wrote:Sounds like a permissions problem. Either try changing the perm's on the recovered files to your user or just boot to a live boot and copy the files to somewhere safe.
I have found them, they are in my "home" folder when I click it I see a folder with my name on it and when I click that I see the icon
"access-your-private-data.desktop" and when I click it a window pop's up but closes's so fast that I can't tell what the window would say
Last edited by Leon8200 on Sat Jan 16, 2016 2:37 pm, edited 1 time in total.
Image
User avatar
austin.texas
Level 20
Level 20
Posts: 12046
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: I accidentally deleted a very important EXT4 partition

Post by austin.texas »

Leon8200 wrote:when I booted my HDD that has mint installed I got a boot error saying "error: no such partition grub rescue" so I booted into peppermint from my slave HDD and tried to access mint that is on my master, and I can't gain access to my home folder to access the data that was recovered
First, the data partition "disappeared" and now the Mint partition results in "error: no such partition grub rescue". There is something seriously wrong with that hard drive.
I would say this is important, before the drive fails completely:
kwisher wrote:I would highly suggest making a disk image of the disk you are working on BEFORE attempting any type of recovery.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
Leon8200
Level 2
Level 2
Posts: 69
Joined: Sat Nov 21, 2015 11:15 am

Re: I accidentally deleted a very important EXT4 partition

Post by Leon8200 »

austin.texas wrote:
Leon8200 wrote:when I booted my HDD that has mint installed I got a boot error saying "error: no such partition grub rescue" so I booted into peppermint from my slave HDD and tried to access mint that is on my master, and I can't gain access to my home folder to access the data that was recovered
First, the data partition "disappeared" and now the Mint partition results in "error: no such partition grub rescue". There is something seriously wrong with that hard drive.
I would say this is important, before the drive fails completely:
kwisher wrote:I would highly suggest making a disk image of the disk you are working on BEFORE attempting any type of recovery.
that would explain a lot, thank's for pointing that out Austin.texas
Image
User avatar
Leon8200
Level 2
Level 2
Posts: 69
Joined: Sat Nov 21, 2015 11:15 am

Re: I accidentally deleted a very important EXT4 partition

Post by Leon8200 »

I installed testdisk on peppermint, I think the software is defective, I don't know what else to say, it just does not do anything,
is there a different software that I can use to recover this partition?
Image
kwisher
Level 5
Level 5
Posts: 780
Joined: Wed Mar 05, 2008 12:54 pm
Location: Greentown, Indiana USA

Re: I accidentally deleted a very important EXT4 partition

Post by kwisher »

Testdisk is not defective but it is not very intuitive to use. There are numerous tutorials online to show you how to recover your files. I hate to sound harsh here but this wouldn't have been a problem if you had a proper backup in place. Any time you mess with hard drive partitions you run the risk of loosing data and that includes installing an operating system.
The instructions suggested Windows XP or better, so I installed Linux :)
Cosmo.
Level 23
Level 23
Posts: 17817
Joined: Sat Dec 06, 2014 7:34 am

Re: I accidentally deleted a very important EXT4 partition

Post by Cosmo. »

Did you read this? kwisher is right in his comment: You now pay the price for not backing up.
User avatar
MtnDewManiac
Level 6
Level 6
Posts: 1478
Joined: Fri Feb 22, 2013 5:18 pm
Location: United States

Re: I accidentally deleted a very important EXT4 partition

Post by MtnDewManiac »

A couple of questions:

Are you SURE that the deleted partition still exists? Might you have installed your web-centric OS to it? Usually (okay, always) when I'm installing a distro and delete an existing partition, it's because that's the place on the hard drive where I am placing the new OS. (And, yes, I once deleted the wrong one, lol - took me a minute to figure out why I still only had one OS instead of two).

Secondly...
Leon8200 wrote:somehow my backup partition on my master HDD got deleted
Someone will probably stop by and state (if they haven't already) how a good backup is stored off-site, or at least on a separate device (kept away from the system that was backed up). But what I'm wondering...

...is why you don't just back the stuff up again? Yes, backing up a multi-terabyte system takes time - but so does file recovery, lol. You don't have to worry about searching through lots and lots of incomplete files with an editor trying to salvage bits and pieces; once you define the parameters and start it, creating a back up of your files is automatic.

It'd be different if you managed to pooch both your backup AND the original files. That would (likely) change the situation from feeling silly about having to do a complete backup again (instead of the regular incremental ones)... to quietly weeping in a corner :wink: .

Regards,
MDM
Mint 18 Xfce 4.12.

If guns kill people, then pencils misspell words, cars make people drive drunk, and spoons made Rosie O'Donnell fat.
Post Reply

Return to “Other topics”