Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Grub2 floating around...

  1. #1
    Join Date
    Jul 2010
    Beans
    25

    Grub2 floating around...

    Hi all,

    I had to install Fedora instead of Ubuntu, because of a weird dependency in one of the codes I am running. Now I booted into the fedora CD and basically just formatted the ubuntu partitions and created a new partition table for the linux side of my MBP. I had Fedora installed before, so I now it works. Anyhow, after installing fedora I got the prompt:

    Code:
    error: file not found
    grub rescue>
    Now this seems to be a grub2 prompt. Can anybody help me with finding grub2? I am getting very confused as where it could be hiding after formatting the disks multiple times.

    Thanks for any advice in advance.

  2. #2
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub2 floating around...

    It's possible Grub 2 is still lurking in the MBR of the drive booted first and is trying (and failing) to find the non-existent Grub files.

    Have you installed your new bootloader (Grub legacy) to the MBR of your boot device?

    Running the boot info script from an Ubuntu LiveCD or other Linux OS and posting the contents of RESULTS.txt may show us what's happening. (Click the "BIS" link in my signature line.)
    Last edited by drs305; July 25th, 2011 at 03:21 AM.
    Back to Xorg...

    Retired.

  3. #3
    Join Date
    Jul 2010
    Beans
    25

    Re: Grub2 floating around...

    Here is the result.txt. GRUB2 is on the EFI partition... now how do i get that off. Should i maybe install legacy grub on sda1 instead of sda3
    Attached Files Attached Files
    Last edited by madtowneast; July 25th, 2011 at 04:56 AM.

  4. #4
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub2 floating around...

    I'm not familiar enough with EFI and GPT to provide advice but I'll bump the thread as there are those who regularly read grub threads that can provide the solution.
    Back to Xorg...

    Retired.

  5. #5
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

    Re: Grub2 floating around...

    I think that drs305's initial analysis is basically correct, although there are significant wrinkles because this is a Mac. The Boot Info Script reports that GRUB 2 is present in the MBR of the disk, but there's no mention of a grub.cfg (GRUB 2 configuration) file. You do have GRUB Legacy in the boot sector of /dev/sda3, and it appears to be configured correctly.

    Do you use rEFIt on this computer? If so, I'd expect that it would detect the GRUB Legacy on the Linux partition and give you a boot option for it (but see below concerning partition types). If you're not using rEFIt, installing it might be the simplest solution.

    If you're already using rEFIt and it's not giving you an option that boots to GRUB Legacy, then my guess is that the problem is related to the incorrect partition type code set on your Fedora partition (/dev/sda3). According to Boot Info Script, it's flagged as an EFI System Partition, but this is incorrect. You can fix this in GParted or parted by removing the "boot flag" from the partition, or in gdisk by changing the type code from EF00 to 0700 (or 8300 if you use gdisk 0.7.2, the latest; but I'm not sure if rEFIt will work with this code, which is new).

    If none of the above helps, then I'd suggest re-installing GRUB Legacy to the MBR on the disk. There may be an option in the Fedora installer to do this; or you could use Super GRUB Disk (use Super GRUB Disk, not Super GRUB 2 Disk!) to boot into your Fedora system and re-install GRUB from there, as in "grub-install /dev/sda" as root.

    An entirely different option would be to ditch the old-style BIOS booting and boot using EFI mode by installing an EFI-capable boot loader. This page describes how to compile and install GRUB 2 to boot in EFI mode; or you could give ELILO a try (although I've had little success with it on my Mac Mini). Fedora includes a version of GRUB Legacy that's been hacked to include EFI support, but I don't recall offhand precisely how it's set up by default. You could use an emergency disk to check for files in the Fedora /boot/efi directory. If there are files there, try copying them to your EFI System Partition (ESP; /dev/sda1) and see if rEFIt gives you a new boot option.
    If I've suggested a solution to a problem and you're not the original poster, do not try my solution! Problems can seem similar but be different, and a good solution to one problem can make another worse. Post a new thread with your problem details.

  6. #6
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub2 floating around...

    Thanks for jumping in here srs5694
    Back to Xorg...

    Retired.

  7. #7
    Join Date
    Jul 2010
    Beans
    25

    Re: Grub2 floating around...

    Thanks for the reply. Really appreciate it.

    Quote Originally Posted by srs5694 View Post
    I think that drs305's initial analysis is basically correct, although there are significant wrinkles because this is a Mac. The Boot Info Script reports that GRUB 2 is present in the MBR of the disk, but there's no mention of a grub.cfg (GRUB 2 configuration) file. You do have GRUB Legacy in the boot sector of /dev/sda3, and it appears to be configured correctly.

    Do you use rEFIt on this computer? If so, I'd expect that it would detect the GRUB Legacy on the Linux partition and give you a boot option for it (but see below concerning partition types). If you're not using rEFIt, installing it might be the simplest solution.
    Tried that already. It gives me 2 linux boot options. Either produces the same error. Kind of odd..

    Quote Originally Posted by srs5694 View Post
    If you're already using rEFIt and it's not giving you an option that boots to GRUB Legacy, then my guess is that the problem is related to the incorrect partition type code set on your Fedora partition (/dev/sda3). According to Boot Info Script, it's flagged as an EFI System Partition, but this is incorrect. You can fix this in GParted or parted by removing the "boot flag" from the partition, or in gdisk by changing the type code from EF00 to 0700 (or 8300 if you use gdisk 0.7.2, the latest; but I'm not sure if rEFIt will work with this code, which is new).
    I just loaded the fedora live CD and found the option. To what should I change the type? There is not flag set according to fedora at least.

    EDIT:

    I unset the boot flag and the set the Linux to a MBR map instead of EFI partition map. I tried to install grub using the Fedora disk, but it just gave me error saying that there is no bios driver installed. I might try to reinstall FEdora with teh bootloader being installed on sda1 instead of with Fedora on sda3. Is Rescatux a good option instead of SGD?
    Last edited by madtowneast; July 25th, 2011 at 06:38 PM.

  8. #8
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

    Re: Grub2 floating around...

    Quote Originally Posted by madtowneast
    I just loaded the fedora live CD and found the option. To what should I change the type? There is not flag set according to fedora at least.
    I'm not sure exactly what program or options you're seeing in the Fedora installer. I recommend you boot with System Rescue CD or Parted Magic and use GParted, parted, or gdisk, as described in my earlier post.

    Quote Originally Posted by madtowneast View Post
    I unset the boot flag and the set the Linux to a MBR map instead of EFI partition map.
    Please clarify what you mean by this. What tool did you use and precisely what did you do with it? Some possible interpretations of what you might mean by this are extremely dangerous, so I'd really like to understand what you've actually done before advising you further. It might be good for you to post another Boot Info Script output, or the output of "sudo parted /dev/sda print" or "sudo gdisk -l /dev/sda" so we can see the current state of your partition table, if you've been making changes to it.

    I tried to install grub using the Fedora disk, but it just gave me error saying that there is no bios driver installed.
    When reporting errors from programs it's imperative that you give a verbatim copy of the error message. If text-mode, copy-and-paste the error to this forum. If it's more than a few words, and especially if it contains formatted text, post it between [code] and [/code] tags for legibility. If it's a GUI program, post a screen shot. I've never heard of a "no bios driver installed" GRUB message, and I'm not entirely sure what that would mean, so I suspect you may have subtly altered the message in relaying it.

    I might try to reinstall FEdora with teh bootloader being installed on sda1 instead of with Fedora on sda3. Is Rescatux a good option instead of SGD?
    I've never used Rescatux, so I can't comment on it.

    Installing the BIOS version of GRUB Legacy to /dev/sda1 instead of /dev/sda3 will probably do absolutely no good, since /dev/sda1 is an EFI System Partition, which is a FAT partition that normally has no BIOS boot loader code in it. Installing GRUB Legacy to /dev/sda (that is, to the MBR, to overwrite the unused GRUB 2) might be more beneficial, as I suggested in my earlier post.

    There's a slim possibility that wiping the useless GRUB code from the MBR will enable rEFIt to properly detect and launch the GRUB Legacy on the Linux partition. To do this, type the following command from a rescue disc:

    Code:
    sudo dd if=/dev/zero of=/dev/sda bs=440 count=1
    Be very careful with this command, though, and particularly with the "bs=440" and "count=1" options; if you write too much data, you'll damage your partitions.
    If I've suggested a solution to a problem and you're not the original poster, do not try my solution! Problems can seem similar but be different, and a good solution to one problem can make another worse. Post a new thread with your problem details.

  9. #9
    Join Date
    Jul 2010
    Beans
    25

    Re: Grub2 floating around...

    Quote Originally Posted by srs5694 View Post
    I'm not sure exactly what program or options you're seeing in the Fedora installer. I recommend you boot with System Rescue CD or Parted Magic and use GParted, parted, or gdisk, as described in my earlier post.

    Please clarify what you mean by this. What tool did you use and precisely what did you do with it? Some possible interpretations of what you might mean by this are extremely dangerous, so I'd really like to understand what you've actually done before advising you further. It might be good for you to post another Boot Info Script output, or the output of "sudo parted /dev/sda print" or "sudo gdisk -l /dev/sda" so we can see the current state of your partition table, if you've been making changes to it.
    I used the Ubuntu LiveCD version of GParted to unset the boot flag on the Fedora install (sda3) and then used Disk Utility (same program on both Ubuntu and Fedora) to change the partition type from EFI System Partition to MBR Partition Scheme, since some googling revealed that MBR Partition scheme is supposed to be the same as ghe gdisk code 0700. Fedora has this Disk Utility installed but nothing like GParted. Neither LiveCD has gdisk.

    Quote Originally Posted by srs5694 View Post
    When reporting errors from programs it's imperative that you give a verbatim copy of the error message. If text-mode, copy-and-paste the error to this forum. If it's more than a few words, and especially if it contains formatted text, post it between [code] and [/code] tags for legibility. If it's a GUI program, post a screen shot. I've never heard of a "no bios driver installed" GRUB message, and I'm not entirely sure what that would mean, so I suspect you may have subtly altered the message in relaying it.
    The error is:

    Code:
    [root@localhost liveuser]# grub-install /dev/sda
    Probing devices to guess BIOS drives. This may take a long time.
    /dev/mapper/../dm-0 does not have any corresponding BIOS drive.
    Quote Originally Posted by srs5694 View Post
    I've never used Rescatux, so I can't comment on it.

    Installing the BIOS version of GRUB Legacy to /dev/sda1 instead of /dev/sda3 will probably do absolutely no good, since /dev/sda1 is an EFI System Partition, which is a FAT partition that normally has no BIOS boot loader code in it. Installing GRUB Legacy to /dev/sda (that is, to the MBR, to overwrite the unused GRUB 2) might be more beneficial, as I suggested in my earlier post.

    There's a slim possibility that wiping the useless GRUB code from the MBR will enable rEFIt to properly detect and launch the GRUB Legacy on the Linux partition. To do this, type the following command from a rescue disc:

    Code:
    sudo dd if=/dev/zero of=/dev/sda bs=440 count=1
    Be very careful with this command, though, and particularly with the "bs=440" and "count=1" options; if you write too much data, you'll damage your partitions.v
    I think i will try using SuperGrubDisk first before DDing.

  10. #10
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

    Re: Grub2 floating around...

    Quote Originally Posted by madtowneast View Post
    I used the Ubuntu LiveCD version of GParted to unset the boot flag on the Fedora install (sda3) and then used Disk Utility (same program on both Ubuntu and Fedora) to change the partition type from EFI System Partition to MBR Partition Scheme, since some googling revealed that MBR Partition scheme is supposed to be the same as ghe gdisk code 0700. Fedora has this Disk Utility installed but nothing like GParted. Neither LiveCD has gdisk.
    No, "MBR partition scheme" is a type code reserved for partitions that will themselves contain an MBR -- say, for use by a virtual machine. You should definitely not give a Linux partition that type code. A GPT Linux partition should have no flags (as viewed under GParted) or should have a type code of 0700 or 8300 (as viewed under gdisk). Furthermore, AFAIK, you can't set that type code in parted or GParted, so I really have no idea what you've done with your disk. Once again, please post the output of "sudo gdisk -l /dev/sda" or "sudo parted /dev/sda print".

    You can install gdisk in an Ubuntu live CD by typing "sudo apt-get install gdisk" or by downloading the package for your version and double-clicking it in the desktop. (See download links here.) Alternatively, you can use an emergency disc like PartedMagic, which comes with parted and gdisk pre-installed.

    The error is:

    Code:
    [root@localhost liveuser]# grub-install /dev/sda
    Probing devices to guess BIOS drives. This may take a long time.
    /dev/mapper/../dm-0 does not have any corresponding BIOS drive.
    As I suspected, that's quite different from what you initially reported ("it just gave me error saying that there is no bios driver installed"). A "BIOS drive" refers to the BIOS identification code for a hard disk, whereas a "BIOS driver" would perhaps be some sort of software to interface to a BIOS subsystem, although there's not much that qualifies as that under Linux, or perhaps a driver loaded by the BIOS.

    The actual message indicates that the specified device file can't be tied to a specific BIOS-accessible hard disk. This is actually normal for a device in /dev/mapper, so it's not really an error, and I don't think this is an error message.

    Did grub-install report anything else, or was that the complete output? Normally it finishes with something like:

    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
    (fd0)     /dev/fd0
    (hd0)     /dev/sda
    If you saw output like that, then GRUB installed correctly. If you saw some other output, then perhaps something else went wrong and you've ignored the true error message because of confusion about the meaning of the message you did report.
    If I've suggested a solution to a problem and you're not the original poster, do not try my solution! Problems can seem similar but be different, and a good solution to one problem can make another worse. Post a new thread with your problem details.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •