RE: Copy entire hard disk - how ?

From: Otto Haliburton (ottohaliburton_at_comcast.net)
Date: 08/27/03

  • Next message: David Hart: "Re: [Fwd: [fw-wiz] Stop Using relays.osirusoft.com *NOW*! (fwd)]"
    To: <redhat-list@redhat.com>
    Date: Wed, 27 Aug 2003 07:16:41 -0500
    
    

    Use Parted.

    > -----Original Message-----
    > From: redhat-list-admin@redhat.com [mailto:redhat-list-
    > admin@redhat.com] On Behalf Of Robert C. Paulsen Jr.
    > Sent: Wednesday, August 27, 2003 7:08 AM
    > To: redhat-list@redhat.com
    > Subject: Re: Copy entire hard disk - how ?
    >
    > On Wed, Aug 27, 2003 at 11:39:44AM +0200, Sasa Stupar wrote:
    > > Hi!
    > >
    > > I have for a while installed redhat 8.0. Now I am experiencing some
    > > problems with my hard disk so what I want to do is to copy entire
    > hard
    > > disk to a new one. I don't want to reinstall the system from
    > scratch.
    > > How can I do that ? It is an EIDE HDD.
    > >
    > > Sasa
    >
    > You want to do the copy partition-by-partition. Mount one of the new
    > partitions at some mount point and copy the data from the old to the
    > new. The main trick is to use the "-ax" options on the copy commands.
    > These options cause the copy to...
    >
    > not follow symlinks (copy the link as a link -- don't copy the
    > linked-to file.
    >
    > preserve original files' ownerships, permissions, etc.
    >
    > recursively copy subdirectories
    >
    > *not* recursively copy subdirectories that are mounts of other
    > filesystems (e.g. proc!)
    >
    > So for example if you originally have the following partitions:
    >
    > /dev/hda1 /
    > /dev/hda2 swap
    > /dev/hda3 /boot
    > /dev/hda4 /home
    >
    > Do the following:
    >
    > 1. Make a similar partitioning scheme on the new hard drive
    > (e.g. /dev/hdb).
    >
    > 2. Use mkswap to create the new swapper.
    >
    > 3. Mount and copy the other file systems. For example:
    >
    > mount /dev/hdb1 /mnt
    > cp -ax /* /mnt/
    > umount /mnt
    > mount /dev/hdb3 /mnt
    > cp -ax /boot/* /mnt/
    > umount /mnt
    > mount /dev/hdb4 /mnt
    > cp -ax /home/* /mnt/
    > umount /mnt
    >
    > 4. Fix up the new fstab to point to the new partitions.
    >
    > 5. Fix up either lilo.conf or grub.conf (on the new drive). You
    > may need to look up how to configure whichever of these you are
    > using. Now comes the tricky part -- you need to install the
    > lilo/grub boot loader. The simplest way may be to use chroot.
    > Here is an example for grub:
    >
    > mount /dev/hdb1 /mnt
    > mount /dev/hdb3 /mnt/boot
    > chroot /mnt
    > grub-install
    >
    > Both lilo and grub have command line options that do the
    > equivalent of the chroot for you. I routinely use this with
    > lilo, but for some reason feel more comfortable with the chroot
    > when using grub -- don't know why.
    >
    > WARNING!!! Although I have done the above successfully several times,
    > the above steps are from memory and may be a little off. Read the man
    > pages!
    >
    > Others recommend other techiques using things like cpio/tar.
    >
    > --
    > Robert C. Paulsen, Jr.
    > robert@paulsenonline.net
    >
    >
    > --
    > redhat-list mailing list
    > unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    > https://www.redhat.com/mailman/listinfo/redhat-list

    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: David Hart: "Re: [Fwd: [fw-wiz] Stop Using relays.osirusoft.com *NOW*! (fwd)]"

    Relevant Pages

    • Re: WinXp Defrag starts automatically
      ... Robert are you complaining about something ... Regards. ... Personally, I would not disable this feature, as it runs ... > "Optimize hard disk when idle" check box allows Windows to rearrange ...
      (microsoft.public.windowsxp.general)
    • Re: New computer
      ... > thing I would do is to run Partition Magic, and create partitions like I ... Ghost your current HD for later restore to your current machine. ... Remove the hard disk and install it in your new computer. ... Folow the on-screen instructions and install new drivers as necessary. ...
      (microsoft.public.win2000.general)
    • Re: Pagefile.sys
      ... that everyone would think the first partition on the first hard disk would ... the first partition of the second hard disk would be D: and then the ... then when the first hard disk drive partitions were fully assigned the ...
      (microsoft.public.windowsxp.configuration_manage)
    • Re: renovate partitions without reinstalling
      ... > Supousing that you will delete your windows partitions, ... Hold it...am I starting up from the rescue disk or from the hard disk? ... > Device Boot Start End Blocks Id System ...
      (Fedora)
    • RE: Windows XP Home to a new wiped clean harddrive (HELP)
      ... Recreating the partitions through Disk Management while plugin your Hard disk ... that windows is missing a registry key. ...
      (microsoft.public.windowsxp.setup_deployment)