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



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 (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 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



Relevant Pages

  • Re: BootIt NG high level steps - best approach??
    ... backup boot strategy. ... As far as BING, I should tell you I've been using this software ... make managing your bootable options and partition management so much easier. ... drives) and the DATA partition on a mirrored array. ...
    (comp.sys.ibm.pc.hardware.storage)
  • Re: Dual booting
    ... of Microsoft's dual boot scenario. ... The extended partition is not assigned a drive letter, ... BIOS reserves letters A and B for floppy drives, ... If WinXP Setup ...
    (microsoft.public.windowsxp.general)
  • Re: how to change out system disk?
    ... Inaccessible_Boot_Device, when trying to boot from the new HD, but sometimes ... WinXP booted, you can still run Word, Quicken or whatever without having to ... following the primary partition and the first logical drive ). ... > logical drives in a single extended partition. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Dual Boot
    ... >>>I am running XP Pro on my maine computer and want to set up a dual boot ... >>>proccess a few times but backed out when I have to delete the partition ... > Is there any reason you don't want to install the new OS on #1 (the ... Keep OS's on different drives. ...
    (microsoft.public.windows.server.general)
  • Re: Dual XP boot obstacle
    ... re-copy my C partition to E., ... After some basic house-keeping I ran Drive Image 2002 Copy Drives ... namely having a copy of C in E, allowing an alternative immediate boot ... the Aumha Forum to use the Restore Image facility to get what I ...
    (microsoft.public.windowsxp.general)