Go Back   PCMech Forums > Linux Support > Linux OS and Software Assistance

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Old 06-27-2000, 08:06 PM   #1
Premium Member
 
Statica's Avatar
 
Join Date: Jun 1999
Posts: 9,231
Post

As alternatives you can also use 3rd party software .. like GNUpart http://www.gnu.org/software/parted/
Statica is offline   Reply With Quote
Old 06-28-2000, 05:50 AM   #2
Member (2 bit)
 
Join Date: Jun 2000
Posts: 2
Post

I have a Linux box set up, and I want to put in another hard drive and copy the first one to it. What is the easiest and fastest way to do this?

I already have the second drive hooked up, so how do I get to it from Linux? Do I use the mount command?

Thanks
slickwilly25 is offline   Reply With Quote
Old 06-28-2000, 07:56 AM   #3
Premium Member
 
Statica's Avatar
 
Join Date: Jun 1999
Posts: 9,231
Post

Hi Slickwilly25:

Ok now, Linux will let u mirror out your hard drive just fine, but if the sizes are different you will need to partition your new drive in preparation. These are some of the steps you would need to do [err these are explained in terms of the allmighty console to make my solution generic]
Legend: hdb is your new drive and hda the original

1) Your new drive is inside [am assuming its IDE .. change signs if its SCSI]
2) run: [b]fdisk /hdb
create identical partition schema
3) for each new partition you will need to:
mke2fs -c /dev/hdbX
4) edit /etc/fstab with your favourite editor
it should be something along the lines of
/dev/hdb1 /d1 ext2 defaults 1 0
/dev/hdb2 /d2 ext2 defaults 2 0
.
.
.
u can add or the mount points you want as represented by /d1 and /d2 in my example

If you dont know what the fstab is about, I'd recommend
using Linuxconf thru your GUI or simply 'man fstab'
you can then mount these partitions [no reboot necessary] with
mount /d1; mount /dev/hdb2 etc..

5) now to copy contents:
- if the drives are identical you can simply do a:
cat /dev/hda >/dev/hdb
- for nonidentical drive sizes of course as mentioned make identical partitions then do a
cat /dev/hda1 >/dev/hdb1
cat /dev/hda2 >/dev/hda3
.
.
.


Be aware that you cant simply mirror the MBR / Lilo if you are using it .. you will need to boot from floppy after you are done, then run Lilo

Cheers


PS: long yes .. but hopefully its comprehensive enuff

Statica is offline   Reply With Quote
Old 06-28-2000, 09:19 AM   #4
Member (2 bit)
 
Join Date: Jun 2000
Posts: 2
Post

Thanks for the quick reply. Let me give you a little more information about the setup. The first drive is a 3.2 GB Fujitsu, and the second drive is a 13 GB Western Digital. Both are IDE devices.

quote:
Originally posted by Ex-Static-Cling:
[b]Hi Slickwilly25:

Ok now, Linux will let u mirror out your hard drive just fine, but if the sizes are different you will need to partition your new drive in preparation. These are some of the steps you would need to do [err these are explained in terms of the allmighty console to make my solution generic]
Legend: hdb is your new drive and hda the original

1) Your new drive is inside [am assuming its IDE .. change signs if its SCSI]
2) run: fdisk /hdb
create identical partition schema
3) for each new partition you will need to:
mke2fs -c /dev/hdbX
4) edit /etc/fstab with your favourite editor
it should be something along the lines of
/dev/hdb1 /d1 ext2 defaults 1 0
/dev/hdb2 /d2 ext2 defaults 2 0
.
.
.
u can add or the mount points you want as represented by /d1 and /d2 in my example

If you dont know what the fstab is about, I'd recommend
using Linuxconf thru your GUI or simply 'man fstab'
you can then mount these partitions [no reboot necessary] with
mount /d1; mount /dev/hdb2 etc..

5) now to copy contents:
- if the drives are identical you can simply do a:
cat /dev/hda >/dev/hdb
- for nonidentical drive sizes of course as mentioned make identical partitions then do a
cat /dev/hda1 >/dev/hdb1
cat /dev/hda2 >/dev/hda3
.
.
.


Be aware that you cant simply mirror the MBR / Lilo if you are using it .. you will need to boot from floppy after you are done, then run Lilo

Cheers


PS: long yes .. but hopefully its comprehensive enuff




slickwilly25 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:08 AM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0