partition fixing

Michael Cohen michael.cohen at netspeed.com.au
Tue Dec 5 09:00:43 CST 2006


Ben,
  That sounds rather odd. You are correct in your assumption that the disks
  should be identical. In fact after you verify that the new disk works ok you
  can resize the last partition to take advantage of the rest of the disk. 

  By the sounds of things it is possible that the dd did not complete properly
  - possibly aborting due to errors. As mentioned previously by another poster
  you could add the conv=noerror,sync to ensure it does not quit half way.

  The primary partition table resides near the begining on the disk (at the
  first 63 sectors). It contains a pointer to the extended partition which
  resides somewhere else on the disk. The extended partition is a whole other
  partition table which contains sda5.

  In your case, you seem to have the primary partition table ok, but you are
  missing the extended partition. This is most likely because it has not been
  copied properly. If it worked I would expect to see the extended partition
  being identical on both disks.

  Did you note how many bytes dd reported it copied at the end? If you find
  that the dd quit earlier I would be tempted to use dd_rescue or similar to
  recover as much as possible of damaged sectors. dd_rescue has an algorithm
  which allows it to try to read smaller and smaller buffers around the damage
  in order to recover as much as possible.

  Michael.
  
On Tue, Dec 05, 2006 at 06:32:05PM +1030, Ben Williams wrote:
> On 5/12/2006 6:19 PM, Peter Childs wrote:
> >You could use sfdisk to dump the partition table from old disk to new
> >disk.   Strange that the 'old' disk partition table is ok, but the new
> >isn't ??    Same sized disks etc??
> 
> No - the new disk is 320Gb, the old disk is 160Gb. Therein, I believe, 
> is the rub. I was under the (evidently) mistaken belief that overwriting 
> the partition table would simply render anything on the new disk larger 
> than the 160Gb of the old disk unusable - which I was perfectly happy 
> with. However, it didn't work like that.
> 
>  - Ben
> 
> -- 
> "If you made a Venn diagram [of my life], there would be two 
> non-overlapping circles, one of which was labeled, 'Times when I am 
> truly happy' and the other of which was labeled, 'Times when I am logged 
> in as root, holding a cable, or have the case open.' "
>  - Jamie Zawinski [jwz.org]
> 
> 
> >man sfdisk
> >
> > -d     Dump the partitions of a device in a format useful as input to
> >sfdisk. For example,
> >                  % sfdisk -d /dev/hda > hda.out
> >                  % sfdisk /dev/hda < hda.out
> >
> >
> >On Tue, 2006-12-05 at 17:22 +1030, Ben Williams wrote:
> >>On 5/12/2006 5:19 PM, steve at openoz.net wrote:
> >>>You did boot up with a copy of Knoppix? (or your fav boot recovery disc)
> >>>
> >>>Then you dd'd the drives?
> >>That is entirely correct - I used Knoppix 5.0 (fresh off Internode's 
> >>mirror).
> >>
> >>  - Ben
> >>
> >>
> >>-- 
> >>"If you made a Venn diagram [of my life], there would be two 
> >>non-overlapping circles, one of which was labeled, 'Times when I am 
> >>truly happy' and the other of which was labeled, 'Times when I am logged 
> >>in as root, holding a cable, or have the case open.' "
> >>  - Jamie Zawinski [jwz.org]
> >
> >
> 
> -- 
> LinuxSA WWW: http://www.linuxsa.org.au/ IRC: #linuxsa on irc.freenode.net
> To unsubscribe or change your options:
>  http://www.netcraft.com.au/mailman/listinfo/linuxsa


More information about the linuxsa mailing list