Software :: Repair Missing Partition Table And Recover Data From Xfs?
Jun 15, 2009
I used to have a 1TB external drive with lots of stuff on it. But after a reported drive failure during a F11 install the partition table seems to have been lost. (I think F11 toasted it)
Disk /dev/sdc: 1000.2 GB, 1000215724032 bytes
255 heads, 63 sectors/track, 121602 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
The drive used to have xfs and a partition. Is there any way to rebuild the partition? Or is my 1TB of data gone forever? The drives seem to be fine now... I just want to get it up enough to either pull any data or just to get a file list. Most of the stuff on the drive was from somewhere else.(ie 300GB of NRN data for all of North America.
I was putting the cover back on my Antec p180b, and I guess it got stuck and gave it a hard bump (pretty much broke the cover). As a result, one of my hard drives, a Seagate Barracuda ST3750640AS, got messed up or something. All the other hard drives are fine. It's in an LVM with another hard drive, so now I can't boot up into my computer. So I booted into the installation CD:
# find /dev/sd[a-c][1-3] /dev/sda1 /dev/sda2
This led me to believe the partition was messed up. So I ran cfdisk, and it said something about a missing partition table or something. Additionally, instead of showing the single partition on it, it displays, from my recollection, Pri*Log. To my knowledge, this is the only problem with the hard drive. So now I need to either somehow create or restore the partition table without overwriting the data. Or get a new hard drive, and some how recover the data (LVM, partitions, and all).
Original disk: XP NTFS primary Linux / ext4 logical Linux /home ext4 logical Win 7 NTFS logical NTFS data logical swap space NTFS recovery partition
I tried to install linux, as there was a problem with XP overwriting grub, I chose write grub to /dev/sda8 (which is where the linux install was appearing earlier).
I guess this borked the filesystem somehow. Now the NTFS data partition and the swap space are appearing as one free space. Well actually before that some linux live CDs (including gparted were seeing the entire drive as unpartitioned). I had to go into XP and delete the /ext4 partitions.
Is there any way for me to recover the NTFS data partition ?
I ve got a dual boot, XP and FC 12 on a single harddrive. After defragmentation of NTFS partition (With XP installation) cant'boot linux So, rub statrts with boot menu after selecting linux it tries to load linux but prints out some messages again and again (I do not remember contetn of messages) And these messages are circulating
A few months ago I tried to shrink an NTFS partition using gparted and use the free space to install Haiku. However, gparted crashed in the middle of the resize, leading to a corrupt partition table. I tried to solve the problem myself, using testdisk to detect the partitions. However, the fix is not perfect, and it left me with a partition table that goes "outside" of the disk (i.e. the partition table has allocated more sectors than there actually are on the disk to the last partition).
Recently I need to reinstall Ubuntu Natty, but because the partition table is corrupt, the installer on the Ubuntu Natty Live CD (as well as gparted) see the disk as entirely unpartitioned. What is weird is that the Disk Utility (aka palimpsest), fdisk on my current Natty distro (upgraded from Maverick, which I want to replace with a fresh install), and GRUB 2 see the partitions fine (with some errors, such as listing a few trillion TBs of available space, a result of the corrupt partition table).
I am using an Asus U30Jc laptop with a single 500GB HDD. My current setup is supposed to be like this: /dev/sda1: A hidden FAT32 recovery partition generated by Windows 7, listed as containing Windows Vista by GRUB 2 /dev/sda2: NTFS partition containing Windows 7 (labeled "OS") /dev/sda3: Extended partition containing "DATA", Ubuntu, swap, and the erroneous trillions of TBs of space /dev/sda5: NTFS partition containing user data (labeled "DATA") /dev/sda6: Ext4 partition containing Ubuntu /dev/sda7: swap partition (*Though I'm not supposed to have it, and it isn't listed in /dev while running the Live CD, /dev/sda4 exists as a zero-length partition in the output from sfdisk; not sure why)
Currently I've tried the following: - testdisk, using "deeper search" and writing the partition table back to disk; produced a (usable) partition table that was bad. - [URL], fsck didn't do much at all, except raise various errors on all partitions except the one containing Natty. - [URL], tried to substitute the numbers caljohnsmith gave to thegreat with the corresponding values from my run of fdisk -lu, but because caljohnsmith didn't explain where the values came from and what they meant (no offense to him), I was lost; after the last step (setting the end sector on the extended partition to the last cylinder boundary (which I didn't really understand; tell me if you need details on what I did)), gparted went from showing the trillions of TBs of free space as outside all partitions to showing them as inside the extended partition; this also somehow caused the partitions to overlap.(The error parted raises changed from "Error: Can't have a partition outside the disk!" to "Error: Can't have overlapping partitions.
Running fdisk from the Natty Live CD gives Code: ubuntu@ubuntu:~$ sudo fdisk -lu Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x74ef0aca
Device Boot Start End Blocks Id System /dev/sda1 2048 34812854 17405403+ 1c Hidden W95 FAT32 (LBA) /dev/sda2 * 34812855 279000854 122094000 7 HPFS/NTFS /dev/sda3 279000855 976768064 348883605 f W95 Ext'd (LBA) /dev/sda5 279000918 875204030 298101556+ 7 HPFS/NTFS /dev/sda6 875204608 972859391 48827392 83 Linux /dev/sda7 972861440 976771055 1954808 82 Linux swap / Solaris Running sfdisk -l from the Natty Live CD gives
Code: ubuntu@ubuntu:~$ sudo sfdisk -l /dev/sda Disk /dev/sda: 60801 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sda1 0+ 2166 2167- 17405403+ 1c Hidden W95 FAT32 (LBA) /dev/sda2 * 2167 17366 15200 122094000 7 HPFS/NTFS /dev/sda3 17367 60800 43434 348883605 f W95 Ext'd (LBA) /dev/sda4 0 - 0 0 0 Empty /dev/sda5 17367+ 54478- 37112- 298101556+ 7 HPFS/NTFS /dev/sda6 54478+ 60557- 6079- 48827392 83 Linux /dev/sda7 60557+ 60801- 244- 1954808 82 Linux swap / Solaris
Running parted from the Natty Live CD gives Code: ubuntu@ubuntu:~$ sudo parted /dev/sda print Error: Can't have overlapping partitions.
I opened GParted to create a new partition on a new drive. He wanted me to create a partition table first which I did, and it was created directly without any prompt like im used to see when creating partition. So I recognized too late, that i actually created a MBR on one of my 6 1TB raid5 drives. Not beeing sure if the ne MBR was really written, I have opened ubuntu disk utility and clicked on the check raid button. It directly made a resync. After the resync, mdadm --detail /dev/md0 told me everything is ok and synced. Then I wanted to mount it with:
mount /dev/md0 /mnt Then I get the following error: "mount: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so" I think I just killed my raid5 ;(
I shouldnt work on my server when im tired and when I actually have no time ;( My last hope is the fact, that "Disk Utility" shows that there is a .0 TB ext4 volume on my raid (see screen below) [URL]
Just now I accidentally used gparted and wiped the partition table on my main hard drive, and now fdisk -l shows nothing! How can i recover my partitions and avoid having to reinstall Gentoo all over again?
I accidentially overwrote the first 1M of my harddisk on linux (using dd). So, the partition-table is gone. I can still access all partition (except the first one) using /dev/sda2 (and so on), so the data is still there. I only need the partition boundaries to restore the table. How can I do this? The Linux-Kernel must still know them because all mount-points still work. fdisk -l /dev/sda doesn't work because it acctualy reads the partition table.
Just ran into an uncomfortable problem. I usually never save any documents on my machine, and keep all my stuff on an external USB hard disk. (an 80GB TrekStor DS microdisk q.u) Well yesterday this disk just would not mount. Read through related posts but nothing seemed to work. Even tried it on a Windows machine.
Tried TestDisk utility. Found nothing wrong with the drive, but still could not repair the MBR.log code...
Palimpsest Utility recognized the drive, but just will not let me do anything with it except format it.
How can i repair the partitions and MBR without losing all my data?
Well i have an 20GB HDD (/dev/sdb) formated with ext4 and has very important files on it .All of sudden something went wrong and the 20GB partition has been lost . Now how do i have to recover that partition and primarily recover those files . Gparted shows no partition on it but unpartitioned space .
I erased my partition table. Can anyone recommend a good method of reconstructing it? And if this is impossible, can anyone recommend a good method of data recovery? I had an ntfs partition with windows 7 and a larger ext3 partition that ran Debian.
I'm running Test-disk on the SystemRescueCD at the moment (cross your fingers).
I installed windows 7 over an existing xp partition and windows 7 made a 100 mb partition as some sort of windows swap space thing. This basically made my ubuntu partition unreadable, even with gparted. How to recover this data?
A HP Netserver LP2000r, with original SCSI controller and HP NetRaid-2M controller, 3x 36GB Ultra3 HDD in RAID5, Debian (sarge/etch), has crashed after 992 days without reboot. From all that I can see, a hardware failure, most likely with the memory. The HP Diagnostic tools cannot find any problem, but everytime I boot into Knoppix, I get between 2minutes and 2 hours of runtime, and then either a kernel oops or just a complete and sudden halt.
Well, the box has earned its money. However, there is some data on the drives that I need to recover (yes, I have beaten myself up properly about not backing up that data, don't even go there !). There are three partitions: sda1 is /, sda2 is swap and sda3 is a LVM volume with 3 logical volumes on it. As far as I can tell, the hardware defect must have been creeping in and has made a total mess of the inodes in all these partitions.
After booting into Knoppix, I can restore the volumes using pvscan, vgscan, lvscan, vgcfgrestore and vgchange. If I try and mount them: mayhem. So I try and check them, using fsck.ext3. All sorts of interesting nonsense, such as a completely empty inode 11 (the first inode) and then obviously from there on all else is pointless. I tried using debugfs, but the information on what to do with it is somewhat spurious.
P.S.: Tomorrow I will go and get myself a 16GB Flash Drive and then hopefully I will be able to dump the partitions one by one onto that drive and transfer the images onto a different computer for analysis and data recovery.
I need to mount a bsd/386 partition on my hard drive to recover data. I am running the latest CentOS 5.3, downloaded and installed in the last week.My searches have turned up a mount command, that does not work.
[root@new-host-2 ~]# mount -t ufs -o fstype=444bsd /dev/sda3 /mnt/bsd mount: unknown filesystem type 'ufs' [root@new-host-2 ~]# mount /dev/sda3 /mnt/bsd
So, is there a patch to get mount -t ufs working?is there a patch to get bsd/386 filesystem type? have not build a kernel before, so I would like to avoid that, but I will attempt it if I have no other options.
During a recent request to install fedora 11, I ran into an interesting problem. It seems that between fedora10 and fedora11, the developers switched from fdisk, to parted for creating the initial pre-mke2fs partition table creation.
It looks like the implementation of this is broken, as it's writing the partition table with overlapping cylinder boundaries. While this can sometimes be ignored, it can in certain cases cause significant data corruption.
On an installation I took it through, using the latest installation media, in both manual & automatic partition creation, the layout looked like this:
The last two partitions turn out fine, for some reason. However, those two partitions should not have overlapping cylinders. After my very first installation, the system was completely unbootable, and not even fsck wouldn't rescue it. If this is possible, then that means that a system that's been online for months or even years could simply drop out of functionality simply due to a byte or two of system-critical data falling on that last cylinder. Considering that a lot of the time kernel data ends up on /dev/sda1 (commonly the /boot partition), this is something that should not be ignored.
I used a Kingston 8Gb flash drive as a live usb recently (copied the live iso image over using dd). I am done with the installations and all but seem to have a problem. i cannot format my flash drive. It now shows as a live CD (800 or so mb). Is there a way to fix the partition table back? I guess if i copy a partition table image from some other 8 gb drive that might fix the problem but i dont have any other flash drives. Is there a solution possible or am i stuck with a live usb forever
is there a way to recover data from a hd partition type fat32...cause ...cause right now it shows up as unallocated space..earlier i tried installing windows in a unused partition located just above this partition....i need to recover the data real soon...
I wanted to upgrade from Intrepid to Jaunty. I opted for a format/reinstall as I figured upgrading usually sucks. To save my important data, I resized my partition (partition A), formatted the empty space with ext3 (now partition B), and moved the necessary files from partition A to partition B. Then I went through the install process and installed Jaunty on partition A, telling the installer to NOT format partition B. It gave a warning about the installer deleting system folders (var, usr, etc) but I figured it didn't apply. I was wrong.
So now partition B is "empty." I know it didn't format it, but I need to get those files off of there. I have created an image of partition B using ddrescue, but I don't know where to go from there. I tried using foremost, but it won't recover things like my virtual machines and completely nukes the original file structure I had. And I've tried mounting it (using sudo mount -t ext3 -o loop /home/user/recovery.img /mnt), but that doesn't seem to work. The mount command completes successfully, but nothing shows up in the folder I mounted it to.
Im running ubuntu 10.10 on a dual boot machine together with vista. When I tried to delete a partition in gparted I accidentaly deleted the general partition table so I had to run testdisk on a live cd to restore it. The problem is that once I had done that and rebooted I get the message bootmgr is missing. I suppose Testdisk deleted or overwrote mz grubloader.
a windows installation on a fake-raid, /dev/mapper/ddf1_AR01p1 and an xtra penguinFS on ddf1_AR01p2. I simply tried to boot "Super Grub Virus" from a usb stick ... and the $%!($ER hosed the array. Luckily, my day to day OS and important data is on a different set of disks ... but my BIOS boot target is set to the fake-raid, so it did not kill anything genuinely important ... I just got lucky.
I would really like to restore the windoZe partition as it WAS. I actually use it a couple of times each year. I would just reinstall the OS ... really NOTHING important on those 2 disks, but I have no idea where my XP disk can be found ... but I know the xp installation is hiding in /dev/null ....
I've initialize a virtual disk and deleted the partition table didn't notice that i've done that to the wrong one, data still on the physical hard disks but....how I'll get my data back safe without losing it?
I have a 250 GB external disk, where there was store a hundred and something GB of data. Pictures, music, documents and TV-shows. It was FAT32. In an attemt to make an live USB drive with openSUSE, I did exactly what I shoulden't do: I mistook the external disk for the the USB drive. Now the external disk has a 700 mb linux partition, while 232.2 GB is unpartitioned. TestDisk from CGSecurity is looking to see if there is a lost partition table there, somewhere. Is there anything I can do? There was no formating, so the data is still there (except for those 650 mb that was overwritten). Is there any way to rebuild the old partition?
Output from "fdisk -l":
Disk /dev/sdc: 250.1 GB, 250059350016 bytes 64 heads, 32 sectors/track, 238475 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes
My main partition having all my data like movies, music, files,etc has become inaccessible. Its file system was NTFS. Due to some recent resizing using GParted, the partition as well as my WIndows 7 OS has become unbootable due to some errors. The data partition's file system has become unknown. I don't care much about the OS but I would like to recover my drive. I am trying to achieve this using Testdisk and Photorec but haven't met with much success so far. The main problem is I can see my partition and all my files through Testdisk but I am not able to copy them to another drive. When I try to copy the option I get is of copying them to the DVD and not to any other partition.
I am facing a serious problem.I installed UBUNTU 10.04 and encrypted it during installation. I accidentally erased some of the necessary files from root folder. now the the OS is NOT booting.luckily i still have the encryption key i have some important documents in that drive (desktop folder).
PS: I have tried to run Live Ubuntu it shows the Root, but it does not enter any of the folder.