Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* moving linux from one disk to another
@ 1997-10-24  8:45 Roman Martonak
  1997-10-24 15:32 ` Michal Jaegermann
  0 siblings, 1 reply; 7+ messages in thread
From: Roman Martonak @ 1997-10-24  8:45 UTC (permalink / raw)


I have got a new external 2 GB SCSI disk and would like to attach it to
my UDB. So far, my Linux was on the internal 518 MB hard disk, and now
I would like to move it to the external one. My question is whether it is
enough just to partition the new disk and copy the whole linux filesystem 
onto it, or whether the symbol /dev/sda of the internal disk is coded somewhere
in the configuration files or yet somewhere else (apart from the obvious
/etc/fstab) ? What I would like to avoid is to have to install Linux again
on the external disk.

		Thanks for any suggestion,

	Roman Martonak 			    	
	Johannes Gutenberg-Universit"at  	
	Institut f"ur Physik, WA 331           	tel.:   +49 +6131 393323
	D-55099 Mainz	        		fax.:   +49 +6131 395441
	Germany                e-mail: martonak@nero.physik.uni-mainz.de

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: moving linux from one disk to another
@ 1997-10-24 10:35 Martin Ostermann
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Ostermann @ 1997-10-24 10:35 UTC (permalink / raw)


> I would like to move it to the external one. My question is whether it is
> enough just to partition the new disk and copy the whole linux filesystem 
> onto it, or whether the symbol /dev/sda of the internal disk is coded somewhere
> in the configuration files or yet somewhere else (apart from the obvious
> /etc/fstab) ? What I would like to avoid is to have to install Linux again
> on the external disk.

That should work fine, I did this several times that way.

Of course you should test the new system before deleting the old
disk. Remember, when you copied the stuff, the new disk might be
/dev/sdb. Once you remove your first disk, this becomes /dev/sda
again. So boot your new system, edit /dev/fdisk, remove the other
disk, and reboot. 

If you switch to different SCSI-IDs, you might have to 
adjust your boot loader settings as well. 

-- 
Martin Ostermann                | mailto:ost@comnets.rwth-aachen.de
Communication Networks          | http://www.comnets.rwth-aachen.de/~ost
Aachen University of Technology | phoneto:++49/241/807917
Germany                         | faxto:++49/241/8888242

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: moving linux from one disk to another
  1997-10-24  8:45 moving linux from one disk to another Roman Martonak
@ 1997-10-24 15:32 ` Michal Jaegermann
  0 siblings, 0 replies; 7+ messages in thread
From: Michal Jaegermann @ 1997-10-24 15:32 UTC (permalink / raw)


> 
> I have got a new external 2 GB SCSI disk and would like to attach it to
> my UDB. So far, my Linux was on the internal 518 MB hard disk, and now
> I would like to move it to the external one.
> My question is whether it is
> enough just to partition the new disk and copy the whole linux filesystem 
> onto it,

It will work just dandy.  Use simply 'cp -a' but remember to skip /proc
and a mount directory for your new disk in the process.  'cp -a' will
handle /dev correctly  (other methods of copying use 'tar' or 'cpio' or
something like that, on stdout piped to another process reading stdin, to
copy things around but 'cp -a' is the simplest).  Create 'proc' directory
on a new disk to provide a mount point , adjust 'fstab' and you may ask
milo to boot from your new disk without blowing anything on your old one.
This is a good check that you have everything in order. Actually simpler
than on Intel. :-)

> What I would like to avoid is to have to install Linux again
> on the external disk.

No need.  On one machine I have actually a cron process which
updates periodically a mirror system on a "spare" disk.  In
a case of a disaster the machine can be just rebooted from this
"spare" (not remotely, someobody has to type on a console).

Actually the simplest way to get an answer to your question is just
to try.  Not very much involved in that. :-)

  Michal

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: moving linux from one disk to another
@ 1997-10-25 13:59 John Ross Hunt
  0 siblings, 0 replies; 7+ messages in thread
From: John Ross Hunt @ 1997-10-25 13:59 UTC (permalink / raw)


Here's an easier way.  Assuming the second disk is partitioned and formatted, 
create a mount point and execute a shell script like this.  All you need to do 
is substitute your device name and make similar corrections in /etc/fstab and 
you're set.

#! /bin/sh

cd /
mount -t ext2 /dev/sdb3 /mnt/disk2
find / -depth -xdev -print | cpio -padvVmB /mnt/disk2

-John Ross Hunt

-----Original Message-----
From:	Michal Jaegermann [SMTP:michal@ellpspace.math.ualberta.ca]
Sent:	Friday, October 24, 1997 10:32 AM
To:	axp-list@redhat.com
Cc:	martonak@nero.physik.uni-mainz.de
Subject:	Re: moving linux from one disk to another

