[clug] Recovering disk geometry after whole disk dd

Ben Coughlan ben.coughlan at gmail.com
Thu Aug 5 01:37:43 MDT 2010


I think parted or one of it's graphical/curses versions can resize the partitions on the new disk.  Then you can use resizefs (or similar) to resize the actual filesystem.  Just don't make anything smaller, otherwise you'll loose data.

Have a google for resizing partitions.  It's a fairly common task once you know what you're looking for.

Just keep the old disk handy as a backup :)

Ben

On 05/08/2010, at 5:28 PM, Michael Still wrote:

> Hi.
> 
> You might remember my question about copying root file systems to new disks from a week or so ago. Well, I'm home now and had a chance to actually do the deed. I thought I was being terribly clever, and just plugged the new disk in and did a dd from the old disk to the new.
> 
> It turns out I'm not nearly as lucky as I thought. That copy worked, and the machine is functioning again, but in the process I copied the MBR from the old disk to the new disk. This means that fdisk et al now have the wrong geometry for the disk.
> 
> So, this raises new questions:
> 
> - how can I recover the geometry for the new disk?
> - how can I overwrite just the geometry bits of the MBR with the correct information?
> 
> Thanks,
> Mikal
> -- 
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux



More information about the linux mailing list