From: "Michael Kintzios" <michaelkintzios@lycos.co.uk>
To: <gentoo-user@lists.gentoo.org>
Subject: RE: [gentoo-user] Replacing main harddisk
Date: Fri, 16 Sep 2005 16:33:57 +0100 [thread overview]
Message-ID: <F49BE7328A1DA246AFC5C2CDDB86D917DFAFED@BCV0X134EXC0005> (raw)
In-Reply-To: <200509161522.41284.gentoo@appjaws.plus.com>
> -----Original Message-----
> From: Paul [mailto:gentoo@appjaws.plus.com]
> Sent: 16 September 2005 15:23
> To: gentoo-user@lists.gentoo.org
> Subject: [gentoo-user] Replacing main harddisk
>
>
> Hi all,
>
> My main harddisk is starting to go, making awful noise and
> causing the
> computer to freeze.
> I have another spare disk and I wondered if somebody would
> list out the
> procedure I need to follow to create and format the
> partitions and to copy
> all of the faulty disk contents. Then how to boot from the new disk.
> The new disk will need the following partitions:-
> /boot ext2
> /swap
> / reiserfs
1. Using the dd command or a cloning software derivative:
If the new disk is *exactly* the same size like the old one, then using
the dd command you can basically clone your failing disk, including MBR
and all partitions, including swap!, bit by bit:
=========================
dd if=/dev/hda of=/dev/hdb
=========================
On the other hand, if the new drive is larger then you will need to
partition it, exactly like the old one. On the new drive, create the
same entries you find with fdisk for your old drive: # fdisk -l
/dev/hda
Also, don't forget to clone the MBR:
=========================
dd if=/dev/hda of=/dev/hdb bs=446 count=1
=========================
If you also want to clone the partition table (as opposed to writing one
afresh with fdisk) then increase the bs=446 to 512.
2. Using tar
If at the same time you want to alter the partition sizes on the new
drive then you can use the tar command, for each partition except for
swap. Besides creating partitions of a preferred size on the new drive,
you will also need to mkfs for each partition. Still have to use dd to
clone the MBR.
=========================
# mkdir -p /mnt/new_boot
# mount /dev/hdb1 /mnt/new_boot
# cd /boot
# tar lcpf - .|(cd /mnt/new_boot; tar xpvf -)
=========================
Repeat for / and also use tar -d (check $ man tar) to verify that the
directories were copied over without any mishaps. Personally I prefer
tar because it is faster, it defragments the drive's contents and can
verify that the new directory was not corrupted in the tarring/untarring
process.
3. There's a number of backup apps out there which can do more or less
the same using a different front end; e.g. partimage.
Good luck.
--
Regards,
Mick
--
gentoo-user@gentoo.org mailing list
next prev parent reply other threads:[~2005-09-16 15:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-16 14:22 [gentoo-user] Replacing main harddisk Paul
2005-09-16 14:56 ` Allan Spagnol Comar
2005-09-19 17:22 ` S. ancelot
2005-09-19 18:47 ` Paul
2005-09-19 19:07 ` Noah Roberts
2005-09-20 0:12 ` Philip Webb
2005-09-20 8:44 ` Michael Kintzios
2005-09-20 12:38 ` [gentoo-user] missing console (was Replacing main harddisk) Paul
2005-09-20 12:47 ` John Jolet
2005-09-20 13:51 ` Paul
2005-09-16 15:33 ` Michael Kintzios [this message]
2005-09-19 13:39 ` [gentoo-user] Replacing main harddisk Paul
2005-09-19 14:23 ` Michael Kintzios
2005-09-19 14:49 ` Paul
2005-09-16 15:37 ` Michael Kintzios
2005-09-17 9:53 ` Paul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F49BE7328A1DA246AFC5C2CDDB86D917DFAFED@BCV0X134EXC0005 \
--to=michaelkintzios@lycos.co.uk \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox