LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-13-2004, 08:44 AM   #1
mconsidine
LQ Newbie
 
Registered: Feb 2004
Posts: 1

Rep: Reputation: 0
Transferring installation to a new hard disk?


Hello,

I have RH 9 installed on a harddisk that has rapidly filled up. (The install of a package the other day has resulted in my display cycling as X tries to start, but has a problem finding the default font ...)

Anyway, what I would like to do is get a new, larger disk and transfer - rather than reinstall - everything over to the new drive. I would then swap the old one out and put in the new one. I'd like to do this so that I don't have to go back and reinstall all the updates, packages, etc. that I have.

Does anyone have any thoughts? The drive is in a dual boot system, with the second physical drive dedicated to a different operating system.

Any help would be appreciated!

Sincerely,
Matt
PS If this question should be posted to a different forum, I'd appreciate the heads up. Thanks ...
 
Old 05-13-2004, 09:23 AM   #2
slimjim
Member
 
Registered: Apr 2004
Location: east midlands, england
Distribution: Ubuntu 9.04
Posts: 56

Rep: Reputation: 15
Quite honestly, it's no simple matter to transfer an install from one disk to another where the disks are of different size. I guess you could set up partitions with devices on and so on on the target drive to be the same size as the source paritions on the smaller drive and use dd to copy them across a partition at a time, but you'll probably find it easier to just reinstall.
 
Old 05-13-2004, 10:56 AM   #3
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Actually it's quite easy.
1. Format the new partition
2. Make a temporary mount point /mnt/hd
3. make directories /mnt/hd/proc and /mnt/hd/mnt
4. Copy all other directories to the new partition like this:
cp -a /boot /mnt/hd/
cp -a /bin /mnt/hd/
etc...
Do not try to copy /proc or /mnt!
Then edit lilo.conf on the new partition. reboot with a boot disk and mount the new partition as root. run lilo and you are done.
These directions are taken from a HOWTO for migrating ZipSlack to a Linux partition.
 
Old 05-13-2004, 11:45 AM   #4
slimjim
Member
 
Registered: Apr 2004
Location: east midlands, england
Distribution: Ubuntu 9.04
Posts: 56

Rep: Reputation: 15
I'm sure that's great for migrating ZipSlack to a hard drive, but that's not quite the same thing, is it? Consider the contents of /dev, for a start.
 
Old 05-14-2004, 02:24 AM   #5
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
cp -a /dev /mnt/hd/ works. try it! this will work for any linux install. just copy all the directories this way except for /mnt and /proc
if you need to split it between different partitions make another mount point mount them and do the same. The edit fstab.
ZipSlack runs exactly like any other linux.
 
Old 05-14-2004, 09:47 AM   #6
bluej
LQ Newbie
 
Registered: Mar 2004
Location: japan
Distribution: debian
Posts: 24

Rep: Reputation: 15
it's safer if you add the -x flag too to cp, so instead of cp -a, use cp -ax everywhere.
i'd also use -v to see the files as they are copied, so if for some reason a file cannot be copied (filesystem errors, bad sectors, etc) and your system hangs, you don't just sit there and wait forever and ever

and yeah, copying /dev works of course. the files in /dev are "special" but they still are files, residing on your harddisk (created by the mknod command with specific major and minor numbers). on the other hand, copying /proc is pretty pointless, because those files are in the memory, not on your harddisk.

btw, i copied entire systems with cp -vax several times (for all kinds of reasons).
if you have 2 identical computers with identical hard drives, then it's easier to use dd, as you don't have to format new partitions, create directories, and care about /proc (or any other directory) at all.
 
Old 05-16-2004, 09:14 AM   #7
ima
Member
 
Registered: Jan 2004
Location: Pennsylvania
Distribution: I've checked out a bunch
Posts: 80

Rep: Reputation: 15
You can also use a commercial package, like ghost, which will either copy the entire 1st drive to the second, maintaining the ration of the partions (or permitting you to modify the individual partition size), or do a partition by partition copy. It boots using a DOS boot disk but since it is making a sector by sector, bit by bit image, it is platform independant.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
installation from hard disk! phoenix7 SUSE / openSUSE 2 07-21-2005 10:18 AM
Reclaim disk partition from hard disk installation EStester Linux - Enterprise 2 03-09-2005 11:46 AM
Reclaim disk partition from hard disk installation EStester Linux - General 1 03-09-2005 11:25 AM
Hard-disk installation Jihan Debian 3 02-18-2005 07:45 PM
SuSE 8.2 installation from hard disk Grapeman Linux - Software 1 10-18-2003 10:44 PM

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

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