Re: moving partitions to another hard drive

2001-05-23 Thread ktb
On Wed, May 23, 2001 at 12:07:10PM +1000, Renai LeMay wrote:
 ok, I have asked this question before, in a slightly different form, but I 
 couldn't find it in the archives,
 
 say I had two IDE hdd's, hda and hdb.
 
 say that hda was composed of a swap partition and /.
 
 how would I create a situation where all my data and my swap partition was on 
 hdb instead of hda?
 
 ie - so I could take hda out and throw it away?
 

There was just a huge string on this, search for the subject - 
Copying one hard drive to another

I did this recently with no problems.  Here is the bare bones of it -

Put both drives in and create your partitions on hdb with fdisk or
cfdisk.
Create your file systems with mkfs.ext2 -c and mkswap -c
Mount /dev/hdb1 and copy / on hda over with cp -ax
Swap the drives and replace.

See the howto at -
http://www.linuxdoc.org/HOWTO/mini/Hard-Disk-Upgrade/index.html
kent

-- 
 From seeing and seeing the seeing has become so exhausted
 First line of The Panther - R. M. Rilke




Re: moving partitions to another hard drive

2001-05-23 Thread Phillip Deackes
On Tue, 22 May 2001 23:04:49 -0500
ktb [EMAIL PROTECTED] wrote:

 Put both drives in and create your partitions on hdb with fdisk or
 cfdisk.
 Create your file systems with mkfs.ext2 -c and mkswap -c
 Mount /dev/hdb1 and copy / on hda over with cp -ax
 Swap the drives and replace.
 
 See the howto at -
 http://www.linuxdoc.org/HOWTO/mini/Hard-Disk-Upgrade/index.html

The Hard-Disk-Upgrade is indeed a very useful document. I would add
something to what Renai has written - remember that when you come to
reboot your system with the new drive there will be nothing in the master
boot record so you will need a floppy boot disk. I have a dos-formatted
bootable floppy containing loadlin and an autoexec.bat which reads: 

loadlin vmlinuz root=/dev/hda2 ro

I like loadlin for bootable floppies because it is so easy to simply
change the /dev/hda2 bit to point to any partition. If you don't have DOS
on your machine you can even boot with another DOS floppy (like disk one
of a DOS install set), run Edit and change the partition reference. There
is no messing with LILO. All you need to do is create a bootable DOS
floppy, copy loadlin and your current kernel onto it and create
autoexec.bat as above. That's it.

Once you have managed to boot your new Linux partition you can, of course,
re-run LILO and you are back in business.

-- 
Phillip Deackes
Using Progeny Debian Linux



moving partitions to another hard drive

2001-05-22 Thread Renai LeMay
ok, I have asked this question before, in a slightly different form, but I 
couldn't find it in the archives,

say I had two IDE hdd's, hda and hdb.

say that hda was composed of a swap partition and /.

how would I create a situation where all my data and my swap partition was on 
hdb instead of hda?

ie - so I could take hda out and throw it away?

thanks,

Renai