new disk drive: how to copy OS?

new disk drive: how to copy OS?

Post by Roger N. Clar » Tue, 06 Aug 2002 02:35:18



When I get a new disk drive, say a larger
capacity one so it's not a track-for track duplicate,
what is the best procedure for copying the op sys,
dev and special files and the data in each partition
to the new drive and then boot from the new drive
(after physically removing the old drive)?
Some are single, others dual boot systems, but I know
how to do the windows systems (I use tar!).
I don't see an option in linux tar to do device and
special files.  I'm using Red Hat 7.2, 7.3.

Thanks in advance
Roger

 
 
 

new disk drive: how to copy OS?

Post by mjt » Tue, 06 Aug 2002 02:39:32


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message


> When I get a new disk drive, say a larger
> capacity one so it's not a track-for track duplicate,
> what is the best procedure for copying the op sys,
> dev and special files and the data in each partition

... http://www.partimage.org/
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Michael J. Tobler: motorcyclist, surfer,  #    Black holes result
 skydiver, and author: "Inside Linux",     #   when God divides the  
 "C++ HowTo", "C++ Unleashed"              #     universe by zero

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9TWaLtTveLPAHcDIRAjaVAJ9JIIumXCnNqi0+8Eef5W1H4v8Y1gCfXDjt
wYbCpB99Zvibtt32/TwktlM=
=/uwG
-----END PGP SIGNATURE-----

 
 
 

new disk drive: how to copy OS?

Post by Peter T. Breue » Tue, 06 Aug 2002 02:56:00



Quote:> When I get a new disk drive, say a larger
> capacity one so it's not a track-for track duplicate,
> what is the best procedure for copying the op sys,
> dev and special files and the data in each partition
> to the new drive and then boot from the new drive

See the Partition HOWTO and various others.

Quote:> (after physically removing the old drive)?
> Some are single, others dual boot systems, but I know
> how to do the windows systems (I use tar!).
> I don't see an option in linux tar to do device and
> special files.  I'm using Red Hat 7.2, 7.3.

You don't need one. Yes, tar is the way to go. The usual
flags are cvpl.

Peter

 
 
 

new disk drive: how to copy OS?

Post by Nico Kadel-Garci » Tue, 06 Aug 2002 04:04:12




Quote:> When I get a new disk drive, say a larger
> capacity one so it's not a track-for track duplicate,
> what is the best procedure for copying the op sys,
> dev and special files and the data in each partition
> to the new drive and then boot from the new drive
> (after physically removing the old drive)?
> Some are single, others dual boot systems, but I know
> how to do the windows systems (I use tar!).
> I don't see an option in linux tar to do device and
> special files.  I'm using Red Hat 7.2, 7.3.

Modern GNU tar does these automatically.

Review the partitioning you want. Build the partitions and mount the drives
there the way you want in a /mnt/newdisk directory. Do a careful set of
these style commands, for example for your mounted partitions /, /var/, and
/home.

    tar -l -cf - -C / | tar xf - -C /mnt/newdisk
    tar -l -cf - -C /var | tar xf - -C /mnt/newdisk
    tar -l -cf - -C /home | tar xf - -C /mnt/newdisk

Rebuilding the /proc and /dev/[whatever] mount points is left as an exercise
for the reader.

Edit /mnt/newdisk/etc/fstab to be whatever you want, and use the "tune2fs -L
/mountpoint" commands to create mountable widgets for them. Edit
/mnt/newdisk/etc/mtab to match.

When done, do a "chroot" to the /mnt/newdisk/, and use "lilo" or "grub" to
create your new MBR wherever you need to put it.

Then yank out your disk and be done with it.

 
 
 

new disk drive: how to copy OS?

Post by Roger N. Clar » Tue, 06 Aug 2002 13:12:30


Thanks!



> > When I get a new disk drive, say a larger
> > capacity one so it's not a track-for track duplicate,
> > what is the best procedure for copying the op sys,
> > dev and special files and the data in each partition
> > to the new drive and then boot from the new drive
> > (after physically removing the old drive)?
> > Some are single, others dual boot systems, but I know
> > how to do the windows systems (I use tar!).
> > I don't see an option in linux tar to do device and
> > special files.  I'm using Red Hat 7.2, 7.3.

> Modern GNU tar does these automatically.

> Review the partitioning you want. Build the partitions and mount the drives
> there the way you want in a /mnt/newdisk directory. Do a careful set of
> these style commands, for example for your mounted partitions /, /var/, and
> /home.

>     tar -l -cf - -C / | tar xf - -C /mnt/newdisk
>     tar -l -cf - -C /var | tar xf - -C /mnt/newdisk
>     tar -l -cf - -C /home | tar xf - -C /mnt/newdisk

> Rebuilding the /proc and /dev/[whatever] mount points is left as an exercise
> for the reader.

> Edit /mnt/newdisk/etc/fstab to be whatever you want, and use the "tune2fs -L
> /mountpoint" commands to create mountable widgets for them. Edit
> /mnt/newdisk/etc/mtab to match.

> When done, do a "chroot" to the /mnt/newdisk/, and use "lilo" or "grub" to
> create your new MBR wherever you need to put it.

> Then yank out your disk and be done with it.

 
 
 

new disk drive: how to copy OS?

Post by Vilmos Sot » Tue, 06 Aug 2002 14:40:54



Quote:> When I get a new disk drive, say a larger
> capacity one so it's not a track-for track duplicate,
> what is the best procedure for copying the op sys,
> dev and special files and the data in each partition
> to the new drive and then boot from the new drive
> (after physically removing the old drive)?
> Some are single, others dual boot systems, but I know
> how to do the windows systems (I use tar!).
> I don't see an option in linux tar to do device and
> special files.  I'm using Red Hat 7.2, 7.3.

man cp, and look for the -a and -x options.

Vilmos

 
 
 

1. New HDD copy; using "Drive Copy" program (W98) to dupe Linux

Hello Linux Folks,

I've got RH5.1 Linux & W98 on the same West. Dig. 4GB drive,
and would like to copy all partitions & data to a new Maxtor 5.7GB
drive using "Drive Copy" program under W98.  

I'm not expecting trouble getting it going in terms of CMOS settings,
or in terms of W98.  I am worried, however, about exactly which
files or other changes need to be made in Linux in order to be able
to successfully boot to the newly copied drive of a different size.

I have ver. 2.0 of Drive Copy, which claims to support copying
Linux partitions & data.

I'm fairly new to Linux, so please assume newbie-speak in
your responses ; )

Many, many thanks for your kindness in responding.

Sincerely,

2. YDL 2.3 is great

3. Java on Linux config Q.

4. disk mirror expansion?

5. Replacing Hard Disk - Copying Linux system to new Hard Disk ????

6. Linux PCI driver

7. copying os x from drive to another

8. copy rootvg to new disk

9. how do I copy a new kernel from install disk to my installation

10. New hard disk - How to copy existing system over?

11. HOW TO COPY AN OLD DISK TO A NEW ?