>
> I have got a new external 2 GB SCSI disk and would like to attach it to
> my UDB. So far, my Linux was on the internal 518 MB hard disk, and now
> I would like to move it to the external one.
> My question is whether it is
> enough just to partition the new disk and copy the whole linux filesystem
> onto it,

It will work just dandy.  Use simply 'cp -a' but remember to skip /proc
and a mount directory for your new disk in the process.  'cp -a' will
handle /dev correctly  (other methods of copying use 'tar' or 'cpio' or
something like that, on stdout piped to another process reading stdin, to
copy things around but 'cp -a' is the simplest).  Create 'proc' directory
on a new disk to provide a mount point , adjust 'fstab' and you may ask
milo to boot from your new disk without blowing anything on your old one.
This is a good check that you have everything in order. Actually simpler
than on Intel. :-)

> What I would like to avoid is to have to install Linux again
> on the external disk.

No need.  On one machine I have actually a cron process which
updates periodically a mirror system on a "spare" disk.  In
a case of a disaster the machine can be just rebooted from this
"spare" (not remotely, someobody has to type on a console).

Actually the simplest way to get an answer to your question is just
to try.  Not very much involved in that. :-)

  Michal

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: moving linux from one disk to another
       [not found] <01BCE124.8EA23A80.hunt@lbpc.com>
@ 1997-10-25 16:03 ` Michal Jaegermann
  0 siblings, 0 replies; 7+ messages in thread
From: Michal Jaegermann @ 1997-10-25 16:03 UTC (permalink / raw)


John Ross Hunt wrote:
> 
> Here's an easier way.
...
> find / -depth -xdev -print | cpio -padvVmB /mnt/disk2

With this caveat the the above will not work if your current
installation is using more than one partition (it can be fixed).
'-xdev' is a stumbling block and you **really** do not want
to skip it.

Otherwise the line above has one advantage over 'cp -a' - you do
not have to worry about creating 'proc' on your target directory.
Easier?  I will not argue as this is a matter of taste.  :-)
But the line above is practically equivalent to 'cp -ax / /mnt/disk2'
and the same limitations do apply. I did not want to complicate
matters. :-)  More "trouble" if your target disk has multiple
partitions and their numbers on both disks are not necessarily the same.

John is right that on a Unix installation with a less capable 'cp' one
has to do something like the above.  For example (root partition only):
   tar -clf - / | (cd /mnt/disk2 ; tar -xpf - )
which can be a bit simpler and safer with GNU tar.  Depending on what you
have on hands there are few other similar methods.  Take your pick. :-)

Summary: a totally "fool-proof and easy" method of cloning your whole
installation on another disk does not exist.  You will have to think
a bit about what you are doing and with what.

  Michal

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: moving linux from one disk to another
       [not found] <199710251603.KAA03016@ellpspace.math.ualberta.ca>
@ 1997-10-27 13:21 ` Roman Martonak
  0 siblings, 0 replies; 7+ messages in thread
From: Roman Martonak @ 1997-10-27 13:21 UTC (permalink / raw)


Thanks to all who suggested me how to do it. I used cp -axv and everything
worked fine.

	Roman Martonak 			    	
	Johannes Gutenberg-Universit"at  	
	Institut f"ur Physik, WA 331           	tel.:   +49 +6131 393323
	D-55099 Mainz	        		fax.:   +49 +6131 395441
	Germany                e-mail: martonak@nero.physik.uni-mainz.de

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: moving linux from one disk to another
@ 1997-10-27 20:39 Robert L. Millner
  0 siblings, 0 replies; 7+ messages in thread
From: Robert L. Millner @ 1997-10-27 20:39 UTC (permalink / raw)


I have found that one of the following is quite fast and takes care of
problems that you will get into with cp:

for a whole disk copy (the fastest per data):

dump -0 -f - diskname | ( cd mountpt; restore -rf - )

For subdirectory to subdirectory:

find startdir -print | cpio -pad destdir

or

cd  startdir ; tar -cf - * | ( cd destdir; tar -xpf - )

	Rob

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1997-10-27 20:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-10-24  8:45 moving linux from one disk to another Roman Martonak
1997-10-24 15:32 ` Michal Jaegermann
  -- strict thread matches above, loose matches on Subject: below --
1997-10-24 10:35 Martin Ostermann
1997-10-25 13:59 John Ross Hunt
     [not found] <01BCE124.8EA23A80.hunt@lbpc.com>
1997-10-25 16:03 ` Michal Jaegermann
     [not found] <199710251603.KAA03016@ellpspace.math.ualberta.ca>
1997-10-27 13:21 ` Roman Martonak
1997-10-27 20:39 Robert L. Millner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox