LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-19-2004, 12:45 PM   #1
paul.nel
Member
 
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Rep: Reputation: 15
Moving root directory tree to new hardrive


I am planning to upgrade the harddrive on my SuSE box and do not want to re-install teh entire OS. Is there a way that I can move the existing installation to a new drive without losing any data/functionality?

Tx
p.n
 
Old 01-19-2004, 01:03 PM   #2
Joey.Dale
Member
 
Registered: Jun 2003
Location: Tampa, Fl
Distribution: Gentoo, Slackware
Posts: 828

Rep: Reputation: 39
I think that you could use dd, dd will produce a bit of bit copy of your old HDD.
after reading man dd, install the new HDD on a diff. cable (secondary) and use the dd comand.
 
Old 01-20-2004, 10:05 AM   #3
paul.nel
Member
 
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Original Poster
Rep: Reputation: 15
So, just a bit of clarity required here. Would I first need to recreate all the partitions existing on my old drive on the new drive or will dd physically copy the entire HDD?

(The man and info pages pages on dd is not extremely verbose...)

Regards
p.n
 
Old 01-22-2004, 12:28 AM   #4
paul.nel
Member
 
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Original Poster
Rep: Reputation: 15
OK, I have still not been succesful with this HDD upgrade I need to do. Here is what I have done up till now:

My old (27GB) drive has 6 partitions. I recreated each partition on my new (80GB) drive but increased the size of each partition considerably. I then did the following with each of the partitions:

Code:
dd /dev/hda* /dev/hdb**
Obviously * and **are the aproppriate partition numbers.

The order of the partitions are different. Some that were in an extended partion on hda baut is now in primary on hdb and the numbers are also not the same for corresponding partitions. The pration that root is on however is still /dev/hdb1 and I formated it to be bootable.

Next I changed my /etc/fstab file to reflect the changed partitions on the new drive and their corresponding mount points.

After doing this I made hdb1 my master drive and booted up and you guessed it, it did not work. I assume this is cause I probably overwrote the partition table.

Could someone perhaps advise on what the problem could be and how to address it?

Tx
p.n
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
help: regarding comparing two directory tree structures raj_thota Linux - Software 2 11-02-2005 12:19 PM
mounting hardrive via non-root and using it via non-root Paridoth Mandriva 1 11-03-2004 05:55 PM
permissions for directory tree adamwenner Linux - Security 3 10-23-2004 07:39 AM
Help! How do you delete a directory tree? johnmcollier Linux - Security 0 10-24-2003 02:29 AM
Directory Tree Question GreatMilenko Linux - Security 3 06-02-2002 01:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:46 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