Re Replacing boot drive how to make a copy of it by tamir13

VIEWS: 11 PAGES: 3

									                          Re: Replacing boot drive: how to make a copy of it?

Re: Replacing boot drive: how to make a copy of
it?

Source: http://linux.derkeiler.com/Mailing−Lists/Debian/2006−09/msg00392.html



      • From: Kaspar Fischer <fischerk@xxxxxxxxxxx>
      • Date: Tue, 5 Sep 2006 00:44:45 +0200

Marty, Alan, and Damon,

Thanks a lot for all your suggestions! The RAID route looks quite
good and I am going to try it. I'll get back to the list as soon
as I have first results.

Regards,
Kaspar

On Sep 4, 2006, at 7:07 PM, Damon L. Chesser wrote:


        Damon L. Chesser wrote:

                Alan Chandler wrote:

                        On Sunday 03 September 2006 23:23, Marty wrote:


                                Marty wrote:


                                        Kaspar Fischer wrote:


                                                Hi list,

                                                I need to
                                                replace my
                                                boot disk as
                                                it starts
                                                failing (with
                                                bad blocks).
                                                What is the
                                                easiest way
                                                to obtain,
                                                on a new
                                                harddrive

Re: Replacing boot drive: how to make a copy of it?                             1
                       Re: Replacing boot drive: how to make a copy of it?
                                             (at least as
                                             large as the
                                             old one), an
                                             exact copy
                                             of the root
                                             file system
                                             and
                                             swap
                                             partition?

                                             Never touch
                                             a running
                                             system −−
                                             so my
                                             intention is
                                             to *copy*
                                             the
                                             drive
                                             instead of
                                             installing a
                                             new Debian
                                             system.

                                             Thanks and
                                             regards,
                                             Kaspar


                                     If for example you have two
                                     identical hard drives
                                     /dev/hda and
                                     /dev/hdb, with your root
                                     partition on /dev/hda, and
                                     you don't have
                                     any bad blocks on either
                                     drive, then you can make a
                                     perfect sector−
                                     −by−sector mirror using "cp
                                     /dev/hda /dev/hdb"


                             Addendum: I posted in haste. Having
                             re−read your message, since your
                             case involves both bad blocks and
                             non−identical drives, I would probably
                             opt for rsync as described below after
                             manually setting up the partitions
                             on the target drive.


                     One other suggestion. If, before you make the copy you set

Re: Replacing boot drive: how to make a copy of it?                               2
                         Re: Replacing boot drive: how to make a copy of it?
                       up the new drive as a single element of a raid 1 raid array,
                       then replace the failing disk and add the replacement in as
                       the second element to this array, you will then have a
                       permanent hot standby system.

                       That is something I have just done, although I have a
                       separate boot partition, and you have to independently store
                       the boot block on to both drives (I use grub − which is very
                       easy).

                       There is some good articles on the web with step by step
                       instructions − I can't locate them right now, but a bit of
                       googling will find them



               I have one such how to at www.damtek.com the direct url is http://
               www.damtek.com/2006/05/raid−and−boot−dir_07.html I wrote is
               specifically for helping me learn RHEL, but it works for Debian AFAIK. It
               will certainly walk you through duplication the grub MBR, so that you will
               boot even if you loose the HD that currently holds your MBR (assuming that
               /boot and your MBR are both on the same partition, ie NOT a dual boot
               system with windows on the first partition). I hope that will help.


       Addendum:

       In the OP's case, just make sure you do not make the failing HD part of a raid, you will loose
       all your data! If you go this route, like the above poster said, make the new HD a raid1, only
       one member and then copy the old HD data onto it. Just trying to be extra careful with
       someone else's data and avoid any misunderstanding.

       −−
       Damon L. Chesser
       damon@xxxxxxxxxx
       damon@xxxxxxxxxxxxx


       −−
       To UNSUBSCRIBE, email to debian−user−REQUEST@xxxxxxxxxxxxxxxx with a subject
       of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx




−−
To UNSUBSCRIBE, email to debian−user−REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe".
Trouble? Contact listmaster@xxxxxxxxxxxxxxxx




Re: Replacing boot drive: how to make a copy of it?                                                     3

								
To top