Results 1 to 2 of 2
Hello experts - I hope you can help me with this problem: I have to fix a partition table on a HDD (or create one).
Details:
I had a secondary ...
- 04-01-2011 #1Just Joined!
- Join Date
- Apr 2011
- Posts
- 1
How to fix a partition table after restore
Hello experts - I hope you can help me with this problem: I have to fix a partition table on a HDD (or create one).
Details:
I had a secondary HDD fail, in a Windows XP SP2 system (disk E:).
Booting from "Ubuntu Rescue Remix" live CD, I used ddrescue to image that 200GB disk to a new disk (500 GB SATA), without formatting the new disk first - that's according to ddrescue instructions.
The new disk uses a "Promise 4302" IDE-to-SATA PCI controller, since the motherboard doesn't have SATA headers.
The Ubuntu kernel 2.6 recognized the SATA disk and its controller with no problems. So far, all according to instructions. (except that on boot, a little warning crops up: "Incomplete multi-sector transfer, Input/output error"), but then all continues normally.
The problem is, when I boot Win XP, it sees the disk, but Computer Management -> Storage Management shows: Disk1: "unknown partition".
CHKDSK says: "does not have direct access to that volume".
Back to Linux: The restored disk is /dev/sdb.
Running testdisk, it says:
"Partition Start End Size in sectors
P NTFS 0 0 24320 238 390715857 1 63 [DISK2_VOL1]
NTFS, 200GB/186GiB"
(DISK2_VOL1 is the original volume name of the restored disk. 200GB it its original size). So testdisk is able to mount the NTFS file system and browse the directory structure.
"parted" says the partition type is "loop", in other words, no partition table.
When I go:
>ls /dev | grep sd
>/dev/sda
>/dev/sda1
>/dev/sda2
>/dev/sdb
There is no /dev/sdb1.
What to do? Should I go: "parted mklabel msdos"? I don't want to corrupt the data.
Running Gparted: when running Gparted, there is a warning sign with /dev/sdb, and when you click on it, it says: "ntfs resize failed to check 'dev/sdb1' mount state: no such file or directory"
lshw says:
Hardware: HP Pavilion A305W, Trigem Glendale motherboard, CPU: Intel Celeron 2.7 GHz Memory: 2GB DIMM DDR Storage: IDE Intel 82801 (ICH4)
Logical: /dev/sda
/dev/sda1 Volume 0: FAT32 5692 MiB, primary fat initialized
/dev/sda2 Volume 1: NTFS 31 GiB, primary ntfs bootable initialized, modified by chkdsk: true, state: dirty, upgrade on mount: true, resize log file: true, mounted on NT4: true
Logical: /dev/sdb
Promise SATA 300 TX4 disk controller, Disk: Size: 186 GiB, Capacity: 465 GiB, Capability: NTFS initialized, modified by chkdsk: true, state: dirty, upgrade on mount: true, resize log file: true, mounted on NT4: true
IDE CDROMs: 0 and 1
Running fdisk -l on /dev/sdb:
Disk /dev/sdb: 500 GB, 500105249280 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 60802 488392033 83 Linux
Warning: Partition 1 does not end on cylinder boundary
What to do? It seems that I need to fix the partition table, or create a new one. Should I go: "parted mklabel msdos"? I don't want to corrupt the data.
Thanks in advance
Mary G
- 04-06-2011 #2Just Joined!
- Join Date
- Mar 2011
- Location
- Birmingham, UK
- Posts
- 13
I think you'll have to do this again, in a slightly different order.
First create a 200GB partition (or slightly larger) on the 500GB drive, but do NOT format it (waste of time).
Then use ddrescue to copy the data across.
ddrescue does not create partitions, it just copies the data sector by sector. If you don't have an empty partition, it will just write it straight to the device. That in essence creates a partition, but the drive does not have a partition table and that leaves things hanging in open space. It's actually quite surprising that you even got as far as you did get.
If the data is important, then whatever you do, DO NOT BOOT the windows system with the original disk.


Reply With Quote