Page 1 of 2

how to write new partition table?

Posted: 05 Apr 2015, 15:19
by dacq
I have an old hard drive, on which I created one extended partition. In order, it contained a 1.7Gb swap partition, 3 partitions for 3 linux operating systems and another partition for my data. Later I removed the first 2 linux partitions, filling its place with a new linx system. I then tried to burn a 1.7Gb linux iso file to my USB stick. However, it wrote the contents to that old hard drive.

I then used testdisk which found a FAT12 volume at the beginning, presumably the contents of that iso file, followed by the 2 linux operating systems and the data partition. I requsted to replace the FAT12 volume with a swap partition and requested to have the new partition table written. This changed nothing, however. What do I need to do to write it? In one of the main menus is the option 'Write Testdisk MBR code to first sector'. Was I supposed to have used this too?

I don't know if the original swap partition was bigger than the contents of the iso file.

Re: how to write new partition table?

Posted: 07 Apr 2015, 07:14
by cgrenier
For each partition found, use 'p' to list the content. If your files are listed, you should be able to access them.
Pleas epost the testdisk.log file content if you have problems.

Re: how to write new partition table?

Posted: 07 Apr 2015, 20:57
by dacq
Yes, I've been able to list my files but, as I say, it wouldn't write the new partition table.

http://curezone.com/upload/Doc/cwl/testdisklog.txt

Re: how to write new partition table?

Posted: 10 Apr 2015, 19:48
by dacq
Do you understand what happened? I need to know.

Re: how to write new partition table?

Posted: 11 Apr 2015, 18:41
by dacq
The original swap partition was smaller than the contents of the burned iso file, which is now a FAT12 volume.

When the 1.7Gb iso file was written to the hard drive it was a bootable drive. I requested Testdisk to replace the FAT12 volume with a swap partition and requested to have the new partition table written. Is anything else needed to change the boot sector?

Re: how to write new partition table?

Posted: 15 Apr 2015, 06:53
by cgrenier
Reinstall Grub on the MBR, this should remove the trace of the FAT12 boot code sector

Re: how to write new partition table?

Posted: 15 Apr 2015, 21:28
by dacq
I have recovered my files using Testdisk's copy function. I didn't see it earlier. Thanks.

Re: how to write new partition table?

Posted: 15 Apr 2015, 22:35
by dacq
Do you suggest installing grub before or after writing the partition table?

Re: how to write new partition table?

Posted: 19 Apr 2015, 09:34
by Fiona
TestDisk works partition table standard!
So it makes only one partition bootable.
A bootmanager like GRUB modifies your partition table to boot from another partition too.
That's why you should reinstall GRUB after partition recovery to get your multiboot back.

Fiona

Re: how to write new partition table?

Posted: 22 Apr 2015, 12:30
by dacq
If I use partitioning software to create one new partition (which covers the whole hard drive) can I then use Testdisk to recover my original partitions?