Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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?
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.
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.
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
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.