Guest iceberg Posted August 23, 2007 Report Share Posted August 23, 2007 I had a web & mail server both in 1 machine, everything is running well... So far so good. That server has ran since march 2207, but suddenly i realize that the hard drive is to small for capacity It only has 10 GB I would like to change the hard drive with bigger capacity, but i don't want installing all of the system from the beginning again. Let's say... i would like to clone it... Is there any software who can do that...??? Is there anybody can help me...??? [moved from Tips & Tricks by spinynorman - welcome aboard :)] Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted August 23, 2007 Report Share Posted August 23, 2007 Crikey, did you bring this back with you from the future :D That server has ran since march 2207 This can be done without a reinstall. We need to copy the file system across. What partitions do you have on the 10GB drive in total? Do you want to leave the 10GB in the machine and use it in addition to the new hard drive? Or replace it? If you decide to replace it, just put the new drive in as slave. Boot from CD and mount the partitions on your 10GB drive. Then you need to copy this across using the cp command with some special parameters to ensure it all works by keeping permissions on files, etc. Post your current partition layout on the 10GB drive, and we can help you with the rest. Quote Link to comment Share on other sites More sharing options...
Mitchell Posted August 23, 2007 Report Share Posted August 23, 2007 Another option which is worth looking into is Mondo, you can find it in the package manager. Urpmi in 2007 spring won't install all the dependencies needed, but it's easy to find them by reading the error messages when starting mondo for the first time. The extra packages are also in the package manager. Mondo can do everything you're asking. You first make a backup to your harddrive, or dvd's via an iso file, then you reboot from that. (if using hard drive you'll need to create a bootable disk through mondo first.) Once you boot into Mondo, you can restore a backup of all your files, and resize your current partitions. So have a look, it might just bee what you're after. Quote Link to comment Share on other sites More sharing options...
Guest iceberg Posted August 23, 2007 Report Share Posted August 23, 2007 Crikey, did you bring this back with you from the future :DThis can be done without a reinstall. We need to copy the file system across. What partitions do you have on the 10GB drive in total? Do you want to leave the 10GB in the machine and use it in addition to the new hard drive? Or replace it? If you decide to replace it, just put the new drive in as slave. Boot from CD and mount the partitions on your 10GB drive. Then you need to copy this across using the cp command with some special parameters to ensure it all works by keeping permissions on files, etc. Post your current partition layout on the 10GB drive, and we can help you with the rest. OOps... i had miss typed, it should be 2007 not 2207 :P On my 10GB hard Drive, i had setting up 3 partitions, which is : Swap, Root, Home Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted August 23, 2007 Report Share Posted August 23, 2007 OOps... i had miss typed, it should be 2007 not 2207 :P On my 10GB hard Drive, i had setting up 3 partitions, which is : Swap, Root, Home OK, this can be done really easily, and doesn't need you to install any other software. Backup software can do this, but in reality, you don't need it. Just install your hard disk, and then what I suggest you do is boot your system normally. Then, use MCC (System/Configure/Configure Your Computer) and go into the partitioning tool. Find your second hard disk, and create the same partitions but don't assign any mount points as of yet. Alternatively, this can be done at the command line if you are comfortable using fdisk or cfdisk within Linux. Ensure these partitions are big enough, at least the size of the current swap, / and /home or bigger if you decide to allocate a bit more space to / instead of it's current size. Ensure you choose the same filesystem type as what you set originally when you installed, so ext3 if ext3, or reiserfs, etc, etc. Now, copying the files, etc, you can do while the system is running if you like, or alternatively, if you prefer, boot the Mandriva CD1/DVD and go into rescue mode. I tend to mount my old partitions manually then let the rescue cd do it. I would be tempted to do it like this, and I'm assuming partitions here, but you'll have to check yours for when you do it: mkdir /mnt/oldroot mkdir /mnt/oldhome mkdir /mnt/newroot mkdir /mnt/newhome Now, oldroot/newroot will be for the / partition. oldhome/newhome will be for /home. Let's mount the partitions and copy the data: mount /dev/hda5 /mnt/oldroot mount /dev/hda6 /mnt/oldhome mount /dev/hdb5 /mnt/newroot mount /dev/hdb6 /mnt/newhome Note that I've kept the partitioning exactly the same, so that I don't have to change the /etc/fstab. If you made /dev/hdb1, /dev/hdb2, /dev/hdb3, then you need to ensure that the /etc/fstab file has been edited so that the system will boot correctly when you remove the old disk and replace it with the new one. Copying: cp -dpRx /mnt/oldroot /mnt/newroot check it after, to make sure you've got everything you are expecting. Now the /home: cp -dpRx /mnt/oldhome/* /mnt/newhome/* note the copy is done slightly differently, but will work just the same. Ensure all your data is across. Shut down, remove the old disk, ensure the new disk is now the master, and boot the system. Everything should boot correctly provided that you ensured the partitions are the same or you edited the /etc/fstab so that swap, / and /home know where it should be mounting. And that's it really in a nutshell. Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted August 23, 2007 Report Share Posted August 23, 2007 (edited) In case it is of any help, I recently achieved a similar thing for the library's computer of my son's school. I had all installed on a 4GB hard drive, and wanted to put everything on the new 40GB. I simply formatted the new drive the same way the old one was, I mean hdb1 for hda1 and hdb5 for hda5 and so on, each of which was bigger on the new drive. Eg: The / partition would grow from 2GB to 6GB, and the /home from 1GB to 10GB and so on... as long as the partition number for each remains the same (so as not to confuse Linux on boot because of /etc/fstab, /boot/grub...). Next I booted SystemRescueCD, launched GParted, and for each partition, I did "copy" on the source partition (old drive), and "paste" on the destination partition (new drive). Then I switch drives and all booted fine. Yves. Edited August 23, 2007 by theYinYeti Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted August 23, 2007 Report Share Posted August 23, 2007 Oh yes, almost forgot. If you do it my way, you have to reinstall grub/lilo to the MBR to get it to boot again. theYinYeti's post just reminded me when he mentioned grub! Boot the rescue CD, then mount the new partitions for this drive, then do: mount -t proc proc /mnt/newroot/proc chroot /mnt/newroot /bin/bash source /etc/profile grub --no-floppy device (hd0) /dev/hdb root (hd0,4) setup (hd0) should finish it off properly. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.