On Tue, 17 Oct 2000, Michael McLeod wrote:
> I have 2 hard drives one for windoz and one for LINUX. The Linux drive
> is nearly full (1.5gb) so I want to replace it with a larger (10 gb).
> I want to make a small (1 gb) partition for Dos and the remainder for
> Linux.
I for one wouldn't recommend Partition Magic. (I only say that because I
saw others do so ;)
The fastest and safest (and incedentally cheapest) way to copy the drive
is going to be creating a new filesystem on the new drive, and copying the
files using either GNU cp or GNU tar.
First, create a bootdisk to boot linux with after you move the
drive. It's easier than the voodoo needed to get lilo to correctly
install on the drive before the move. Next create your partitions and
filesystems on the second drive. Mount your new root filesystem on
/mnt/floppy:
mount /dev/hdb6 /mnt/floppy -t ext2
Use one of the two commands to copy the files from one drive to the other:
cp -avx / /mnt/floppy
(cd / ; tar cplf - . ) | ( cd /mnt/floppy ; tar xpf - )
In the first example, cp is told to act in "archive" mode, preserving file
attributes as well as possible (-a), print out the file names as they're
copied (-v) and not to copy files on filesystems other than the root
filesystem (-x).
In the second example, tar is started from the root directory, and told to
preserve permissions and not descend filesystems. It's output is piped to
a second tar command which will extract the files to the second
drive. This example is probably less efficient than the first (except
possibly on multiprocessor systems), but is useful on UNIX like systems
that don't have GNU cp, and don't accept the -x argument. It's sorta good
to keep in the back of your brain.
MSG
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list