BOOT GRUB ERROR in switch from ubuntu to fedora
Hey guys,
So I had Ubuntu on my one computer and it was flaking on me for some reason so I decided to install fedora (which I installed for work on my laptop). However when I currently reboot i get a Error 17 grub not found. It looks to me that the ubuntu grub is currently attempting to load the system. How do I change it so that my comp looks for the new fedora grub. Obviously my computer is dual booting since I am using grub. Vista is my other os. And I can't even get to that right now. Thanks for the help in advance, Shade |
boot with the rescue cd. And at the prompt do
Quote:
Hopefully that should do the trick. |
Trying to see my fdisk
I am currently trying to look at my
Code:
fdisk-l |
fdisk -l | less
|
I have found this problem for myself.
My notebook has only one disk which contains Windows XP Home and Fedora Core 6. Now I want to install Ubuntu on my external disk in which whenever I want to boot Ubuntu I just plug that external harddisk with my notebook but when I have no need to boot Ubuntu I just do nothing (and 2 choices remain for me to boot). From the above is my plan just before the actual intallation of my Ubuntu. Now I succeed and the following is my solution to boot them without any errors. I install Ubuntu 7.10 (boot from CD). In the partitioning-process I should to only have '/'(in ext2 format) for the mount point. Which means all the files contains in that mount point. From this point on, when you try to reboot your system and boot Ubuntu from the Grub selection. It's work and boot properly. But when you unplug the external harddisk from your system, and do the same step as I have said above, now the system says something that "It cannot found the grub loader". I realize that the actual place for the grub to live is places on the external harddisk (/boot/grub). So the solution to this could be replace the currently used grub to another that its place is reside on the notebook. From what I said to you, I also have Fedora on my notebook. Now I switch to boot from fedora, and then go to the grub.conf (grub configuration file, resides in /etc/grub.conf or /boot/grub/grub.conf) to modify the thing. You must copy the Ubuntu's load section from "menu.lst" file(in /boot/grub) in Ubuntu. (You can easily see it, it have 3 load command => normal, safe mode, and memtest). Also note that, in order to do this, you can mount the external disk to be used in fedora, and then try to do what I said. Now you have modified the grub.conf file. Just copy that and place in your Fedora's grub file. Next do the following command. Quote:
hd0 means the mapping-device that you can found in "device.map" file in the /boot/grub folder. But you can specified the actual device name like "/dev/hda0". Now it will says that no errors found. Just restart the system. Try to boot with and without external harddisk pluggin-in. You should get it work for now. :) (Im sorry for my mistakes in grammar or vocabularies and some of my english explanation). |
Quote:
how do you get out of the fdisk -l | less ? It letting me scan the entire document but not leave to enter another command. anyway I'm going to have to try to post the screen but i guess I will try to type it the best i can Code:
Disk /dev/sda: 160:0 GB, xxx bytes I don't know why sdc got split into two partitions. This is supposed to be only a storage drive ... I would eventually prefer to reformat that partition into a single NTFS sector. As you may have predicted sda1 is Windows and sdb1 is where I installed linux. Also what is the /dev/dm-(0/1) supposed to be? Where are these 258 or so GB that I do not know where they are installed. Thanks for any help in advance. |
To exit less, hit "q"
You probably had NTFS on sdc already, and the unused portion has been givern to linux. /dev/dm are device mappers I gather - do you have any usb drives plugged in? Where are you at otherwise? |
I still do not have any access to fedora or windows. I do see a boot screen trying to load but then I get an Error 17 meaning that it is not looking in the correct location for the boot drive. I am assuming the appropriate place to try to reinstall a grub boot using
Code:
grub-install /dev/hdax Thanks Shade |
Well, I'd assume Fedora is installed on sdb.
First up, if you interrupt the boot process when you first fire up (before grub), can you tell your PC to boot off of the second hard disk (it may take some trial and error, since sdb type designations may not coincide with bios designations). At worst you'll have 3 boots to do. Let us know how that bit goes. |
When i do try to run
Code:
grub-install /dev/sdb1 Code:
Installation finished. No error reported. Thanks, Shade |
I tried to go into the setup and select which hard drive to look for and the only option was Hard Disk. Can I try another to see if that works? I will try that for a little bit.
Current error is still grub Loading stage1.5 GRUB loading, please wait ... Error 17 |
Try.
Code:
grub-install /dev/sdb |
To install grub in the MBR, use
grub-install /dev/sdb I can't tell you if that device map is correct. If you bios is set to boot off the drvie that is /dev/sdb, then yes it is. I'm guessing a little on the following, but if you are able to find the fedora kernel, make a note of its name, but it will be something like "vmlinuz-2.6.18-92.1.1.el5" (that's a Redhat kernel btw). When you get your error 17, type find vmlinuz-2.6.18-92.1.1.el5 You may need to try find (hd0)/boot/vmlinuz-2.6.18-92.1.1.el5 or find (hdo)/vmlinuz-2.6.18-92.1.1.el5 for hd0 and hd1 and various combinations thereof. |
Quote:
Thanks, Shade |
Quote:
I can't type anything when the Error 17 is displayed. I get a blinking underscore that will not let me do anything. |
Code:
mkdir /mnt/osboot |
Sorry, that second and third line should be...
Code:
mount /dev/sdb1 /mnt/osboot |
Quote:
Code:
chroot /mnt/sysimage |
Quote:
I am going to try to restart now (which didn't work) ... should I go back to that screen and try to reinstall something into the new grub.conf. At least enough to get linux or windows to boot? Thanks for help so far, Shade |
After you mount /dev/sdb1, what do you get when you run...
Code:
ls /mnt/osboot |
If I understand right, you have vista installed on the 2nd HDD, because
you device.map says Quote:
Quote:
Now yr trying to write grub to the MBR of the sdb. There should be no problem if you do what somebody said about using yr fedora disk and choose the "rescue option". When you get to the screen w/ the # prompt type Quote:
Re 'nano', you can't mount a drive if you can't get fedora to run, so do it after you 'chroot /mnt/sysimage' and run "grub-install /dev/sdb". I don't know if you have a boot directory during the rescue operation, but if you do, cd into /boot/grub. Quote:
Quote:
Quote:
If yr still having problems, post'em. Have you managed to mount fedora yet? In yr grub.conf, put "timeout" to 15. That way yr not in such a rush. Good luck lynnevan |
Well my major problem was that I was still getting an Error 17 when trying to load. I originally put in the rescue cd and typed in [CODE]grub-install /dev/sdb [/CODE}. Then restarted the computer. I remained to get and Error 17. I tried to get a little crazy last night and in my rashness typed in
[CODE]grub-install /dev/sda [/CODE} and when I restarted I finally loaded a boot-grub. Now that I have this much I can see more of where the computer is looking to restart. But when it tries to default to Vista I get a screen that says Code:
GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB Thanks, Shade |
Use fixmbr to put your Vista bootsector back onto sda.
|
I'd go into the bios first and put the vista drive as the 1st hard drive. I've heard of problems with grub and switching drive order. Then vista would be sda and fedora would be sdb, which is normal. Then use the vista rescue to fix mbr. That will get yr vista working normally and after that, use yr fedora rescue disk to do the chroot thing and grub-install and when it shows the device.map, make sure it says (hd0) /dev/sda and (hd1) /dev/sdb. If it doesn't, it gives you an opertunity to fix it and run grub-install again.
After that, it SHOULD work right. Unless fedora doesn't like not being the 1st hard drive any more. Then you may have to re-install fedora. luck:) |
I have Windows and Linux both on my second hard drive and even though it's seen as sda by gentoo (the first drive being hdc) and sdb by Fedora, Grub sees it as hd0.
|
So this is the biggest update of this thread to date. I am now able to boot into Windows Vista!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I don't think I will ever be this excited to get back into Vista in my entire life, lol. Ok so moving on to how I fixed this. I used Code:
grub-install /dev/sda Now I am trying to reinstall Linux since I feel I have found the solution to the problem is installing the boot grub drive to be sda, but when I get into where the X something takes over I get a wonderful screen of blues and oranges or greens and reds and oranges. Directly before the screen goes out anaconda seems to find to locate my video card and seems to be activating it to be used during the installation process. Do I need to create a new boot disk? Thanks for all the help so far I would have never been able to get this far without all your help, Shade |
Elspawn, you must have a very interesting drive setup. Any PATA drives involved? I've never seen GRUB get confused.
For some reason, when I installed suse & fedora on a usb drive, they both called it sda, but grub knew better. Mandriva did ok for a while, w/ hda & sda, but later decided sda came before hda. Only ubuntu has kept the faith and is still correct. You can run grub-install from inside a shell if your drive order is correct, but not if it's screwed up like mine - I can only use fed9 (the only ide drive) and ubuntu usb(hd1,7). shickidyshade, yr grub boot screen is,if you want Fedora's, Quote:
Quote:
Maybe the funny colors come from ubuntu trying to run usplash or splasy. Or, have you commented out hidden in the grub menu? Quote:
There an easy way to make a grub floppy if yr interested. Once you get grub onto a floppy, it's a lot less nerve racking editing things, and there's also a free prog by HP that can put it on a thumb drive for you either from the grub floppy, or from a file made by "dd". |
Yeah there's a PATA drive involved. HDA, HDB and HDD are optical drives, HDC is a PATA hard disk and SDA is an SATA hard disk. Just to make things nice and confusing, though, Fedora calls HDC SDA and SDA SDB.
Code:
Disk /dev/hdc: 102.9 GB, 102935347200 bytes |
Yeah, like I said, fedora, suse & later mandriva all decided my usb drive was the first hard drive as listed by fdisk, sfdisk, and the rest of the operating system agreed, except GRUB (there, in all cases, the ide drive is hd0). Fedora GRUB will (so far) consider the 1st ide drive hd0(sda), the 2nd, hd1(sdb), the next external will be hd2(sdc). Even if the rest of the OS has it upsidedown.
Haven't tried SATA yet, although I've got the fixtures, my drives just keep working. I don't know how a Linux OS decides between an ide drive and a sata drive which is hd0. I don' know how you avoided yr optical drives being labeled hca, hcb, hcd. Or what kind of filesystem "af" is. Maybe it's a gentoo thing. Me and Gentoo didn't get along the one time I tried it, so I don't know much about it. Are yr optical drives DVD-rw or MO? Not nosey, just curious.:study: |
When I upgraded Fedora Core 6 to Fedora 9, I couldn't get past stage 1 of grub and trying to load via rescue mode said the image was corrupt. Fedora's GRUB listed the boot drive as hd1 but the Gentoo GRUB as hd0, so perhaps they differ or perhaps Anaconda got it wrong? :S
af is HFS+ (Mac OS X). I have a separate DVD reader and Writer for on the fly copying and a separate CD-RW that can write the full 99:59 on 99 minute CDs. In fstab they're /dev/dvd2, /dev/cdrw1 and /dev/dvdrw (less confusing that way). |
thanks elsprawn.
|
All times are GMT -5. The time now is 02:37 PM. |