Re: How do I clone a Linux install to larger / and /home partitions (using Partimage images)?



On Sun, 29 Jul 2007 14:53:14 -0400, Robert Glueck wrote:

I swapped the internal HDD in my laptop for a larger one and
migrated my Linux OS by making images of the / and /home
partitions with partimage and then restoring these images to
the new partitions.

The partimage documentation states that one can restore an
image to a partition that is larger than the original
filesystem size but that space may be lost or become
unavailable doing this.

I want / and /home to live in larger partitions than they
did on the old drive. Hence, I first created larger
partitions for them on the new drive and then tried to
shrink them to the exact same size as the partitions on the
old drive, so as to make the partimage restore operation
appear identical to a restore to the old partitions which
had always worked well. Once that was done, I planned to
expand the new partitions and grow the file systems to the
larger sizes that I'd originally set aside, using GParted.

Shrinking the newly created partitions to the exact same
size (down to the last sector) as the old partitions turned
out to be impossible to do with GParted. I could have
probably done it with fdisk or parted but didn't know how
to. The best I could do was to make these new partitions a
wee bit larger than the old ones. The exact specs are as
follows:

Old partitions:
/ 9.83 GiB 20611269 sectors
/home 20.50 GiB 42989877 sectors

New partitions:
/ 9.84 GiB 20627460 sectors
/home 20.51 GiB 43006005 sectors

The restored OS boots and runs fine on the new drive with
this configuration. I had planned to use GParted to grow
these partitions to the larger sizes for which I had set
aside contiguous space (at the ends of the current smaller
partitions).

However, I'm uncertain about the status of those couple of
ten thousand sectors by which the current partitions are
larger than the respective file systems (both of these are
reiserfs, i.e. reiser3). If I expand the partitions and
grow the filesystems, is there going to be a hole in the
file system or partition that could cause problems, e.g.
corrupt the file system?

How should I handle this situation?

Thanks for your help.

Robert

My suggestion: boot a Gparted Live CD and use that to resize them after
they are restored.

.



Relevant Pages

  • Re: System Volume Information Wont Die
    ... The SVI folders I'm talking about came from the merged partitions, i.e., ... SVI folder and delete them all. ... Do all partitioning and restore the saved files to the ... Restore tab in Control Panel to be sure that System Restore really was ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: image a disk/partition?
    ... >restore them, either completely or just a few first partitions. ... To backup any of my partitions I use the following command, ... believe this is because I zero the drives before turning them into test ...
    (freebsd-questions)
  • Re: ASR - XP Pro q
    ... before the recovery starts. ... "Everything" and reformat it's partitions also. ... that the law requires the consumer be able to restore the computer back to ... The consumer should NOT have to purchase a restore tool, a tape backup unit, ...
    (microsoft.public.windowsxp.general)
  • Re: Out of Disk Space SBS2003
    ... Restoring from tape to larger partitions should be fine. ... You dont really have to update the server too extensively when running the restore stage as this will overwrite everything, though I tend to put any major service pack on if available. ... On the Exchange side you can move the databases really easily. ...
    (microsoft.public.windows.server.sbs)
  • Re: Cloning CompactFlash image
    ... When you clone the image on a different CF card, did you verify the result CF content? ... Did you see the partitions created with proper FS and file&directory structure of your image? ... verify that the system partition in your design is marked as active on the new CF card after you restore the image on it. ... > connect the systems to a network, and doesn't matter the SID problem. ...
    (microsoft.public.windowsxp.embedded)