move to new hdd

Place to discuss SUSE
Locked
User avatar
cdhgold
administrator
administrator
Posts: 382
Joined: Tue Mar 18, 2003 6:11 pm
Location: Texas

move to new hdd

Post by cdhgold » Thu Sep 23, 2004 5:49 pm

i'm running suse 9.1pro on my laptop and have a new larger hdd. can anyone suggest a way to move my suse and all data to new hdd without having to reinstall? the laptop only has room for one hdd at a time but i do have other systems on network that could hold a image of the system. i know it would be better to reinstall but i'm on dial up and would rather avoid having to download all the updates and reset all my configs. any suggestions using native linux tools?

cdhgold

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Thu Sep 23, 2004 6:47 pm

If you have the Knoppix CD and another machine up on your network to store an image of your hard drive you can use the "partimage" utility to create an image of your laptop. After switching hard drives you could restore the image back to the laptop. Of course you can do something similar with "dd" and "ssh" but partimage has a nice menu driven interface. You could either run partimaged on the destination machine or you can just mount a share (nfs, samba, etc) and write the image to the mounted network drive. After restoring the image(s) you can increase the size to the size of the new drive (parted or resize2fs, etc).

User avatar
cdhgold
administrator
administrator
Posts: 382
Joined: Tue Mar 18, 2003 6:11 pm
Location: Texas

Post by cdhgold » Thu Sep 23, 2004 7:46 pm

thanks for the suggestion i do have the knoppix cd

cdhgold

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Mon Sep 27, 2004 3:03 am

Void Main wrote:Of course you can do something similar with "dd" and "ssh" but partimage has a nice menu driven interface.
this is the first definite sign that i am becoming a "hoary old CeNsOrEd"! when i saw the question i immediately thought "hmm, you could justuse dd", and when i saw your answer i thought to myself "menu eh? don't think i would bother with that when dd works fine", and then i realised i have turned into one of those command line junkies that the majority of computer users simply cannot understand! (after all, why would anybody want to type some esoteric characters in, just to wait a few seconds/minutes and get some other esoteric characters printed back out again?), there's no going back! i'm a command line whore from now on!

not true really, there are still some things i will never be able to do without X!

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Sep 27, 2004 8:29 am

Command line rules! X is great because it allows me to get more shell prompts on the display at once!

Membrax
scripter
scripter
Posts: 99
Joined: Tue Oct 21, 2003 2:04 pm
Location: 50'48''N - 4'21''E
Contact:

Post by Membrax » Mon Sep 27, 2004 11:44 am

...and what about making a direct hard copy of the first drive onto a second one without having initially to build an image of it ?

let's say that another drive could be plugged at the ame time to the notebook (via USB or FW port f.i.), would it then be possible just to "clone" the drive completely (data, structure and boot system) ?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Sep 27, 2004 3:11 pm

If they are the exact same drive type and you want an exact duplicate and the first drive (source) is installed as "/dev/hda" and the second drive is installed as "/dev/hdb" then you should be able to just:

# dd if=/dev/hda of=/dev/hdb

However, it is usually better to create the partition table how you want with target partitions at least as big as the source partitions and then dd them one at a time:

# dd if=/dev/hda1 of=/dev/hdb1
# dd if=/dev/hda2 of=/dev/hdb2

etc. You might also want to make sure thing go at optimal speeds by adding optimal block size parameters to the dd command.

You could also do this across a network, or across the network to an image file.

e.g: http://www.knoppix.net/docs/index.php/I ... ingKnoppix

Locked