[plug] imaging HD

Richard Meyer meyerri at au1.ibm.com
Fri Jan 3 10:42:39 WST 2003


----- Forwarded by Richard Meyer/Australia/Contr/IBM on 03/01/2003 10:32 AM
-----
                                                                                                                                    
                      sscott at iinet.net.                                                                                             
                      au                       To:       plug at plug.linux.org.au                                                     
                                               cc:                                                                                  
                      03/01/2003 10:23         Subject:  [plug] imaging HD                                                          
                      AM                                                                                                            
                      Please respond to                                                                                             
                      plug                                                                                                          
                                                                                                                                    
                                                                                                                                    



>Hi all

>Quick scenario: running a firewall/proxy on old temporary box with
>smallish HD, changing out to fairly newish box with big HD. I simply want
>to copy the contents of HD 1 over to HD 2, after creating larger
>partitions on HD 2.

>Will tomsrtbt, a cp command, and lilo command crack this for me?

>Any hints?


No, a cp command is almost guaranteed to mess up hardlinks and /dev
directory. I seem to remember someone advising the use of the tar command
(on the Gauteng Linux User Group list). Sort of like this.

Add new hard drive and create filesystem.
Mount new drive.
cd to new drive
Now, I don't have access to a *nix* machine at work, but it goes something
like this
tar cvfz / | tar xvfz   (but I strongly suggest you look thru the man pages
to prevent the second hard drive from being tarred too, and being passed
thru to the extract side.) (anybody got some time and a second partition to
try this?) Idea is to tar everything on old drive and feed it thru tar to
extract it onto the new drive.

run lilo - writing to new drive obviously (and equally obviously using the
kernel on the new drive).

Cheers
RichardM




More information about the plug mailing list