LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-31-2004, 11:37 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
To transfer the complete hard drive to a brand new drive


Hi folks,

I need to transfer the existing hard drive (Debian) to a brand new hard drive of unequal capcity in the same PC.

Old/existing hard - ATA-33, 7G
New hard drive - ATA100, 40G
Motherboard suports, ATA-66 and ATA100
(Remark: the old hard drive works on this motherboard without problem)

I did the same on another PC several years ago with a PARTED boot disk to transfer WinXP to a brand new hard drive. The steps taken were as follows;

1. Attached a new hard drive to Secondary IDE.
(I can't recall whether the brand new hard drive has been formatted or not)

2) Used a PARTED boot disk to boot up the PC

3) Copied the complete hard drive to the new hard drive.

4) Remove the old hard drive and change the new hard drive to Primary IDE. Turn on the PC. That is all.

It is very rapid and easy.

I'm quite sure this process also works on Linux. Unfortunaely I only have a dim recollection on the complete procedure. Can any folk shed me some light. TIA

B.R.
satimis
 
Old 09-02-2004, 08:03 PM   #2
aaronj
LQ Newbie
 
Registered: Jun 2004
Posts: 26

Rep: Reputation: 15
Hope this helps you

This is how to clone a linux operating system disk to another disk live on a system.



if disk hda has partitions

hda1 /boot 100m

hda2 / 10240m

hda3 swap 1992m

hda4 /var 400m


# mkdir /mnt/boot

# mkdir /mnt/root

# mkdir /mnt/var



# fdisk -l

# fdisk /dev/hdb

Make partitions on hdb same as hda

# mount /dev/hdb1 /mnt/boot

# mount /dev/hdb2 /mnt/root

# /dev/hdb3 is swap

# mount /dev/hdb4 /mnt/var



# dump –f - /boot | (cd /mnt/boot; restore –rf -)

# dump –f - / | (cd /mnt/root; restore –rf -)

# dump –f - /var | (cd /mnt/var; restore –rf -)
 
Old 09-02-2004, 09:56 PM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi aaronj,

Tks for your advice.

I hope I understand it correctly
Quote:
if disk hda has partitions
hda1 /boot 100m
hda2 / 10240m
hda3 swap 1992m
hda4 /var 400m

# mkdir /mnt/boot
# mkdir /mnt/root
# mkdir /mnt/var
Apply
# df -h
to find the partitions on the old drive (hda)

What is
none 252M 0 252M 0% /dev/shm

Then make following mount points
# mkdir /mnt/boot
# mkdir /mnt/root
# mkdir /mnt/va

Quote:
# fdisk -l
# fdisk /dev/hdb

Make partitions on hdb same as hda
The old and new drives are of unequal capacity, old drive 7G and new drive 40G. Can I divid the whole new drive into the same number of partitions as the old drive (hda) but with different size on each partition? Kindly advise. Tks

Quote:
# mount /dev/hdb1 /mnt/boot
# mount /dev/hdb2 /mnt/root
# /dev/hdb3 is swap
# mount /dev/hdb4 /mnt/var

# dump –f - /boot | (cd /mnt/boot; restore –rf -)
# dump –f - / | (cd /mnt/root; restore –rf -)
# dump –f - /var | (cd /mnt/var; restore –rf -)
Is it 2 '--' (hyphens) before f and rf and 1 (one) '-' (hyphen) after rf with a space in between?

I still face any problem about the cable. Old drive ATA-33 uses 40-wire cable but the new drive ATA-100 80-wire cable. 40-wire cable can go into the sock of a ATA-100 drive but a 80-wire cable can't go into the socket of ATA-33 drive because of a blind hole on its plug. I shall use a 40-wire cable connecting the new drive as slave. If it can't be detected then I will connect the new drive to Secondary IDE, removing the burner and CDrom temporily. Because 80-wire cable also can't go into the socket of burner and CDrom respectively.

B.R.
satimis
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
purchase of a new hard drive: which brand to choose? Marc L. Linux - Hardware 15 11-27-2005 01:50 PM
Transfer SUSE to new hard drive dutch1918 SUSE / openSUSE 1 07-22-2005 09:46 AM
External hard drive data transfer speed buldir SUSE / openSUSE 1 04-11-2005 09:25 AM
Hard Drive transfer speed OmegaTemplar Slackware 6 03-14-2004 05:48 PM
New Hard drive & transfer data wanna lrn linux Linux - Newbie 1 09-21-2002 04:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration