On Saturday 11 May 2002 08:54 am, David wrote: > I have bought a new harddrive and would like to _move_ my current Mandrake > installation over to the new drive without having to re-install. Is this > possible? How would I go about doing so? My guess is that it is _not_ > possible to do so while booted into Linux.
It IS possible, with relative ease, while booted to linux. You install the new harddrive (obviously not YET as a replacement for the original), for instance, connect it up to the slave position to your current master on IDE 1 if it is available - though this position is likely taken by your CDROM in which case attach it to the master position on IDE 2. It will likely take on the position of /dev/hde on the assumption that you currently have one harddrive and one cdrom on IDE 1. Run "fdisk /dev/hde" (or whatever it turns out to be) and set up partitions and filesystems - don't forget a swap partition (this is the way I always do it - I imagine there are nifty graphical tools for this...diskdrake?). You will now have devices like /dev/hde1, /dev/hde5, ../hde6, ../hde7, etc, depending on how you setup. Depending on how you want to layout the new drive, you will need to create mountpoints to accompany the layout. For me, I always have /, /var, /usr, /usr/local, and /home on separate partitions. You do as you like. In my case, I need separate, but nested, mountpoints for each partition, so I might create mountpoint "/mnt/disk", cd into /mnt/disk and then create "var", "usr", "usr/local", and "home" under /mnt/disk. I then would first mount say "/dev/hde5" (assuming linux is going on an extended partition) on /mnt/disk, cd to /mnt/disk and subsequently mount the other partitions (/dev/hde6, hde7, etc) to their appropriate /var, /usr, etc mountpoints. You COULD then begin copying all my current linux system files over to /mnt/disk from the root directory (recursive copy). I do not know offhand the copy command arguments needed - you want to make sure you copy files AND symlinks but NOT the /proc directory (I think that's the one - if you try to copy that one you will get into recursion hell). The better way would be to tar and gzip your system into tarballs. Copying would take a loooong time. If you tar it all up, it will take a long time but be potentially easier. Depending on your partitioning scheme and drivespace, you could tar up the entire system (quite large) or tar up portions, like create a "root.tar.gz", a "usr.tar.gz" (which in my case could include /usr/local even though it is on a separate partition), etc. Move the tarballs to their appropriate location on /mnt/disk, ie, root.tar.gz, which would likely have /, /boot, /root, /sbin, /bin, etc in it, to /mnt/disk. usr.tar.gz would also go to your /mnt/disk partition (when it untars/ungzips it will automatically go into /usr and /usr/local - you need space for this in /mnt/disk). I haven't done this for a while but I recall making the mistake of putting usr.tar.gz into my /mnt/disk/usr directory/mountpoint and untarring it there - it will create what works out to be a /mnt/disk/usr/usr directory instead of doing as you might hope - this is a bit of a pain to fix. My memory is faded on this so another will need to flesh out better details. I just want to provide a reasonable outline of how to do it. It is tedious but not impossible by any means. Once you have untarred or copied your system to the new drive, you power down, unplug and remove the old drive and replace it with the new drive (have a bootdisk because you will need to run lilo to get it finished up). Bootup with a bootdisk and go to failsafe. Run lilo. You should then be good to go. To end - look into it a bit and I am sure others with more recent experience will provide information or corrections to my general outline. praedor
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
