RE: Copy entire hard disk - how ?
From: Otto Haliburton (ottohaliburton_at_comcast.net)
Date: 08/27/03
- Previous message: David Hart: "Re: [Fwd: [fw-wiz] Stop Using relays.osirusoft.com *NOW*! (fwd)]"
- In reply to: Robert C. Paulsen Jr.: "Re: Copy entire hard disk - how ?"
- Next in thread: Mike Wooding: "RE: Copy entire hard disk - how ?"
- Reply: Mike Wooding: "RE: Copy entire hard disk - how ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: David Hart: "Re: [Fwd: [fw-wiz] Stop Using relays.osirusoft.com *NOW*! (fwd)]"
- In reply to: Robert C. Paulsen Jr.: "Re: Copy entire hard disk - how ?"
- Next in thread: Mike Wooding: "RE: Copy entire hard disk - how ?"
- Reply: Mike Wooding: "RE: Copy entire hard disk - how ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|