Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ...
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.