Fedora Linux Support Community & Resources Center
  #1  
Old 25th March 2012, 03:06 PM
smr54 Offline
Registered User
 
Join Date: Jan 2010
Posts: 5,497
linuxchrome
Grub in non MBR partition

I've only run into this on one machine, a Sandy Bridge UX31E laptop. If I install Fedora after installing something else, and put grub2 into the root partition (/dev/sda2 in this case) rather than the MBR, it won't work. It will only show the word GRUB, a flashing cursor, and shortly afterwards, usually reboot.

I then tried changing Ubuntu's grub menu to use vmlinuz and initrd of the Fedora install. It would boot with a kernel panic and have to be manually shut down. Interestingly, if I ran os-probe on Ubuntu, it wouldn't see the Fedora installation.

So, I then put Fedora's grub into the MBR, and everything worked. It saw two other installations, though it missed a third, which is fine, I prefer to turn off os probing and use custom config.

I've seen no other mention of this, so don't know if it's Sandy Bridge, some update to grub that broke it (which seems likely, as I didn't have this problem with F16, same circumstance, or even the earlier TC1 of F17).

It may be one of those aggravating Just Me issues, but I've been able to replicate it with a few installs.
Reply With Quote
  #2  
Old 25th March 2012, 05:29 PM
sonoran Offline
Registered User
 
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,327
linuxfirefox
Re: Grub in non MBR partition

I installed Fedora 17's grub2 under /, not to the mbr, and boot it from Arch's legacy grub with
Code:
title Fedora 17
root (hd1,5)
chainloader +1
When F17 boots it starts at the grub2 menu, which shows my other systems. This is an AMD/nvidia desktop mobo.
Reply With Quote
  #3  
Old 25th March 2012, 05:36 PM
smr54 Offline
Registered User
 
Join Date: Jan 2010
Posts: 5,497
linuxchrome
Re: Grub in non MBR partition

Thanks. That's what I was expecting, and getting as late as TC1. It's only in RC1 where I'm getting this issue.
Reply With Quote
  #4  
Old 25th March 2012, 05:46 PM
srs5694 Offline
Registered User
 
Join Date: Jan 2011
Location: Woonsocket, RI
Posts: 521
linuxfirefox
Re: Grub in non MBR partition

These days, when diagnosing boot issues, it's absolutely critical that you know whether you're booting in BIOS mode or in EFI mode. Most Sandy Bridge motherboards ship with EFI firmware that includes a BIOS compatibility mode (often called "CSM"), so your board, smr54, could be booting in either way, or perhaps even in one way for one installation and in another way for another one. This mix can cause no end of confusion if you don't recognize what's happening.

Once you've booted in Linux, you can tell which way you're booted in a couple of ways. The simplest is to check for the presence of the /sys/firmware/efi directory. If it's present, you're booted in EFI mode. If not, you're probably booted in BIOS mode. Another way is to type "dmesg | grep EFI." If you get dozens of lines of output relating to EFI, then you're booted in EFI mode. If you get no output, or perhaps just a line or two, then you're probably booted in BIOS mode.

In theory, managing boot loaders on an EFI boot is simpler than doing the same with BIOS, although the methods are entirely different and so you'll suffer a learning curve if you already understand BIOS boot loaders. In practice, unfortunately, many EFI implementations provide poor user controls, and many Linux distributions still aren't handling EFI as well as they should, so working with EFI isn't always as easy as it should be. If you care to learn more, I've got a Web page on the topic. I've also forked an older EFI boot manager and am actively improving it, under the name rEFInd. Of course, none of this is relevant if you're booting in BIOS mode, unless you've got an EFI-capable board and you want to switch to EFI booting.
Reply With Quote
  #5  
Old 25th March 2012, 06:17 PM
smr54 Offline
Registered User
 
Join Date: Jan 2010
Posts: 5,497
linuxchrome
Re: Grub in non MBR partition

Thanks Rod. I've taken a quick glance at your pages and think they'll prove useful.

At this point, if I put Fedora's Grub in MBR, it's handling the other systems on there without problem, so, for the moment at least, I'll leave it at that.
Reply With Quote
  #6  
Old 25th March 2012, 06:27 PM
sonoran Offline
Registered User
 
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,327
linuxfirefox
Re: Grub in non MBR partition

Thanks for the link to your page. My curiosity was aroused by this EFI_STUB thread: https://bbs.archlinux.org/viewtopic.php?id=136833&p=1

As in nature, evolution in computer science apparently produces dead-ends occasionally (thinking of you, grub2).
Reply With Quote
  #7  
Old 25th March 2012, 07:18 PM
smr54 Offline
Registered User
 
Join Date: Jan 2010
Posts: 5,497
linuxchrome
Re: Grub in non MBR partition

