Well thanks oldfred for your fast answers. but actually you do not answer my questions. is it that you don't know how to declare the other partitions or do you just don't understand what i mean?
(no offence, im glad for everybody who helps!)
Well thanks oldfred for your fast answers. but actually you do not answer my questions. is it that you don't know how to declare the other partitions or do you just don't understand what i mean?
(no offence, im glad for everybody who helps!)
And a new problem appears: i cannot declare a partition as "D". And if I declare the bigger Linux partition as "L" it says: "structure bad"
looking at your testdisk partition lay out, there is a problem with all partitions start right after the end of one before it. For a logic volume there normally at a minimum one to 63 sector between them for its extended boot record. The extended boot record can be in any unused sector but that is not normal and testdisk will not be able to fix it. that is the reason you get a error when trying to assign the Linux partition as a logical volume
It is possible the hdd was a GPT or hybrid partition table. To verify the possibility, start testdisk and get to the posting you made of the linux partitions directory listing. Use arrow key and move to the line with 'boot' and press enter. Does the new listing have a 'EFI' directory ? (it would be boot/efi) If it does then linux was install as a GPT partition and booted in EFI mode. If so will have to look at /boot/grub/grub.cfg to see if Win 7 might have been installed in EFI mode.
I have no information on what to do if the hdd was converted from GPT to MBR partitioning.
Thanks for your answer. Actually i cant find a EFI-directory..
i also included the grub.cfg file:
http://we.tl/rr3bt5OIsW
thanks in advance
I do not know why it is saying structure is bad. That usually is where the combination of partitions you have selected overlap in some way. But it does not look that way to me. But I have never actually recovered a partition.
I do not think you had UEFI with gpt partitioning. Your original screen shot from gparted shows a typical BIOS based Windows install of a 100MB boot partition and a larger c: 'drive'. And swap was in the extended partition with space.
I would backup partition table structure.
Backup partition table to text file & save to external device.
sudo sfdisk -d /dev/sda > PTsda.txt
Then post that text file. It should match the original gparted originally shown.
If not getting good results with testdisk which does work for most, you can try this. Or we can manually create a partition, but it would have been best to have detailed info on partition before it disappeared.
Use parted rescue to restore missing partition details in post #22
http://ubuntuforums.org/showthread.php?t=1775331
http://www.gnu.org/software/parted/m...de/rescue.html
http://gparted.sourceforge.net/faq.php/#faq-22
This really only works if you know start & size of partition.
Caljohnsmith using sfdisk to edit partition table from text file
http://ubuntuforums.org/showthread.php?t=1036600
http://ubuntuforums.org/showthread.php?t=1038943
caljohnsmith and meierfra use sfdisk links:
Exported partition table & reimported to fix with sfdisk.
http://ubuntuforums.org/showthread.php?t=1591704
UEFI boot install & repair info - Regularly Updated :
https://ubuntuforums.org/showthread.php?t=2147295
Please use Thread Tools above first post to change to [Solved] when/if answered completely.
all right, i executed your command and the terminal says:
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
This is the created file:
# partition table of /dev/sda
unit: sectors
/dev/sda1 : start= 2048, size= 24576000, Id=27
/dev/sda2 : start= 24578048, size= 204800, Id= 7, bootable
/dev/sda3 : start= 24782848, size=177991759, Id= 7
/dev/sda4 : start=202776574, size=773994498, Id= 5
/dev/sda5 : start=969066496, size= 7704576, Id=82
And this is what parted tells me:
Model: ATA Hitachi HTS54505 (scsi)
Disk /dev/sda: 976773168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 2048s 24578047s 24576000s primary ntfs diag
2 24578048s 24782847s 204800s primary ntfs boot
3 24782848s 202774606s 177991759s primary ntfs
4 202776574s 976771071s 773994498s extended
5 969066496s 976771071s 7704576s logical linux-swap(v1)
Does this information help you?
As I can remeber, before the crash I had the C: Windows partition (about 90GB), a big Linux one (360GB) and a Rescue partition... This is all i remeber
____
Well i tried this "parted" partition search thing and it found a ext4 partition. here is my new partition table
Model: ATA Hitachi HTS54505 (scsi)
Disk /dev/sda: 976773168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 2048s 24578047s 24576000s primary ntfs diag
2 24578048s 24782847s 204800s primary ntfs boot
3 24782848s 202774606s 177991759s primary ntfs
4 202776574s 976771071s 773994498s extended
6 202776576s 969066495s 766289920s logical ext4
5 969066496s 976771071s 7704576s logical linux-swap(v1)
Is this any good? or did i make it worse?
Last edited by refle; March 28th, 2014 at 07:55 PM.
That looks like it recovered your partition. You may have to reinstall grub or not? Did you try booting?
Not sure if recovery restores same UUID or it becomes a new one. If a new one then you have to restore grub and may have to edit fstab to have correct UUID.
If you need to reinstall grub to MBR then this is probably the easiest way,.
Post the link to the Create BootInfo report. Is part of Boot-Repair:
https://help.ubuntu.com/community/Boot-Info
Boot Repair -Also handles LVM, GPT, separate /boot and UEFI dual boot.:
https://help.ubuntu.com/community/Boot-Repair
If you have to edit UUID in fstab, you will have to mount fstab in your sda6 and change to correct UUID for sda6.
# To clear cache and get new view:
sudo blkid -c /dev/null -o list
If mounted:
sudo umount /dev/sda6
Create mount from live installer:
sudo mkdir /media/temp
sudo mount /dev/sda6 /media/temp -o umask=000
replace UUID from above list with correct one for / (root):
Back up first:
sudo cp /media/temp/etc/fstab /media/temp/etc/fstab.backup
gksu gedit /media/temp /etc/fstab
UEFI boot install & repair info - Regularly Updated :
https://ubuntuforums.org/showthread.php?t=2147295
Please use Thread Tools above first post to change to [Solved] when/if answered completely.
Thanks to all, it's done. I made it And it was thaaat easy.
Summary:
I couldn't reinstall grub because I couldnt mount my linux partition. Most of the websites recommend the tool "TESTDISK", but actually that didn't help. So I used this advice:
http://ubuntuforums.org/showthread.php?t=1775331&page=3 (post #21). (The start and end number I actually got from testdisk but that is all). I could mount my partition, reinstalled grub (https://www.google.de/url?sa=t&rct=j...63808443,d.cWc) and thats it!
Thanks to all!
However, I would like to avoid sh* like that, so I post you my gparted-partitions. Can you tell me if this is a mess or if I can live with it?
I think those partitions are fine.
The main issue often is Windows does not correctly see Linux partitions and if it rewrites partition table it will leave out Linux partition(s) in an extended partition.
You can and should document partition structure with sfdisk or Boot-Repair printout before any major changes. And of course good backups of both Windows & Ubuntu data. Since Ubuntu is easy to reinstall I prefer to just backup data with Ubuntu and reinstall if necessary.
I also prefer with my desktop to have a Windows drive (now obsolete) and Linux installed on ever other drive. But if a laptop you often only have one drive. You can use an external drive but that often is slower because USB ports are not as fast as SATA hard drive connections.
UEFI boot install & repair info - Regularly Updated :
https://ubuntuforums.org/showthread.php?t=2147295
Please use Thread Tools above first post to change to [Solved] when/if answered completely.
Ahhh. I just realized that in the Grub, I now can't chose to boot Windows7!!!
It seems as if the partition cant be accessed.
________________________
I managed it! I used a live-disk (linux). From there I could access my windows partition (i dont know why) and deleted some files (because it was full). I restarted, entered my linux, updated grub (>> sudo update-grub), and thats it. Now it worksssss!
Thank you alot.
@olfred: is there a way to backup all the drivers and programs too without having to backup all the OS?
Last edited by refle; March 29th, 2014 at 05:11 AM.
Bookmarks