LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-04-2005, 08:19 AM   #1
saranga2000
LQ Newbie
 
Registered: Nov 2004
Posts: 7

Rep: Reputation: 0
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
 
Old 01-04-2005, 09:31 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi there
if u want some good tools for cloning then visit

www.ultimatebootcd.com

and regardng ur query

dumping all partions is fine but u cannot copy the MBR from on dislk to another disk
instead u ned to boot from a rescue /LIVE cd
chroot to ur linux partion where u have copied these files
then install lilo or grub

also ur fstab reflect ur partiton table so depending on how ur partion table has changed and how many partions u have in ur disk ,fstab will be altered

also if u ke p the disk wth same partitions then ur fstab need not be changed

regards
 
Old 01-10-2005, 07:51 AM   #3
saranga2000
LQ Newbie
 
Registered: Nov 2004
Posts: 7

Original Poster
Rep: Reputation: 0
hi masand,
thanks for the tip. a tool i got off the ultimate boot cd site was most helpful. i was able to successfully clone my disk and create logical volumes et all.

I have rated your reply. thanks
 
Old 01-10-2005, 11:04 AM   #4
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hey that was good!!!

which tool did u use as i haven't used all that tools from there

regards
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual boot Linspire & Win XP - new master boot record? jimbo5454 Linux - Newbie 5 07-23-2006 12:06 AM
Smart Boot Manager wont boot dos on logical part. AlanL Linux - Software 5 09-01-2005 12:25 AM
cloning logical volume with dd astrowill Linux - General 3 07-13-2005 09:59 AM
master boot record help sfr7 Linux - Laptop and Netbook 10 04-25-2004 08:52 AM
master boot record dark_light Linux - General 11 07-03-2002 05:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration