LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-14-2003, 03:40 PM   #1
Vlad_M
Member
 
Registered: Aug 2002
Location: Cape Town, South Africa
Distribution: Red Hat 8.0 (Home), Red Hat 8.0 (Work)
Posts: 388

Rep: Reputation: 30
Is this possible?


I just got a nice new HD, much bigger and faster than what I have now. Alas, I just got my RH 8.0 all tweaked out and pimped up just the way I like it. I really don't want to have to reinstall and do everything again...

So is there a way I can just copy the existing istallation onto the new disk, just make exactly the same partitions (but this time it will be on /dev/hda) and somehow copy everything, and then just reinstall grub to reflect the changes?

If this is possible at all, could someone walk me through it, I am not a total noob but I am no guru either, so it is very possible that I may get stuck along the way. But I would really like to this instead of installing again, and then going through the whole process of getting it to be how I want it to be...

Thanks a mil guys,
Cheers!!
 
Old 04-14-2003, 03:43 PM   #2
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
You might have a problem with copying a system in use due to lock files and many other things I'm not aware of.
 
Old 04-14-2003, 03:54 PM   #3
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
this is a little tricky so follow me on this... it works... this is how I've set up a couple of LFS systems...
plug the hd into your ide bus (preferably primary ide bus and set as slave)... then you can cfdisk or fdisk /dev/hdb to create your partitions. If you want the partitions just like the old system then type 'cat /etc/fstab'... this will tell you what partitions get mounted where... to see partition filesizes use 'cfdisk /dev/hda'... this will allow you to view the old hd's partition setup.

once you have the new hd partitioned you now have to format the partitions... use mkfs to format the different partitions.

download a distro of linux that you can boot and run from CD to copy all the files from one hd to another.

now running linux from a CD (that way the system isn't using any files on either of the HDs)... do something like the following:

# mkdir /mnt/oldhd
# mkdir /mnt/newhd

# mount /dev/hda1 /mnt/oldhd /* or whatever your old root partition is */
# mount /dev/hdb1 /mnt/newhd /* or whatever your new root partition is going to be */
# cd /mnt/newhd
#mkdir usr root home mnt lib etc bin sbin ... etc
next you will have to mount the remaining partitions on both the new and old hds to their appropriate mount points (see /etc/fstab).

then you can just copy files recursively from one hd to another... update your grub (not sure how to do this myself... I'm a lilo guy) then shutdown, switch the new hd in for the old one and reboot. Should be good to go.

I know that's really not going into detail but that's how you do it... let me know if / where you need more clarification.
 
Old 04-14-2003, 04:06 PM   #4
Vlad_M
Member
 
Registered: Aug 2002
Location: Cape Town, South Africa
Distribution: Red Hat 8.0 (Home), Red Hat 8.0 (Work)
Posts: 388

Original Poster
Rep: Reputation: 30
guys thanks for such quick replies, but it looks like its more trouble than its worth, i don't have broadband or anything, so downloading knoppix would be a pain, so it looks like I'll just nuke it and start over....

thanks tho!!!
 
Old 04-14-2003, 07:14 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893
Don't have to use knoppix. Just boot the RH 8 1st install CD and use the rescue mode. No gui so its all console commands.

If you copy to the same partitions then all you have to do is run grub-install to reinstall grub to your new disk. You will have to chroot to the new HDD first.
 
Old 04-14-2003, 08:41 PM   #6
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
Just use the cp command to move your install to the new drive.
See this page to see how I did it.
 
  


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



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

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