H.S.Rai wrote:

>I want to replace  my old HDD 20 GB with new 40  GB HDD. Old HDD has a
>number of  partition and is dual  boot. I want to know  easiest way to
>copy complete content  of all partitions (Linux & Window)  on new HDD,
>first by making new HDD as secondry, and them moving it to primary.
>
>I have  "mirrordir" installed  on my  sytsem. Can it  do this  job? or
>something like "dd"?   Do I need to first create  all partition on new
>disk of exactly same size or some utility can do all this.
>
There was old discussion regarding this issue. Check the archive

just for a small help

this would do a possible help for you.

You can't dd unless both the hard disks are having same exact physical 
geometry.
If you want to then you will have to physically modify the partition 
table.(But it is not a good solutions)

Read and understand the implications, make sure you have a perfect match
between the rescue disk and your actual installation.

1. create same set of partitions *not necessarily* the same size

2. then format with any compatible filesystem for each partition that 
you are trying to map
    Or may be if you don't want separate parition then leave it as one
     But you have to fiddle with your fstab and

4. Have your linux CD, boot from your linux CD then go to the 
repair/rescue mode

5. check to make sure you can do chroot

6. check to make sure you have access to tar

7. Then now mount all the partitions in their respective places
    as an example
    src                                    dest
    hda                                   hdb
---------------------------------------------------------
hda1 -> /mnt/disk1/             hdb1 -> /mnt/disk2/
hda6 -> /mnt/disk1/var        hdb1 -> /mnt/disk2/var
hda7 -> /mnt/disk1/usr        hdb1 -> /mnt/disk2/usr
hda8 -> /mnt/disk1/opt        hdb1 -> /mnt/disk2/opt
hda9 -> /mnt/disk1/export   hdb1 -> /mnt/disk2/export

8. Shadow the filesystem using (cd /mnt/disk1/; tar cf - *)  | (cd 
/mnt/disk2/; tar xf - *)

9. chroot to /mnt/disk2/
10. Modify lilo/grub config files then install boot loader to the hdb

remove or move hda to somewhere else eand make hdb as hda

There will now data loss. but you may lose access to your syste for a while.

One more suggestion? why do you want to make multiple partitions when 
you have only one harddisk
having one single it will probabily increase the performance, but may 
waste lots of disk space on high capacity hard disk




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to