On Thu, 31 Oct 2002, 1stFlight wrote:

>  I'm looking for a way to upgrade my HD and maintain file/directory structure.
> I've got a 20GB  with partitions for / /home /usr how can I copy/clone this
> drive over to it's 60B replacement? Thanks!
>
>               Darryl
I wouldn't copy/clone it, I'd make new partitions in proportion, mount
them on new temporary mount points (make  some with mkdir if you
don't have some handy) and use tartar to copy the
filesystems:
tartar / /newslash
tartar /home /newhome
.....

tartar is what I call it, I chose the tar options for just such a use

#!/bin/bash
##copy a directory or partition
tar -C "$1" -cOl . | tar -C "$2" -xpf -


You could use cpio or cp or what you like instead, that is just the way
I would do it.
Some time ago somebody wondered why this did not copy everything in / -
it's not meant to,

Don't forget to reinstall lilo or whatever bootloader you use after
you get the new hd mounted where it is going to go.  have a boot floppy
handy.  You can install lilo in one place to make it work in another,
but I'm not up to explaining how.
--
---oops---

#!/bin/bash
##copy a directory or partition
tar -C "$1" -cOl . | tar -C "$2" -xpf -

Reply via email to