LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-15-2003, 07:54 PM   #1
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Rep: Reputation: 30
how do I move linux to a different HD


I have updated my hard drive and do not want to reinstall linux. I would like to make an exact copy onto the new HD. I would need to install lilo too hmmmm.

I have read that you should never need to reinstall linux unless you completely blow a hard drive. So is what I am asking possible?

Has anyone done this before?

Thanks,
AD
 
Old 12-15-2003, 08:04 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Has anyone done this before?
Yep, often, too :) Here's a quick description.

Just partition the new HDD to your liking. Boot of
a Knoppix or install-CD ... make mountpoints in
/tmp .... mount a partition of the old hdd. mkfs the
new hard drives partitions with your favourite
fs (you should use one that's built into the kernel ;})

Then mount the corresponding partition from the
new hdd into the other mountpoint in /tmp.

Then cp -Rp /tmp/<mountpoint1> /tmp/<mountpoint2>

Unmount both. Repeat with all partitions (not swap,
obviously ;}) ...

Power box down.

Rip old hdd out.

boot of CD again....

chroot to new hdd's / ... run lilo.


Cheers,
Tink
 
Old 12-15-2003, 08:04 PM   #3
light_hawk0
LQ Newbie
 
Registered: Jun 2003
Posts: 3

Rep: Reputation: 0
Hmm... Well I guess if you had the hdd in your computer and fired up your old install and partioned your new hdd, coppied your hdd over and then did a chroot and installed your boot loader yeah then I guess it should work just fine. In fact thats kinda how the gentoo install works
 
Old 12-15-2003, 08:15 PM   #4
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Original Poster
Rep: Reputation: 30
Cool thatnks guys. Couldn't imagine needing to reinstall everything again for the 3rd time this year. It takes forever getting thing just sooooo perfect

Thanks tink
Thanks light

I was hoping it was that easy
 
Old 12-15-2003, 08:43 PM   #5
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Original Poster
Rep: Reputation: 30
What about checking the files between the 2 hard drives after copying? Meaning is there anyway to compair the files between partion hda1 and hde1 making sure everything was copied? I could swear I have seen this function somewhere before.

Thanks,
AD
 
Old 12-15-2003, 08:51 PM   #6
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Original Poster
Rep: Reputation: 30
nevermind
diff -r --brief dir1 dir2
 
Old 12-15-2003, 09:25 PM   #7
iTux
Member
 
Registered: Dec 2003
Posts: 33

Rep: Reputation: 15
Just by curiosity, how do you manage to copy the device files, files in /dev? Can cp manage them or they were recreated? Can take quite some time to copy /dev/zero


iTux
 
  


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
cannot using FTP move command to move files adrianmak Linux - Networking 4 04-21-2009 12:01 PM
Move to Linux cdrom600 Linux - General 20 10-22-2004 12:32 PM
Was just about to move from Windows to Linux but... :( ambayah Linux - Newbie 3 08-29-2004 10:32 AM
Best way to move to Linux? Forezt Linux - General 16 02-11-2004 12:01 PM
Can I download Linux apps to Win98 then move them to Linux? RAL Linux - Software 8 08-18-2003 06:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:29 PM.

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