1. Throw in your second hard drive
2. Format it and mount it - you can use diskdrake for this.
3. Copy over your entire drive to it. Be sure to use the -a switch
# cp -a / /mnt/newdrive
assuming you mounted it at /mnt/newdrive
4. Pull your drives out and swap them over.
5. Make sure your new drive is working fully and nothing unexpected happens before you
destroy the
data on the old drive.
Here's an old message i posted awhile back that pertains to moving /usr (might as well
be moving
/) that i posted awhile back - it was a summary of a bunch of messages on the subject.
Maybe you
will find it helpful.
Date: Thu, 25 Jan 2001 14:07:23 -0800 (PST)
From: John Wolford <[EMAIL PROTECTED]> | Block address | Add to Address Book
To: [EMAIL PROTECTED]
Reply-to: [EMAIL PROTECTED]
Subject: [expert] Summary: How to move /usr to another partition
Greetings again,
Thanks for all the replies re: How to move /usr to another partition?
It's nice to know that what
i was working with SHOULD have worked, on principle. Here is a brief
summary of the "How to move
/usr to another partition?" thread.
1. Resize partition, using Partition Magic or some such thing. [this
will only work if you
actually have the appropriate space on the drive, of course]
All of the following assume that /usr will be duplicated somehow onto
/mnt/usr temporarily, then
/etc/fstab will be updated to reflect the new location, reboot and
presto, you are mounting the
new /usr.
2. copy:
# cp -a /usr /mnt
3. tarball:
# tar cvf /mnt/usr.tar /usr
# cd /mnt
# tar xvfp usr.tar
(Note that this method requires enough free space to hold not just
mnt/usr but also /mnt/usr.tar)
or
# tar cf - /usr | ( cd /mnt ; tar xvfp - )
or
# cd /mnt
# tar cf - -C /usr | tar xvpf
(Note that these last two methods of tarballing only require enough
free space to hold /usr)
Care must be taken to preserve relative links and file permissions if
either 2 or 3 is to work.
Soft links do not support spanning partitions or devices and will cause
failures if this occurs.
An aside: at the time that i was attempting this i was installing and
re-installing on various
drives on the same system. It MAY have been the case that i had a swap
partition on the device
that contained /usr and the device that contained the new /mnt/usr. If
this were true, it could
have caused some problems, i don't know.
Thanks again,
John
--- C Nielsen <[EMAIL PROTECTED]> wrote:
> Hello from the frozen north;
>
> I'm planing to upgrade my harddisl from an 8gig to a 20 gig and was wondering
>how to move over
> to the new drive with little or no pain.
> I'm running Mandrake 7.2.
> thanx
> --
> Linux Counter #188953
> Linux Machine #85790
>
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/