LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-21-2006, 10:52 AM   #1
crispx
LQ Newbie
 
Registered: Dec 2006
Location: NW, Georgia
Distribution: Fedora
Posts: 12

Rep: Reputation: 0
Fedora PATA > SATA clone issues


Background:
Fedora Core 1 http server with ATA drive that I'd like to upgrade the hardware,OS & site software.

I used dd_rescue to clone the ATA 30Gb drive to a 80Gb SATA drive. I did this on a "hot" system and used mysqldump files to repair the databases, which worked fine. Also testing part of the "rapid" rollover upgrade process for the web app.

This all works well. The cloned drive boots, I used the gparted live-CD to resize all the partitions (great utility).

The problem:
All the grub refernces still refer to hda rather than the new sda, but everything will run OK. However, this creates problems on the OS upgrade, which I can kludge around things like swap file pointer & such.
Bottom line, I'd like to clean it up and have everything referencing the SATA sda drive.

Perhaps if I under stood the intricacies of the Fedora boot process I could clean it, but some of this seems to be embedded in the binaries from what I can tell.

Any suggestions on how to clean this up? Or a better method to clone & transition the hardware?

Thx, Regards,
Chris
 
Old 12-21-2006, 11:42 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
I am not aware of any way to upgrade FC1--why not just do a fresh install of FC5, 6, CentOS, etc.?

Are you saying it boots up without changing hda to sda in the grub configuration? How does that little miracle occur?

What does this mean?:
Quote:
All the grub refernces still refer to hda rather than the new sda, but everything will run OK. However, this creates problems on the OS upgrade, which I can kludge around things like swap file pointer & such.
What problems?
 
Old 12-21-2006, 11:44 AM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I doubt it.

To move a Linux from one disk to another disk, even on different computer and/or to different partition all you need to do with a Grub-boot distro are

(1) Amend the kernel statement with the parameter "root=" to reflect the new partition reference. If you haven'r change the partition order then there is no need to touch the root statement as Grub names the partitions and disks by a numbering system starting from 0.

(2) Amend /etc/fstab to make sure the files the Linux must boot has sda reference instead of hda

(3) You may edit /boot/grub/device.map to tell Grub the hda is now sda for (hd0).

I have migrated many distros from disk to disk using the above. Many distros in my PC were installed 2 computers before.

Fedora likes to use LVM and the reference in "root=" is usually a label of the partition. Since you cloned the disk by dd I expect the partition label remains the same.

Last edited by saikee; 12-21-2006 at 12:02 PM.
 
Old 12-21-2006, 11:59 AM   #4
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
Quote:
Since you clone the disk by dd I expect the partition label remains the same.
Here's a problem! If the labels are the same on both drives and they are both still intalled, you may be still booting to the old system.

If you take the original drive out, then fixing the files like saikee mentions should get you started.

If you want to run it with both drives, you need to change the labels using the e2label command.
So, if you change /boot to /boot2 for the new drive, then you also need to change that to boot2 in the sda /etc/fstab.


Can you post the output of
fdisk -l
grub.conf
fstab
 
Old 01-14-2007, 01:18 AM   #5
crispx
LQ Newbie
 
Registered: Dec 2006
Location: NW, Georgia
Distribution: Fedora
Posts: 12

Original Poster
Rep: Reputation: 0
homey --
Sorry about being so late in getting back to you & others.
Yes, drives with duplicate boot partitions won't boot. I was using dd_resuce with an eSATA link. Although I did this from a "live" system, it should have really been done with something like Knoppix. In my case I had to restore the mySQL database to repair problems. Interestingly, the cloned SATA disk ran fine until I attempted to upgrade. Upgrading because I wanted to retain various current setups. My problem was attempting to go to Fedora Core 4, which apparently has know bugs with upgrades, my BAD.

Why Core4? I had other probs with a CMS system going straight to Core6. I was forced to do a partial upgrade of the CMS at Core1, upgrade to Core6, then complete the CMS upgrade. Very painful. Fortunately I a had an intermediate version of the CMS running on the same disk and it ran OK, so that was a good clue that I did have a way to get there.


To do the upgrade to Fedora Core6 I had to change the fstab swap from hda# to sda#, then the upgrade ran OK.
 
Old 01-14-2007, 01:38 AM   #6
crispx
LQ Newbie
 
Registered: Dec 2006
Location: NW, Georgia
Distribution: Fedora
Posts: 12

Original Poster
Rep: Reputation: 0
All --
Saikee I couldn't figure out the Core4 upgrade probs & scrapped it. I would call my skills weak in most areas.
I wasn't running LVM, so in the process I went to a larger drive and used the Gparted live CD to resize the partitions and it worked perfectly. For anyone that might be wondering about Gparted, it's great, but currently doesn't support LVM. The only little trick that might be useful to others, I had a extended partition. To move it I had to first resize it to the drive max, move/resize the partition contained in the extended partition. Then I could slide the extended partition over. Finally I could expand the root partition. Also, the extended partition showed up as Win95 as I recall, which was a surprise.
Thanks,
chris
 
  


Reply

Tags
clone, gparted, upgrade


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
New motherboard with SATA and PATA won't boot linux from PATA centosian Linux - General 4 08-14-2006 10:24 AM
Moving OS Install from PATA to SATA larsenmtl Linux - Hardware 3 11-13-2005 11:32 AM
SATA detected, but PATA not bioboi69 Linux - Hardware 0 10-23-2005 07:19 AM
PATA with SATA cherif Linux - Hardware 3 12-08-2004 01:38 PM
6300ESB SATA/PATA Controller nicholai Linux - Hardware 0 05-21-2004 07:48 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration