LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   BOOT GRUB ERROR in switch from ubuntu to fedora (http://www.linuxquestions.org/questions/fedora-35/boot-grub-error-in-switch-from-ubuntu-to-fedora-669797/)

shickidyshade 09-14-2008 12:30 AM

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

w3bd3vil 09-14-2008 04:07 AM

boot with the rescue cd. And at the prompt do
Quote:

chroot /mnt/sysimage
grub-install /dev/hdax
where hda is your hdd name. You could very well do a fdisk -l to figure out your hdd name.

Hopefully that should do the trick.

shickidyshade 09-14-2008 07:07 AM

Trying to see my fdisk
 
I am currently trying to look at my
Code:

fdisk-l
but it is longer than the screen size on my computer. How do you scroll up and down the computer to view the results of the previous entry in the command line.

billymayday 09-14-2008 07:15 AM

fdisk -l | less

haxpor 09-14-2008 11:02 AM

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:

Enter "grub-install hd0" or "grub-install /dev/hda0"
which the parameter you provide is the disk that will hold your grub, for my case I want it to resides in my notebook so I specified hd0.

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).

shickidyshade 09-14-2008 07:26 PM

Quote:

Originally Posted by billymayday (Post 3279958)
fdisk -l | less


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
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 - 8225280 bytes
Disk identifier: 0x0008adb5

Device    Boot  Start    End      Blocks      Id    System
/dev/sda1    *        1    19458    156288000    7    HPFS/NTFS


Disk /dev/sdb: 160:0 GB, xxx bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 - 8225280 bytes
Disk identifier: 0xf0b8a127

Device    Boot  Start    End      Blocks      Id    System
/dev/sdb1    *        1    25      200781      83    Linux
/dev/sdb2            26    19457    156087540  8e    Linux LVM

Disk /dev/sdc: 500.1 GB, xxx bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 - 8225280 bytes
Disk identifier: 0x00080106

Device    Boot  Start    End      Blocks      Id    System
/dev/sdc1    *        1    48631    390625000    7    HPFS/NTFS
/dev/sdc2        48632    60801    97755525    8e    Linux LVM

Disk /dev/dm-0: 257.7 GB, xxx bytes
255 heads, 63 sectors/track, 31338 cylinders
Units = cylinders of 16065 * 512 - 8225280 bytes
Disk identifier: 0x00000000


Disk /dev/dm-1:  2080 MB, xxx bytes
255 heads, 63 sectors/track, 252 cylinders
Units = cylinders of 16065 * 512 - 8225280 bytes
Disk identifier: 0x30307800



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.

billymayday 09-14-2008 08:05 PM

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?

shickidyshade 09-14-2008 08:16 PM

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
is sdb1. However this did not work when I restarted the computer. Where is the default place for ubuntu to be looking for a boot grub. Is the computer still looking for that at turn on? Why was the old boot grub not deleted on the previous two installation attempts where I told the computer to delete the previous linux versions to install fedora 9.

Thanks
Shade

billymayday 09-14-2008 08:20 PM

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.

shickidyshade 09-14-2008 08:21 PM

When i do try to run

Code:

grub-install /dev/sdb1
I receive the following reply
Code:

Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map
Check if this is correct or not. If any of the lines is incorrect fix it and re-run the script 'grub-install'.

# this device map was generated by anaconda
(hd1) /dev/sda
(hd0) /dev/sdb

Is that what this should look like.

Thanks,
Shade

shickidyshade 09-14-2008 08:26 PM

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

elprawn 09-14-2008 08:32 PM

Try.

Code:

grub-install /dev/sdb
That should install it on the boot sector of the drive rather than the first partition. Then post the contents of your grub.conf.

billymayday 09-14-2008 08:33 PM

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.

shickidyshade 09-14-2008 09:20 PM

Quote:

Originally Posted by elprawn (Post 3280471)
Try.

Code:

grub-install /dev/sdb
That should install it on the boot sector of the drive rather than the first partition. Then post the contents of your grub.conf.

I am trying to look at the contents of grub.conf however I do not know how to view the file while in rescue mode.

Thanks,
Shade

shickidyshade 09-14-2008 09:23 PM

Quote:

Originally Posted by billymayday (Post 3280473)
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.

Mayday,

I can't type anything when the Error 17 is displayed. I get a blinking underscore that will not let me do anything.


All times are GMT -5. The time now is 02:01 PM.