Artem Trunov wrote:
> Hi, all
>
> Found this old thread while trying to solve own hda/sda problem.
>
> I have installed SL5 on "hda" drive (and it was actually an IDE drive).
>
> Now I took the content of the root partition and cloned it to a second
> machine. This second machine also has an IDE drive, but a different
> brand, which is recognized as sdb (sda is bootable usb stick), not
> hda.
>
> Ok, so after I boot the second machine from the stick, partition the
> hard drive and close the image, I do chroot into the cloned partition
> and install mbr with grub shell. At the same time I notice that in
> chroot'ed env I have "/" mounted on /dev/hda, as reported by "df".
> While fdisk -l would still report /dev/sdb.
>
When you are chrooted, what disk is what can be a little strange. That
is not the time to be messing with disks other than getting the master
boot record on.
You need to remember to bind mount your /dev/ and /proc/ (and I do
/sys/) to the appropriate chrooted area also before running grub-install.
> This is what I don't understand - where in the system it remembers
> that it was on /dev/hda before? I have only labels in /etc/fstab and
> grub.conf.
>
> Now, when I boot from the hard drive of the second mchine, is starts
> ok, loading the splash screen and boot image, but later it wont find
> the root partition and kernel panic in the process of boot. I suspect
> it's related to this fact that system remembers /dev/hda drive it was
> originally installed
>
If you have the graphical grub screen then you are 90% done.
There are two things that you can try that fix it 90% of the time.
1 - edit the root line and change "root (hd0,0)" to "root (hd1,0)"
This is telling it that your root partition is on the other disk. If it
already is set to 1, change it to 0, or even 2 or 3, depending on how
many disks you have in the machine.
2 - edit the kernel line and change "root=LABEL=/" to "root=/dev/hda1"
or whatever you think the appropriate partition is.
This happens when people mirror disks, but forget to label the
partitions of the disks. Another way to fix this is to go into your
rescue USB stick and label the partitions.
> Any words of wisdom from SL gurus?
>
> If I clone to a machine whose HD is recognized as hda as in the case
> or ogriginal installation, all goes well. Only when a new HD is sda,
> it fails.
>
> cheers
> Artem.
>
--
__________________________________________________
Troy Dawson [log in to unmask] (630)840-6468
Fermilab ComputingDivision/LCSI/CSI LMSS Group
__________________________________________________
|