* Booting 64-bit Linux on a Macbook5,2 @ 2010-09-22 19:16 Patrick Doyle 2010-09-23 10:54 ` Colin Watson 0 siblings, 1 reply; 8+ messages in thread From: Patrick Doyle @ 2010-09-22 19:16 UTC (permalink / raw) To: grub-devel Help, I don't know where to turn here. It seems that every thread I've found that describes this ends with "and now it works", but I can't seem to get there. I have installed 64-bit Ubuntu 10.04 on a Macbook5,2. I would like to boot this without the acpi=off parameter that is currently required. Once, in the past, I installed grub-efi in the /efi folder and was able to boot a 32-bit Ubuntu installation on this hardware. But I have since installed the 64-bit version and can no longer get it to boot. It gets as far as displaying the message about loading initrd and stops there. Can anybody help me figure out where to go from here? --wpd ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Booting 64-bit Linux on a Macbook5,2 2010-09-22 19:16 Booting 64-bit Linux on a Macbook5,2 Patrick Doyle @ 2010-09-23 10:54 ` Colin Watson 2010-09-23 13:47 ` Patrick Doyle 0 siblings, 1 reply; 8+ messages in thread From: Colin Watson @ 2010-09-23 10:54 UTC (permalink / raw) To: The development of GNU GRUB On Wed, Sep 22, 2010 at 03:16:24PM -0400, Patrick Doyle wrote: > I don't know where to turn here. It seems that every thread I've > found that describes this ends with "and now it works", but I can't > seem to get there. > > I have installed 64-bit Ubuntu 10.04 on a Macbook5,2. I would like to > boot this without the acpi=off parameter that is currently required. > Once, in the past, I installed grub-efi in the /efi folder and was > able to boot a 32-bit Ubuntu installation on this hardware. But I > have since installed the 64-bit version and can no longer get it to > boot. It gets as far as displaying the message about loading initrd > and stops there. Unlike on BIOS systems, on EFI systems the bit length of the kernel must match the bit length of the firmware (at least on Linux; Vladimir tells me that the XNU kernel in Darwin does some horrible things to work around this restriction). Thus there are two possibilities: 1) You have 32-bit EFI, and won't be able to boot a 64-bit kernel from it. 2) You have 64-bit EFI, and your previous 32-bit kernel was actually silently falling back to BIOS compatibility mode. In either case, I'd recommend trying an ordinary BIOS version of GRUB instead (i.e. the grub-pc package); you'll need to create a BIOS Boot Partition (http://grub.enbug.org/BIOS_Boot_Partition), install GRUB to that partition rather than to the MBR, and tell rEFIt to boot from that partition. -- Colin Watson [cjwatson@ubuntu.com] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Booting 64-bit Linux on a Macbook5,2 2010-09-23 10:54 ` Colin Watson @ 2010-09-23 13:47 ` Patrick Doyle 2010-09-23 14:01 ` Colin Watson 2010-09-23 19:02 ` Colin D Bennett 0 siblings, 2 replies; 8+ messages in thread From: Patrick Doyle @ 2010-09-23 13:47 UTC (permalink / raw) To: The development of GNU GRUB On Thu, Sep 23, 2010 at 6:54 AM, Colin Watson <cjwatson@ubuntu.com> wrote: > On Wed, Sep 22, 2010 at 03:16:24PM -0400, Patrick Doyle wrote: >> I don't know where to turn here. It seems that every thread I've >> found that describes this ends with "and now it works", but I can't >> seem to get there. >> >> I have installed 64-bit Ubuntu 10.04 on a Macbook5,2. I would like to >> boot this without the acpi=off parameter that is currently required. >> Once, in the past, I installed grub-efi in the /efi folder and was >> able to boot a 32-bit Ubuntu installation on this hardware. But I >> have since installed the 64-bit version and can no longer get it to >> boot. It gets as far as displaying the message about loading initrd >> and stops there. > > Unlike on BIOS systems, on EFI systems the bit length of the kernel must > match the bit length of the firmware (at least on Linux; Vladimir tells > me that the XNU kernel in Darwin does some horrible things to work > around this restriction). Thus there are two possibilities: > > 1) You have 32-bit EFI, and won't be able to boot a 64-bit kernel from > it. > > 2) You have 64-bit EFI, and your previous 32-bit kernel was actually > silently falling back to BIOS compatibility mode. > > In either case, I'd recommend trying an ordinary BIOS version of GRUB > instead (i.e. the grub-pc package); you'll need to create a BIOS Boot > Partition (http://grub.enbug.org/BIOS_Boot_Partition), install GRUB to > that partition rather than to the MBR, and tell rEFIt to boot from that > partition. > Hi Colin, Thank you for the reply. I am able to boot either the 32-bit or the 64-bit kernel via grub when it is installed in /dev/sda3 (my Linux partition). But I have to set acpi=off (or maxcpus=1) in order to boot the kernel. (This is a known issue, see https://bugzilla.kernel.org/show_bug.cgi?id=13170 and https://bugs.launchpad.net/acpi/+bug/341230). However as I've been reading around, it seems that some folks have been able to boot with full capabilities (i.e. ACPI and both cores) when booting via EFI. I thought I had been able to do that once last week, but in the process of trying to get both Ubuntu and XP (and MAC OS) to all boot peacefully together, I reinstalled various different times and didn't keep as careful notes as I wished I had. Anyway, I'm at the point now where (I believe) I've tried compiling a 32-bit version of grub (1.98 straight from the tarball), installing it in /efi/grub on my Mac partition, and seeing an error that 32-bit mode wasn't supported. I've compiled a 64-bit version of grub and can bring up boot menus with that, but things hang when I attempt to launch the kernel. I've tried both 32 and 64 bit kernels (full installations, actually) as well as ext2 and ext4 root file systems. Nothing I try seems to be able to reproduce what I thought I saw work once before. So I'm looking for tips for things to try and ways to attempt to debug this issue. I suspect that folks who got this working in the past were using older versions/releases of MacOS, grub, or the kernel, and I wonder if I'm (re)breaking new ground just by trying this with Snow Leopard, grub 1.98, and Ubuntu 10.04. I've tried compiling grub trunk with platform=efi, fetched with bzr, but the compile failed. (I don't have my computer in front of me right now, so I can't tell you exactly what failed -- I'll double check that, unless that was to be expected). The one other thing I can think of is to apt-get all of the updates for my 32-bit install. (In order to save time, I've been trying different configurations just with the versions of code on the install CD). I'm certain that when I thought I saw this work once before, I would have seen it do so after I'd installed updates. Can you tell me if 1.98 supports ext4? I've seen some (older) web pages that claim that it doesn't. It would be nice to eliminate one variable from consideration. This might not be the correct forum to ask this, but does anybody know what installing the "grub-efi-amd64" package really does for Ubuntu? Does it replace the grub-pc package that was presumably installed off the CD? Should I be using that instead of compiling my own version of grub-1.98 (in a VMware box on my Mac) and placing my own version in /efi/grub? Should I expect to install grub-efi-amd64 in /dev/sda3 and be able to boot directly from that? Thanks again for any tips. --wpd ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Booting 64-bit Linux on a Macbook5,2 2010-09-23 13:47 ` Patrick Doyle @ 2010-09-23 14:01 ` Colin Watson 2010-09-23 16:06 ` Patrick Doyle 2010-09-23 19:02 ` Colin D Bennett 1 sibling, 1 reply; 8+ messages in thread From: Colin Watson @ 2010-09-23 14:01 UTC (permalink / raw) To: The development of GNU GRUB On Thu, Sep 23, 2010 at 09:47:44AM -0400, Patrick Doyle wrote: > Thank you for the reply. I am able to boot either the 32-bit or the > 64-bit kernel via grub when it is installed in /dev/sda3 (my Linux > partition). But I have to set acpi=off (or maxcpus=1) in order to > boot the kernel. (This is a known issue, see > https://bugzilla.kernel.org/show_bug.cgi?id=13170 and > https://bugs.launchpad.net/acpi/+bug/341230). However as I've been > reading around, it seems that some folks have been able to boot with > full capabilities (i.e. ACPI and both cores) when booting via EFI. I'm afraid I don't know how you might do that. The best way to find out why your system is hanging at boot is to attach a serial console to it, if you can, and boot it with console=ttyS0 so that you can see the early console messages. > I've compiled a 64-bit version of grub and can bring up boot menus > with that, but things hang when I attempt to launch the kernel. I've > tried both 32 and 64 bit kernels (full installations, actually) as > well as ext2 and ext4 root file systems. Nothing I try seems to be > able to reproduce what I thought I saw work once before. To me it sounds as if your machine has 64-bit EFI but that for some reason the 64-bit kernel oopses at boot, before the console comes up. I've seen this before and a serial console is about the only practical way to debug it. > I've tried compiling grub trunk with platform=efi, fetched with bzr, > but the compile failed. (I don't have my computer in front of me > right now, so I can't tell you exactly what failed -- I'll double > check that, unless that was to be expected). It should work now; things were in flux over the last few days in the run-up to the 1.99 freeze. > Can you tell me if 1.98 supports ext4? I've seen some (older) web > pages that claim that it doesn't. It would be nice to eliminate one > variable from consideration. Yes - those web pages are wrong. They're probably just confused by the fact that GRUB's 'ext2' module supports all of ext2, ext3, and ext4. > This might not be the correct forum to ask this, but does anybody know > what installing the "grub-efi-amd64" package really does for Ubuntu? > Does it replace the grub-pc package that was presumably installed off > the CD? On Ubuntu 10.04 LTS, grub-efi-amd64 installs the files but you have to install the actual boot loader yourself. On Ubuntu 10.10, it should install the boot loader as well. In both cases, it conflicts with grub-pc - you can only have one or the other installed at once. > Should I be using that instead of compiling my own version of > grub-1.98 (in a VMware box on my Mac) and placing my own version in > /efi/grub? Well, it would probably at least save you compiling it. > Should I expect to install grub-efi-amd64 in /dev/sda3 and be able to > boot directly from that? There are instructions for EFI installation on the GRUB wiki (grub.enbug.org), or the version of grub-install in Ubuntu 10.10 (or for that matter in quite recent GRUB trunk) should do it automatically. -- Colin Watson [cjwatson@ubuntu.com] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Booting 64-bit Linux on a Macbook5,2 2010-09-23 14:01 ` Colin Watson @ 2010-09-23 16:06 ` Patrick Doyle 2010-09-23 20:48 ` Colin Watson 0 siblings, 1 reply; 8+ messages in thread From: Patrick Doyle @ 2010-09-23 16:06 UTC (permalink / raw) To: The development of GNU GRUB Thank you again for taking the time to reply and to help me work through this... On Thu, Sep 23, 2010 at 10:01 AM, Colin Watson <cjwatson@ubuntu.com> wrote: > On Thu, Sep 23, 2010 at 09:47:44AM -0400, Patrick Doyle wrote: >> reading around, it seems that some folks have been able to boot with >> full capabilities (i.e. ACPI and both cores) when booting via EFI. > > I'm afraid I don't know how you might do that. The best way to find out > why your system is hanging at boot is to attach a serial console to it, > if you can, and boot it with console=ttyS0 so that you can see the early > console messages. Alas, my MacBook doesn't have a built in serial port. I suspect that trying to get early console messages out through a USB serial port dongle (especially the cheap Radio Shack one that I have) is doomed to frustration. OTOH, I have seen references to certain kernel command line parameters that make me think that a) EFI provides some sort of console API, and b) that Linux might have some sort of support for output to that console. I'll add that to the list of things to look into. > To me it sounds as if your machine has 64-bit EFI but that for some > reason the 64-bit kernel oopses at boot, before the console comes up. > I've seen this before and a serial console is about the only practical > way to debug it. So, if my 64-bit EFI can boot a 64-bit grub (which seems to be the case), can I reasonably expect to boot either a 32 or a 64 bit kernel from grub? Or should I only be able to boot a 64 bit kernel? > >> This might not be the correct forum to ask this, but does anybody know >> what installing the "grub-efi-amd64" package really does for Ubuntu? >> Does it replace the grub-pc package that was presumably installed off >> the CD? > > On Ubuntu 10.04 LTS, grub-efi-amd64 installs the files but you have to > install the actual boot loader yourself. On Ubuntu 10.10, it should > install the boot loader as well. In both cases, it conflicts with > grub-pc - you can only have one or the other installed at once. Just to make sure I'm understanding this correctly, should I do something vaguely similar to: $ apt-get remove grub-pc $ apt-get install grub-efi-amd64 $ grub-install /dev/sda3 ... if I want an EFI aware, 64-bit grub installed as my bootloader? If I do that, what should I expect to be differerent than the grub-pc bootloader that was (presumably) installed when I installed Ubuntu? The bootloader that was installed (in /dev/sda3) currently boots my kernel, as long has I have acpi=off or maxcpus=1 flags set. > >> Should I be using that instead of compiling my own version of >> grub-1.98 (in a VMware box on my Mac) and placing my own version in >> /efi/grub? > > Well, it would probably at least save you compiling it. Right now, when I compile it, I do so in order to produce a set of files that I can place in /efi/grub on my MacOS file system. If I install grub-efi-amd64, it will be installed in the partition and in files on my Linux file system, Thanks again for helping me to work through this. --wpd ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Booting 64-bit Linux on a Macbook5,2 2010-09-23 16:06 ` Patrick Doyle @ 2010-09-23 20:48 ` Colin Watson 2010-09-24 11:16 ` Patrick Doyle 0 siblings, 1 reply; 8+ messages in thread From: Colin Watson @ 2010-09-23 20:48 UTC (permalink / raw) To: The development of GNU GRUB On Thu, Sep 23, 2010 at 12:06:37PM -0400, Patrick Doyle wrote: > On Thu, Sep 23, 2010 at 10:01 AM, Colin Watson <cjwatson@ubuntu.com> wrote: > > On Thu, Sep 23, 2010 at 09:47:44AM -0400, Patrick Doyle wrote: > >> reading around, it seems that some folks have been able to boot with > >> full capabilities (i.e. ACPI and both cores) when booting via EFI. > > > > I'm afraid I don't know how you might do that. The best way to find out > > why your system is hanging at boot is to attach a serial console to it, > > if you can, and boot it with console=ttyS0 so that you can see the early > > console messages. > > Alas, my MacBook doesn't have a built in serial port. I suspect that > trying to get early console messages out through a USB serial port > dongle (especially the cheap Radio Shack one that I have) is doomed to > frustration. > > OTOH, I have seen references to certain kernel command line parameters > that make me think that a) EFI provides some sort of console API, and > b) that Linux might have some sort of support for output to that > console. I'll add that to the list of things to look into. In both cases (USB serial and EFI console), Linux supports console output, but it isn't initialised early enough to catch oopses early on in the boot process. > > To me it sounds as if your machine has 64-bit EFI but that for some > > reason the 64-bit kernel oopses at boot, before the console comes up. > > I've seen this before and a serial console is about the only practical > > way to debug it. > > So, if my 64-bit EFI can boot a 64-bit grub (which seems to be the > case), can I reasonably expect to boot either a 32 or a 64 bit kernel > from grub? Or should I only be able to boot a 64 bit kernel? If everything is working correctly, then it should be possible to boot either a 32-bit or a 64-bit kernel, but only the 64-bit kernel will operate in EFI mode. > >> This might not be the correct forum to ask this, but does anybody know > >> what installing the "grub-efi-amd64" package really does for Ubuntu? > >> Does it replace the grub-pc package that was presumably installed off > >> the CD? > > > > On Ubuntu 10.04 LTS, grub-efi-amd64 installs the files but you have to > > install the actual boot loader yourself. On Ubuntu 10.10, it should > > install the boot loader as well. In both cases, it conflicts with > > grub-pc - you can only have one or the other installed at once. > > Just to make sure I'm understanding this correctly, should I do > something vaguely similar to: > > $ apt-get remove grub-pc > $ apt-get install grub-efi-amd64 > $ grub-install /dev/sda3 > > ... if I want an EFI aware, 64-bit grub installed as my bootloader? You don't need to explicitly remove grub-pc, since grub-efi-amd64 already conflicts with it. grub-install will only work on 10.10, and on EFI it doesn't take a device argument - instead it creates a grub.efi image (there are a few possible names) and puts it in a particular place. On 10.04, you'll have to look up the documentation on grub.enbug.org. I strongly suggest looking through that documentation anyway to orient yourself. If you're already expecting to place an image in /efi/grub on your OS X file system, then you might be better off following the wiki instructions anyway ... > If I do that, what should I expect to be differerent than the grub-pc > bootloader that was (presumably) installed when I installed Ubuntu? You get a new and exciting host of problems, since EFI mode is in general less well-tested. :-) > >> Should I be using that instead of compiling my own version of > >> grub-1.98 (in a VMware box on my Mac) and placing my own version in > >> /efi/grub? > > > > Well, it would probably at least save you compiling it. > > Right now, when I compile it, I do so in order to produce a set of > files that I can place in /efi/grub on my MacOS file system. If I > install grub-efi-amd64, it will be installed in the partition and in > files on my Linux file system, Sure, but you can always copy the resulting image around. Cheers, -- Colin Watson [cjwatson@ubuntu.com] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Booting 64-bit Linux on a Macbook5,2 2010-09-23 20:48 ` Colin Watson @ 2010-09-24 11:16 ` Patrick Doyle 0 siblings, 0 replies; 8+ messages in thread From: Patrick Doyle @ 2010-09-24 11:16 UTC (permalink / raw) To: The development of GNU GRUB On Thu, Sep 23, 2010 at 4:48 PM, Colin Watson <cjwatson@ubuntu.com> wrote: > On Thu, Sep 23, 2010 at 12:06:37PM -0400, Patrick Doyle wrote: >> On Thu, Sep 23, 2010 at 10:01 AM, Colin Watson <cjwatson@ubuntu.com> wrote: >> > On Thu, Sep 23, 2010 at 09:47:44AM -0400, Patrick Doyle wrote: > You don't need to explicitly remove grub-pc, since grub-efi-amd64 > already conflicts with it. grub-install will only work on 10.10, and on > EFI it doesn't take a device argument - instead it creates a grub.efi > image (there are a few possible names) and puts it in a particular > place. On 10.04, you'll have to look up the documentation on > grub.enbug.org. I strongly suggest looking through that documentation > anyway to orient yourself. I've looked through the TestingOnEFI and TestingOnMacbook pages and found them somewhat confusing (more on that later). Are there other pages I should be looking at? I'm surprised to learn that grub-install wouldn't take a device argument -- how would the bootstrap environment know where to find to find grub.efi if it didn't know to look in magic places on the device? I would be very surprised to learn that EFI was capable of reading ext4 filesystems. OTOH, it does seem to be capable of reading the HFS+ filesystem on my Macbook, but Apple has a vested interest in making that happen. Well, I see elsewhere in the wiki that EFI can boot from ext2/ext3 filesystems, so perhaps ext4 isn't so far off. Regardless, when I look at the wiki page for grub-install, it says the argument is /dev/hda, which can be shortened to (hd0), which can be shortened to hd0. That sounds like grub-install does take a device argument. Is the wiki page out of date? > > If you're already expecting to place an image in /efi/grub on your OS X > file system, then you might be better off following the wiki > instructions anyway ... I have to say that I found the wiki instructions somewhat confusing... On the TestingOnMacbook page, there is a section that says: "First, you need to decide whether to use a bios dump. Bios dump is necessary for certain x.org drivers, as they need to scan the video rom for important data structure such as DDC table. Some driver even calls INT 10 to locate VESA BIOS, so the IVT for INT10 needs to be set properly as well. To get the bios dump, you need to boot into pc mode, then use these commands to generate dump files: ..." How would I make the decision whether I need to use a bios dump or not? If I'm using the proprietary NVIDIA driver, does that imply that it is NOT one of the "certain x.org" drivers? What does it mean "to boot into pc mode"? Later in the page, under the "Troubleshooting" section (that one caught my eye!), it says to boot Linux into BIOS mode so that the keyboard backlight is on. How does one boot Linux into BIOS mode? Ummm... My Macbkook eson't seem to have a keyboard backlight, is there something else I should look for? Thanks for reading this far. I really appreciate it :-) --wpd ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Booting 64-bit Linux on a Macbook5,2 2010-09-23 13:47 ` Patrick Doyle 2010-09-23 14:01 ` Colin Watson @ 2010-09-23 19:02 ` Colin D Bennett 1 sibling, 0 replies; 8+ messages in thread From: Colin D Bennett @ 2010-09-23 19:02 UTC (permalink / raw) To: grub-devel On Thu, 23 Sep 2010 09:47:44 -0400 Patrick Doyle <wpdster@gmail.com> wrote: > Thank you for the reply. I am able to boot either the 32-bit or the > 64-bit kernel via grub when it is installed in /dev/sda3 (my Linux > partition). But I have to set acpi=off (or maxcpus=1) in order to > boot the kernel. I am running 64-bit Ubuntu 10.04 on my MacBookPro5,1 using rEFIt and GRUB (Ubuntu stock version, 1.98). I didn't do anything fancy like using an EFI GRUB or adding special kernel parameters. I get full use of both cores. I'm not an expert on the Mac platform so I don't know if rEFIt is making it work for me or whatever -- all I can say is that it works fine for me this way. Regards, Colin ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-09-24 11:17 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-09-22 19:16 Booting 64-bit Linux on a Macbook5,2 Patrick Doyle 2010-09-23 10:54 ` Colin Watson 2010-09-23 13:47 ` Patrick Doyle 2010-09-23 14:01 ` Colin Watson 2010-09-23 16:06 ` Patrick Doyle 2010-09-23 20:48 ` Colin Watson 2010-09-24 11:16 ` Patrick Doyle 2010-09-23 19:02 ` Colin D Bennett
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.