[H-GEN] Transferring a RH Linux system from one drive to another
Anthony Towns
aj at azure.humbug.org.au
Mon Jan 11 23:46:15 EST 1999
On Tue, Jan 12, 1999 at 02:30:42PM +1000, Campbell wrote:
> sigh.. Time for me to pick the humbug collective brain again..
> Suppose:
> I am trying to transfer a system from one set of drives to another one.
There are a few problems here, apart from just getting the files across,
mainly related to boot up:
LILO has to be made to point to the right root device
/etc/fstab has to be made to point to the right devices
Otherwise, it's not too much of a bother.
> 1a: is there a limit on hard drive size for the drive the root partition is
> on?
Some BIOSes don't like you having your kernel outside the first 500MB
or so. I usually have a ~10MB /boot partition first on my hard drive,
and stick kernels in there. Otherwise there aren't any restrictions,
though. (AFAIK)
> 2: what would be the best way to transfer a system from 2 small drives, to
> one large drive (partitioned as necessary)
Turn the machine off. Boot it in single user mode. fdisk, and mke2fs the
new drive. Mount it under /mnt exactly how you propose to set it up. Then
cp -a /(everything but mnt) /mnt/
If you the other drive is the secondary drive (ie, not / or /usr or anything
important) in another machine, and you have ssh (or rsh) setup properly and
a LAN between the two, you can do something like:
old.machine# ssh root at new.machine
new.machine# mount /dev/new /mnt
new.machine# exit
old.machine# tar czf - / | ssh new.machine tar -C /mnt xzpvf -
You'll need to be careful that you've got ssh setup properly first though --
trying a few test tar | ssh untar's would be a good move.
> I have tried ftp'ing the system across with a system running on each drive
> (2 separate machines) , and also tar-ing then and untaring, without
> success.
The "p" option in the second tar above is important.
Basically it's just a matter of ensuring that you're copying /everything/
across (permissions and all), and you're not overwriting anything your
system needs to run. As long as you're /very/ careful about both those
steps, there aren't too many problems to be had, that I can think of.
HTH.
Cheers,
aj
--
Anthony Towns <aj at humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. PGP encrypted mail preferred.
``Like the ski resort of girls looking for husbands and husbands looking
for girls, the situation is not as symmetrical as it might seem.''
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 434 bytes
Desc: not available
URL: <http://lists.humbug.org.au/pipermail/general/attachments/19990112/8349539c/attachment.sig>
More information about the General
mailing list