View Full Version : Matrix revisited
9th August 2005, 09:47 AM
Hi, I posted last week about a lot of random characters displayed on booting from a FC4 install. I wonder if asking Partition Magic 7 to fix an anomaly on the disc, after it made a Linux partition was a mistake.
If it has cocked up the MBR (all attempts to reformat the second hdd upon which I'm attempting to install gets nowhere) how do I go about fixing it?
9th August 2005, 10:32 AM
Boot up the first disk, type "linux rescue," press enter, choose "mount my system" or whatever, and run:
bash$ chroot /mnt/sysimage
bash$ grub-install /dev/hda
Might not be /dev/hda if you're not using (an) IDE hard drive[s].
9th August 2005, 10:59 AM
thanks let me just check this out,
hda holds the Xp installation (NFTS), hdc is the one I'm aiming to install on. Are you suggesting I boot from the FC4 DVD and then install grub again on the MBR of hda?
9th August 2005, 11:31 AM
What he is suggesting is to boot into rescue mode. when you get the Linux prompt when booting the DVD type "linux rescue". It will search for your install and tell you where it is.
One thing: During your install where did you select grub to install to and also did you let it install to the MBR of hda or hdc? Some people use the Bios to switch boot drives as you may be doing.
Do the chroot command as above. Then try grub-install /dev/hda
Have you actually installed linux on hdc yet?
9th August 2005, 12:05 PM
thanks for this,
I've tried installing Grub on both the MBR of hda and on hdc, neither make any difference.
In rescue mode it shows the system's been mounted under mnt/sysimage. and suggests I go into a shell and run the command chroot/mnt/sysimage for it to reboot.
Is this a safe option? will I still be able to get into XP?
9th August 2005, 12:33 PM
So, you have installed FC4, good. Can you set your PC to boot from either hda or hdc? If you can do this you will be able to go into rescue mode with your Windows XP CD and do the fixmbr thing (though the commands are a little different now with XP)
All that the shell command is telling you that it will mount the drive as the "/" or root of the directory structure when you do the chroot command. This can make it a little easier to do any work you need to for fixing the setup.
When you installed FC4 did you go into the grub set up options and tell the system how you had you PC set up to boot? This can affect the boot-ability, grub.conf, and what MBR grub gets written to.
When booting from hdc, what do you get (after you have "grub-install /dev/hdc")? do you get a GRUB> prompt or anything similar?
9th August 2005, 12:44 PM
as you rightly guessed I've been changing the BIOS boot options so can chose between hda and hdc.
I've installed so many times I'm not sure what I told Grub I think it's not on hda MBR and it certainly detected the XP boot though I'm not sure which I set as default.
When booting form hdc there's just a string of apparrently random charavters on the screen hence the ref to the Matrux.
I've now got a shell prompt in rescue mode what spell should I write?
9th August 2005, 01:00 PM
once you've "chroot /mnt/sysimage" type "grub"
You will now be at the GRUB> prompt. grub sees hd's a little different: hd0, hd1, hd2....
type "cat (hd2,0)/grub/grub.conf" to see if grub sees everything. It should print on screen the contents of the file. if not then try hd0, hd1, etc till you find it.
once you've found it, you've found where grub see's itself and you can continue.
at the grub prompt type: (replacing the "?" with the appropriate number)
And try rebooting by typing exit twice and the command prompt.
9th August 2005, 01:22 PM
all that's done now seemed to go smoothly, I've just rebooted and entered the BIOS. Where should I now Boot from?
9th August 2005, 01:26 PM
boot from hdc. You may or may not get into fedora but it will be a start to see what is happening now.
If it doesn't boot, post what happens and then I'll see what I can suggest.
9th August 2005, 01:40 PM
booting 'other'rootnoverify (hd0,0)
Error 13 Invalid or unsupported executable format
Press any key...
for a moment there I was getting a bit excited. But why's it looking at (hd0,0) thought grub and FC4 were on (hd1,0)
9th August 2005, 01:46 PM
pressing enter gave me a choice of fedora or other to boot from I tried Fedora then got hte message
Booting Fedora core(.......)
Filesystem type unknown, partition type 0x7
kernel /vmlinuz-2.6.11-1.1369_fc4 ro root=/dev/Vo1Group00/logVo00 rhgb
Error17 Cannot mount selected partition
press any key
9th August 2005, 01:59 PM
OK, now we are getting somewhere. What grub is trying to do is boot hd1 whereas you have switched your boot drives and when it reads the grub.conf file it is trying the second hd which according to your bios is the windows drive. Yes, it's confusing, the same thing happened to me on another PC.
Now, boot into rescue again, chroot /mnt/sysimage and then cd /boot/grub.
now fire up your favorite editor and change the line root (hd1,0) to root (hd0,0) as according to your bios this is the first hd to boot from.
for the "other" which I think you have selected as the default you will have to change the hd that it refers to to hd1.
While you are in there remove the "#" from in front of the hidemenu and increase your timeout to 15.
For editors, I personally like "joe". Pressing ctrl+k then "h" gives you the help menu. Now reboot and boot from hdc, your fedora drive and see what happens.
9th August 2005, 02:17 PM
no grub file in the root directory - ls root shows 'anaconda-ks.cfg install.log install.log.syslog'
and now I've changed directory to root, how do I get out.
And if the 'other' is indeed the Windows installation I'm sure it's on hd0 (hda)
Mother never told me it would be this bad Dave - PS thanks for your continued support
9th August 2005, 02:21 PM
Hold it I'm being thick I was looking in root not boot editing now
9th August 2005, 02:21 PM
boot with the DVD into rescue mode, chroot /mnt/sysimage, cd /boot/grub, then edit the grub.conf file.
Yes, I know hda or hd0 is the windows drive but once grub has started it thinks that hd0 is the drive it is starting from which is actually hd1. I know it's confusing. It's because you've set the BIOS to boot from hdc.
9th August 2005, 02:24 PM
Dave how do I open a text editor for this file I'm at the grub> prompt
9th August 2005, 02:29 PM
Quit out of the grub prompt to the command prompt
Change directories to /boot/grub.
I use the editor "joe" other people use different ones. To use this one, type "joe grub.conf". then make the changes and then hit "Ctrl+k" then "x" to save and exit. to exit without saving "Ctrl+c" for help "Ctrl+k" then "h"
9th August 2005, 02:54 PM
what can I say.. I'm into my new Linux desktop - you're a star.
One further question how do I now boot into the XP side of things Grub appeared to offer me a GUI.
And I'm really not looking forward to the next task of getting MySQL PHP and Moodle all working together. You're not by any chance planning a trip to the UK week after next. :)
9th August 2005, 03:08 PM
You will need to make the changes in the grub.conf so that it refers to hd1 under the "other" section.
Also, if you want to have it so that you just change your BIOS boot order (assuming that you have overwritten you MBR on hda), set hda as the boot drive, boot to your windows install CD, go into rescue, you will have to enter the administrator password if you have set one and then I think the command is fixboot. Try some google searches for "Windows XP fix MBR" or "fixboot" or other such combinations to find the proper command(s).
On MySQL, PHP, etc there has been a lot of traffic on installing and working with this on the Fedora List serve. Look through the archives and google should help you there. There are also some things that you need to watch out for when using SELinux and those programs. Good Luck!
I've been through Heathrow a number of times but never actually visited the UK, and no I won't be through there till mabe October on route to a meeting in Finland (work).
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.