Menu

rEFInd and Wubi

2014-02-02
2014-02-08
  • joevt

    joevt - 2014-02-06

    If your Windows disk is formatted NTFS then rEFInd won't be able to find files on the disk without an EFI NTFS filesystem driver. You can find one of those in the Clover project.

    rEFInd can only execute EFI loaders. wubildr.mbr is a BIOS boot loader like BOOTMGR or NTLDR or \Windows\system32\winload.exe.

    If you want to boot directly from rEFInd to Wubi, then you need a separate partition for the boot files required to startup Wubi (BOOTMGR, Boot folder including BCD).

    Note that EasyBCD has a Wubi option you can add to the Windows boot menu. When you choose to boot from this item, it will use it's NeoGrub to set the root to the disk containing a file at \ubuntu\winboot\menu.lst and then the NeoGrub will use the menu.lst. This boot process uses two files, \NST\AutoNeoGrub0.mbr and \ANG0 where the 0 might be any number depending on how many AutoNeoGrub dependent boot items you've added.

    It might be useful if rEFInd had the ability to edit BCD or menu.lst files when selecting a menu option so that you would only need one partition for selecting multiple items that are on the same disk. This might be implemented using a file copy and rename stanza.

    Another useful feature might be to automatically change the MBR to contain a reference to a GPT partition that is not currently in the MBR. rEFInd already has the ability to change which MBR partition is the active partition. It could instead change which partition the active partition points to. This would handle the case where you have more legacy OS GPT partitions than can fit in the MBR. A boot stanza could include a list of GPT partitions to include in the MBR.

     
    • Roderick W. Smith

      Having rEFInd edit another boot loader's configuration file would mean opening a can of worms about the size of my house. With all due respect, I'm not going there.

      Similar comments apply to having rEFInd edit the partition table, with the added disincentive that hybrid MBRs are dangerous and ugly hacks to begin with. Unfortunately, Apple decided to use them to support dual-booting Windows, and rEFIt does some minimal adjustment of active flags that rEFInd inherited. Fortunately, as EFI gains prominence in the PC world, the need to boot in BIOS mode is fading, even on Macs, which will slowly reduce the desirability of ugly hacks to support such things in tools like rEFInd. My strategy as rEFInd's maintainer is to wait it out and advise people to do things in a saner way.

       
      • joevt

        joevt - 2014-02-08

        Instead of editing the boot loader's configuration file, rEFInd could just copy and rename the file.

        The ugly hack isn't so ugly when it can make the boot process less ugly. Even if it's a pain to setup, people will do it for the convenience afterward. For example, the rEFIt hack of changing the active flag is there so that you don't need to go through a grub or Windows boot menu to boot other partitions. The hacks I suggested would have the same goal.

        Anyway, waiting isn't going to make my old Mac be able to boot other OS's in EFI.

         
  • Roderick W. Smith

    WUBI is a hackish way to boot Linux on a BIOS-mode PC.

    A Windows installation on a Mac uses hackish tricks to get Windows booting in BIOS mode on an EFI-based computer.

    Combine the two and you're using hackish tricks within hackish tricks to get Linux running.

    In other words:

    Eeeuughhheee!!! (Shudder)

    In fact, triple-booting OS X, Windows, and Linux on a Mac is a bit of a nightmare, no matter how you do it. IMHO, the best way to tackle such needs generally involves using a virtual machine for at least one OS. That reduces the need for extreme expertise or weird shudder-inducing setups that will break the next time you look at it cross-eyed.

    If you must triple-boot, I recommend starting over again:

    1. Read my page on hybrid MBRs, which will teach you about Apple's ugly and dangerous hack that's required to boot Windows Vista and earlier on Macs.
    2. Check OS X forums for discussions of installing Windows in EFI mode on a Mac. This is possible, but difficult, with Windows 7. It's supposedly easier with Windows 8, but the details depend on your Mac model, and unfortunately, I don't have references to sites or forum threads discussing the matter, so I can't be more specific. If you can install Windows 8 in EFI mode, though, you'll obviate the need for the ugly and dangerous hybrid MBR and make the installation both much simpler and much more robust.
    3. Read up on installing Linux in EFI mode. I wrote a Web page on doing this on Macs that may be helpful, although it's a bit old and uses an ancient Mac as a reference. My more general page on installing Linux on UEFI-based PCs may also be useful.
    4. With this information in hand, redo your installation. At the very least, re-do the installation of Linux, reserving the hybrid MBR for Windows and booting Linux in EFI mode. Ideally, you'll be able to keep a legal protective MBR and boot all three OSes in EFI mode.

    You'll note that these instructions are very general. This is because I'm advising you to learn about your specific computer and your specific needs, which I can't know. Triple-booting on a Mac is best accomplished via significant knowledge, not via a cookie-cutter recipe.

    Oh, and your manual rEFInd boot stanza was doomed to failure because such stanzas can launch nothing but EFI programs, and the WUBI loader you're trying to launch is not such a program.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.