cloning both partitions, dual boot system, master boot record, logical volume manager
Hi,
I am a newbie to linux, especially the more advanced topics. I am presently trying to clone my disk on to a bigger one. ( I have made a complete backup of my exisiting system using mkCDRec. I cant use the same to clone as I want to clone both win2k & linux partion and more importantly resize the linux partitions).
I presently have a dual boot system with Win2k & Redhat Linux El3.0( "Linux alpha 2.4.21-4.EL #1 Fri Oct 3 18:13:58 EDT 2003 i686 i686 i386 GNU/Linux" ) on my 10 Gig harddrive. 4 gigs has been given for Win2k and the rest for Linux. Grub is installed, and the boot process is from Grub, which has the Linux as the default boot option. ( Redhat EL3.0 was the only decent distribution available immediately on a CD, thats why I chose EL3.0).
parted /dev/hda gives
Disk geometry for /dev/hda: 0.000-9768.383 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 4000.561 primary ntfs boot
2 4000.562 9766.076 extended lba
5 4000.592 4102.536 logical ext3 ----------------/boot
6 4102.567 6228.325 logical ext3 ----------------/usr
7 6228.356 7255.920 logical ext3 ----------------/home
8 7255.951 8283.515 logical ext3-----------------/root
9 8283.546 9036.562 logical linux-swap
10 9036.593 9546.438 logical ext3---------------/var
11 9546.469 9656.257 logical ext3---------------/opt
12 9656.288 9766.076 logical ext3----------------/tmp
/etc/fstab is:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
LABEL=/home /home ext3 defaults 1 2
LABEL=/opt /opt ext3 defaults 1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/var /var ext3 defaults 1 2
/dev/hda9 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
I recently got a 20 gig ide disk. I want to migrate the present system setup to the new disk. I have to return my older ( 10 gig) disk, so I cant mount the new disk etc etc.
The old disk is named hda ( 10GB) the new one is hdd ( 20G)
I mounted the 2nd disk and partitioned it using parted as below:
Disk geometry for /dev/hdd: 0.000-19092.937 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 4000.561 primary fat32 boot
2 4000.562 19092.875 extended lba
5 4000.592 4102.536 logical ext3
6 4102.567 5130.131 logical ext3
7 5130.163 5483.122 logical linux-swap
8 5483.153 19092.875 logical ext3 lvm
My questions are ( some of them must be really stupid, so please excuse, but kindly answer)
1) Can I make a clone in the following way?
a) create logical volumes for /usr, /home, /opt, /var, /tmp in the lvm partition ( hdd8)
b) diskdump /boot, /root from hda to /boot & /root partitions in hdd ( hdd5, hdd6)
c) create logical volumes /usr,/opt, /home, /tmp, /var under hdd8
d) dump /usr,/home, /opt, /tmp, /var from hda to the corresponding logical volumes under /dev/hdd
e) do I need to change the /etc/fstab entries? if yes what and how? ( how do i do this, could someone give me a clear step by step explanation)
f) do I need to copy the master boot record from hda to hdd? how can I do it? do I need to change it to reflect the correct size of the new disk? what else do I need to do? how do I do it? is there any utility ( something like MBWiz). Could someone give the exact steps, and the place where I need to copy to.
g) Now after all the above steps, I am guessing, I should be able to boot the linux.
h) to install win2k, i plan to reboot the sytem with the windows installation cd. i am guessing i can choose the win2k fat32 partition (hdd1) when the installer asks me where to install win2k. i will install under hdd1 ( or the equivalent, i understand that windows doesnt recognize hdd etc, but i am hoping it will show 2 partitions, one a fat32 the other ext3). I guess after i install win2k, it will overwrite the MBR. If I recopy/replace the MBR backedup after step g, all should be fine and the system should now be able to boot win2k/linux via grub.
Or so is my theory. Could someone please kindly tell me if im right? Any and every guidance from people who have similar experience/ gurus would be most useful, appreciated. If I am wrong, could someone tell me how I can accomplish what I want.
Thank you for sparing your valuable time.
Vinod
|