Moving a Disk from HDC to HDA?
I have upgraded my Linux box to a shuttle 41G from a standard PC tower. In the process I have moved only one of the disks (an old slow and very small disk that I though wasn't being used had been left in the old chassis)
Assembly of the machine was fine but when I switch it on it refused to boot. All the tests work etc but the machine can not boot from the drive which contains RH9 with all the latest patches etc.
I think the problem is that the drive was formally the master on the secondary channel of the old machine but it now the only drive on the primary channel of the new machine. Effectively its been moved from hdc to hda. Also there is no MBR on the drive. (I do have an emergency floppy)
I have an ISO image of SUSE on cd rom and have been able to boot the machine with it and look at the drive (hda) with all the data on it. I tried to reinstall grub into the mbr on hda but to do this grub-installer needs to build a list of drives and store them in /boot. This is impossible becasue /boot is on the cdrom!
Can anyone suggest how I could boot from either the SUSE cd or the floppy and change the previous hdc refs to hds (I know how to change the grub.conf files) I guess I need to change all the mount points too (/etc/???) and perhaps reinstall grub after using a floppy boot. But is there anything else?
I would rather not reinstall the RH - it would take ages to repatch it.
- boot with Suse
- mount your old file system to a tmp directory (e.g. /mnt/tmp)
- chroot to /mnt/tmp
- edit your /etc/fstab to reflect the changes
- edit and update grub (sorry I don't know anything about grub, I use lilo)
- exit chroot and unmount /mnt/tmp, reboot.
Thanks for that - but how do I fix the missing MBR?
There's a "-M" switch in Lilo to install a MBR.... maybe there's a option in grub similar to this, have a look in man page of grub?
Let's hope someone else can answer you as I really haven't use grub before :p
For this to work you have to get redhat boot cd. You can boot from the redhat bootable cd in to the rescue mode. Now mount the root filesystem by typing
now edit the fstab to ur liking.
To install grub on MBR type
to install on the root partiton type
grub-install /dev/hda(x) where x is your partition number on which grub is to be installed.
hope it helps.
|All times are GMT -5. The time now is 09:15 PM.|