LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-29-2003, 08:40 AM   #1
graffitici
Member
 
Registered: Jun 2003
Location: Istanbul - Turkey
Distribution: Fedora, Gentoo
Posts: 150

Rep: Reputation: 15
hdd migration (sorry)


hi everybody!

Like all regular computer users, the time for a harddisk upgrade came. My previous 40 gig wasn't sufficient enough, so I just got a 120 gig one. And just like fpr all computer users, this upgrade will make my few upcoming days a living hell. I have tried many software for migration, but I can't trust them. They are mostly written for win and frankly my redhat9 is for more precious than my two windoze partitions.

I have read a couple of other threads about this subjects. Some suggests that a dd command would do the job. Others say that even copying the whole partition to the new one is enough. The second options seems more feasible, yet there is another problem. I partition my drives using PartitionMagic 8 (reallyy the best partitioning app around, it is absolutely worth the price). Last time, when I first installed RH, the installer asked me whether it should perform a format (which i had already done using my app). After that PM was unable to recognize any information on that drive. It said with big letters : BAD!

I don't want this to happen again. How should I proceed? I don't need a detailed walkthrough since I am experienced enough, but I definitely need some guidelines.
Thanks for your help!
 
Old 11-29-2003, 10:37 AM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,333

Rep: Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547
I have installed new disks several times. The way that I do it is this:

Use fdisk to partition the drive
Use mkfs to create the file systems
Mount a new partition
Use the cp command with -pR options to copy a partition to the new partition. ( You sometimes run into problems copying /proc or /dev on the running system. You can use a rescue CD to copy /dev and /proc.)
Change /etc/fstab and /etc/lilo.conf on the new partition.
Change lilo on the old partition to dual boot.
Boot the new partition and then change the MBR from the old lilo boot record to the new lilo boot record.

That takes care of Linux. I have not copied Windows for over 4 years so my memory of how to do it is rusty but you can use a similar procedure with Windows. You may run into problems with Microsoft's paranoia about pirating software and have to install Windows on the new disk instead of just copying it.

dd and other disk copy programs can cause some problems with absolute disk addresses because the absolute disk addresses on the new disk will be diferent than those on the old disk. Boot loaders often use an absolute disk address for their initial read and therefore fail when you change the absolute address of what they are looking for.


___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

Last edited by jailbait; 11-29-2003 at 10:40 AM.
 
Old 11-29-2003, 12:11 PM   #3
graffitici
Member
 
Registered: Jun 2003
Location: Istanbul - Turkey
Distribution: Fedora, Gentoo
Posts: 150

Original Poster
Rep: Reputation: 15
Ok So I'll first partition using PartitionMagic (hey i really like this software!) as ext2 (or ext3?? how can I learn that??). Then I'll boot with a rescue disk.Since all disks have cp I probably won't run into trouble, and copy all the drive. What about the boot sector? You see currently the first partition on my primary drive was a 60 meg boot area. Should I create that and copy the previous content to the new one, just like the root directory? Or can I just create it and reinstall grub so that it does it on his own? Would there be any hardware problems if I do the latter?

Thanks a lot for you help Steve, I appreciate you supporting me in these difficult times.....
 
Old 11-29-2003, 01:28 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,333

Rep: Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547
"as ext2 (or ext3?? how can I learn that??)."

ext2 and ext3 are very similar. The difference that ext3 is a journaling version of ext3. You can recover from crashes much faster using ext3 than ext2, although both are very reliable in recovering from crashes.

"You see currently the first partition on my primary drive was a 60 meg boot area. Should I create that and copy the previous content to the new one, just like the root directory? Or can I just create it and reinstall grub so that it does it on his own? Would there be any hardware problems if I do the latter?"

You should create that and copy the previous content to the new one. You should create all of the new partitions using Partition Magic and then format each partition using mkfs. The partitions do not all have to be the same file system type. You can make some ext2, some ext3, and some vfat. I don't think that mkfs will create the Windows XP file sytem type, whatever that is called.

Then boot the rescue disk and do the copies. Be sure to use the cp -p option or all of your files will belong to root.

"What about the boot sector?"

Once you get your new disk set up, boot it, set up grub the way that you want, and run grub-install. grub-install will overwrite your MBR with a boot loader pointing to grub.conf on your new disk. Then you can safely destroy the grub.conf on your old disk. Before you do this you might set up a boot floppy that boots your new disk just in case anything goes wrong when you switch the MBR to the new disk.


___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 11-29-2003, 04:33 PM   #5
graffitici
Member
 
Registered: Jun 2003
Location: Istanbul - Turkey
Distribution: Fedora, Gentoo
Posts: 150

Original Poster
Rep: Reputation: 15
And what if my current system is ext2 and I want to switch to ext3? can I simply format it the way i want and copy as usual?? How can I learn whether I am currently using ext2 or ext3??

thx!!
 
Old 11-29-2003, 05:00 PM   #6
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,333

Rep: Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547
"And what if my current system is ext2 and I want to switch to ext3? can I simply format it the way i want and copy as usual??"

Yes. You format the new partition any way that you want. It does not have to be the same as the old partition.

"How can I learn whether I am currently using ext2 or ext3??"

Try:
fsck -N /dev/hda2
or whatever partition you are interested in. Normally you should not run fsck against a mounted file system but since -N is only displaying information and does not modify the file system, I think it will not hurt anything.


___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

Last edited by jailbait; 11-29-2003 at 05:17 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to make mirror image of linux partion to one1 HDD TO 2 HDD raj_1 Linux - General 2 11-04-2004 01:45 AM
How to format & mount 2nd hdd after FedCor1 has been installed on 1st hdd? clay394 Fedora 1 05-18-2004 01:50 PM
HDD migration ChopSueyX Linux - Software 5 11-22-2003 06:49 PM
Migration to new HDD seanfitz Linux - General 3 08-25-2003 01:35 PM
Migration to larger HDD psycho2000 Linux - Newbie 1 06-05-2003 01:21 AM

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

All times are GMT -5. The time now is 03:57 AM.

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