Y'know, I find myself constantly criticizing the theoretical improvements--then, in fairness, have to realize that I _like_ not having to know my monitor's specifications, worrying about destroying it, and having a wireless card work--often more easily than it does in Windows.

On the other hand, some of the design decisions made by various programmers, that get accepted as mainstream, surprise me. I'll leave it at that, but will just say that, as happens quite frequently, I agree with sonoran. (Scrolls up to make sure that I've also said thanks for the link to the page, sees that I have.)
Reply With Quote
  #8  
Old 26th March 2012, 10:42 AM
quackers Offline
Registered User
 
Join Date: Mar 2011
Location: Manchester, UK
Posts: 44
linuxfirefox
Re: Grub in non MBR partition

I installed F17 yesterday but left Ubuntu's grub in the MBR and when I update-grub in Ubuntu it does not detect F17 at all.
I installed Fedora's grub to the MBR and that detects and boots all installed systems.
No EFI here.
__________________
Sony Vaio AR51SU
Fedora 14 & 15
Ubuntu 10-04, 10-10, 11-04
openSUSE 11.3
and the big satan
Reply With Quote
  #9  
Old 26th March 2012, 12:58 PM
smr54 Offline
Registered User
 
Join Date: Jan 2010
Posts: 5,497
linuxfirefox
Re: Grub in non MBR partition

Ok, similar to my experience. (I also looked and see that UEFI is disabled in BIOS)

Thanks for the feedback.
Reply With Quote
  #10  
Old 26th March 2012, 01:23 PM
quackers Offline
Registered User
 
Join Date: Mar 2011
Location: Manchester, UK
Posts: 44
linuxfirefox
Re: Grub in non MBR partition

No problem. It's an odd one.
__________________
Sony Vaio AR51SU
Fedora 14 & 15
Ubuntu 10-04, 10-10, 11-04
openSUSE 11.3
and the big satan
Reply With Quote
  #11  
Old 26th March 2012, 06:13 PM
srs5694 Offline
Registered User
 
Join Date: Jan 2011
Location: Woonsocket, RI
Posts: 521
linuxfirefox
Re: Grub in non MBR partition

Quote:
Originally Posted by quackers View Post
I installed F17 yesterday but left Ubuntu's grub in the MBR and when I update-grub in Ubuntu it does not detect F17 at all.
I installed Fedora's grub to the MBR and that detects and boots all installed systems.
No EFI here.
One of the problems with GRUB 2 is that it relies on pretty sophisticated scripts to probe for various OSes and Linux distributions. (On the Gentoo system on which I'm typing this right now, the standard scripts in /etc/grub.d come to over 1,000 lines.) There's nothing inherently wrong with "sophisticated," but the fact that so much code is required to properly detect an OS is an indication of the complexity of the task, and hence the ease with which that detection can go wrong. It's really not surprising to me that an older distribution's GRUB scripts (Ubuntu 11.10, for instance) fails to detect a newer distribution (Fedora 17 pre-release, in this case).

This is one of the areas where EFI could eventually make things much easier. With boot loaders stored in standard locations and (according to the spec) registered with the EFI, creating a boot menu for all the options is relatively straightforward. The Linux kernel developers are implementing tools to let the kernel boot directly as an EFI application, which eliminates the need for GRUB. At the moment, there's still the problem of passing kernel options to the kernel, but apparently the plan is to put those in a configuration file. In the meantime, my rEFInd can glue it together. So the problem at the moment is that distributions don't yet support the kernel's EFI stub loader or rEFInd. Once the kernel's EFI stub loader support matures and distributions begin using it (perhaps with rEFInd or something similar to provide a consistent boot menu), problems with detection of other distributions or OSes will diminish greatly. Of course, this is all a theoretical future benefit of EFI. Current BIOS-based computers will still be stuck with either GRUB 2's "kitchen sink" approach or the need for manual configuration with LILO or GRUB Legacy.
Reply With Quote
  #12  
Old 26th March 2012, 06:16 PM
quackers Offline
Registered User
 
Join Date: Mar 2011
Location: Manchester, UK
Posts: 44
linuxfirefox
Re: Grub in non MBR partition

Hi Rod, nice to see you again :-)

I sorted the problem out.

I needed to mount the Fedora partition in Ubuntu first, then Ubuntu's grub picked it up.
__________________
Sony Vaio AR51SU
Fedora 14 & 15
Ubuntu 10-04, 10-10, 11-04
openSUSE 11.3
and the big satan
Reply With Quote
Reply

Tags
grub, mbr, partition

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Grub to see my mac os x partition. thugpoet22 Using Fedora 2 25th July 2008 09:27 PM
Installing GRUB on another partition Graham1 Installation, Upgrades and Live Media 2 10th November 2006 03:27 PM


Current GMT-time: 09:22 (Thursday, 28-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat