Computing.Net > Forums > Linux > copy from one drive to another in Linux

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

copy from one drive to another in Linux

Reply to Message Icon

Name: Linh
Date: May 31, 2002 at 10:32:47 Pacific
Comment:

I have a Linux that is resided on a 40GB IBM hard drive and I would like to copy everything to an 60GB Quantum hard drive. I wanted the 60GB hard drive to have the same image as the 40GB hard drive so that I can boot up. I did the following things:

hda is the 40GB IBM. hdc is the 60GB Quantum

1) Fdisk and partition /dev/hdc

/dev/hdc1, /dev/hdc2, /dev/hdc5, /dev/hdc6, /dev/hdc7

2) format the above partition

mkfs.ext2 -c -j /dev/hdc1, mkfs.ext2 -c -j /dev/hdc5, mkfs.ext2 -c -j /dev/hdc7

3) mkswap -c /dev/hdc6

4) mount /dev/hdc1 /target

5) lilo -v -r /target (I can 't get this command to work)

I am stuck because I can 't get the hdc drive to boot up. If you have a better method of copying from one hard drive to another please send me that method in step by step detail on how to do it. Thank you for your help.



Sponsored Link
Ads by Google

Response Number 1
Name: James
Date: May 31, 2002 at 18:44:57 Pacific
Reply:

When I did this a while ago I did a cp -a from /usr to /usr2 etc on other disk where the mount points were the same devices.
For /boot I did a loop of like something like

for var in *
do
dd if=${var} of=/boot2
done
just to be sure for boot.

Then :
dd if=/dev/hda of=/dev/hdb

(assuming hdb is second disk) should do it

Then I swaped disks so hdb became hda.It has been a while so...


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: copy from one drive to another in Linux

Drive Image/Hard Drive to Hard Drive www.computing.net/answers/linux/drive-imagehard-drive-to-hard-drive/3985.html

Copy Command in Linux www.computing.net/answers/linux/copy-command-in-linux/30342.html

Restore files after system hang RH9 www.computing.net/answers/linux/restore-files-after-system-hang-rh9/24382.html