Menu

rEFInd on macbook

Bloop
2015-11-18
2015-11-23
  • Bloop

    Bloop - 2015-11-18

    Hello im new here and id like to ask a question. I want to install a version of linux on my macbook pro early2011 so i read that i need to install the rEFInd. I alrdy have installed windows on this laptop like so: i have 2 hard drives on one i partitioned it so i have 100Gb for OSX and 100Gb for windows + 120Gb on the 2nd hard (for windows too).

    Im wondering if i can delete the OSX partition and install linux over it? Will it work or do i still need to keep the OSX partition.

    I tried to install the linux partition on an external harddriver but it wont see it at booting screen.

    I want to keep the windows partitions as they are and im afraid not to dmg something. So how can i get the linux on this laptop without removing the windwos?

    Thank you.

     
  • Roderick W. Smith

    Yes, you can delete OS X and install Linux in its place. A better option, however, is this:

    1. Shrink one of your existing partitions by about 500MiB.
    2. Install Linux to your external disk, but create a partition in that ~500MiB free space on an internal disk and mount it at boot. I recommend using ext4fs on this partition.
    3. If it's not installed already, install the EFI filesystem driver for ext4fs in the rEFInd drivers or drivers_x64 subdirectory.

    The result of this combination is that you should be able to boot Linux, which should have just a tiny toehold (in the form of the /boot partition) on your internal disk.

    If you decide instead to replace OS X with Linux, the real question is whether Windows is booting in BIOS mode or in EFI mode. In most cases, Windows 7 and earlier boots on Macs in BIOS mode, but later versions could be booting in either way. It's best to match the Linux boot mode to that of Windows. If that turns out to be BIOS mode, rEFInd will become irrelevant. See this page of mine for information on BIOS-mode booting. That page is written with UEFI-based PCs in mind, and Macs have their own unique wrinkles, but most of it remains relevant to Macs.

     
  • Bloop

    Bloop - 2015-11-21

    Hi i successfuly installed rEFInd and is working good. When i reboot i see both OSx and Windows partitions with the nice rEFInd in the background. The only problem is i can not resize any of my partitions..

    Also could you pls offer me some indications on how to :"create a partition in that ~500MiB free space on an internal disk and mount it at boot. I recommend using ext4fs on this partition."
    I mean how do i install ext4fs.

    I atached a ss with my current setup. The ssd and "depozit" are with windows and the "Untitled 1" is for OSx and i cannot shrink the OSx one without deleting depozit :(.. at least not with Disk Util.

    if anyone have any solution for this one pls leave a comment.

    Also big thanks Roderick W. Smith you helped me alot and tnx for the awesome solution i havent thought about that.

     

    Last edit: Bloop 2015-11-22
  • Roderick W. Smith

    You'll need to shrink a partition to make this work. IIRC, OS X's Disk Utility doesn't support shrinking HFS+ partitions, but I'm not 100% positive of that. I believe that GParted (a Linux tool) does support this operation, so you might try that. You should consult the documentation for your partitioning tool to learn how to resize partitions with that tool.

    One warning: If Windows is booting in BIOS mode, then your disk must have a hybrid MBR. (Please read that linked-to page!) If you resize the MBR side of the disk, as you would probably do if you use a Windows tool, the disk will be put into a dangerously inconsistent state. If you use GParted or some other tool that doesn't know how to deal with a hybrid MBR, you'll lose the hybrid MBR and have to re-create it.

     
  • Bloop

    Bloop - 2015-11-23

    Ok i found this program in windows and I.m still not sure if i understood ok.

    As i see i dont have a hybrid MBR, all my partitions are Basic MBR so should i shirnk the the ssd?

    If i resize it and try to create a new partition i have the option to make the File system: ext4. (2nd screenshot).

    Now what am i supposed to install on this new partition?

    I installed my linux on the usb but when i restart it it shows up in the rEFInd interface but when i select it says No OS could be found or something similar..

     
  • Roderick W. Smith

    STOP!!!!!!

    Your disks are almost certainly NOT MBR disks, and proceeding as you're doing will cause serious damage!!

    You probably have hybrid MBR disks. Apple ships their computers with legal GPT configurations, and although it's possible to boot OS X from an MBR disk, such configurations are extremely rare on Macs. A much more common configuration is a GPT disk with a hybrid MBR. Such disks show up as MBR disks in Windows, but they are not MBR disks. They're GPT disks with an illegal hack to a GPT data structure (the protective MBR) to make them look like MBR disks to Windows. Hybrid MBRs are ugly and dangerous, but Apple relied on them when implementing support for dual-booting OS X with Windows. Windows 8 and later can boot in EFI mode on most Intel-based Macs, but hybrid MBRs remain common, even with some Windows 8 and 10 installations. My guess is that you've got a hybrid MBR, but I'm not 100% certain of that. Making any changes to your partitions before you figure this out runs the risk of serious data loss.

    Please read the referenced link on hybrid MBRs, then figure out what you've got. GPT fdisk (gdisk) will tell you:

    $ sudo gdisk -l /dev/sde
    GPT fdisk (gdisk) version 1.0.1
    
    Partition table scan:
      MBR: hybrid
      BSD: not present
      APM: not present
      GPT: present
    

    This example is from Linux; you must change your device filename appropriately if you run it in OS X or Windows. Note in particular the MBR: hybrid line, which identifies a hybrid MBR. Note that if you've got multiple disks (it looks like you've got two), it's possible for one to be set up in one way and the other in another way; so you might have a legal GPT disk and a GPT disk with a hybrid MBR; or a GPT disk and an MBR disk; and so on.

    If you have a hybrid MBR, as I suspect, you must do any repartitioning from a tool that works on the GPT side. In many cases, it will then be necessary to create a fresh hybrid MBR with gdisk, gptsync, or some other tool that's designed for this job.

     
  • Bloop

    Bloop - 2015-11-23

    Ok thank you for your time. I cant get GPT fdisk to work .. during the installation i get an error:
    "The installation failed. the installer encountered an error that caused the installation to fail. contact the software manufacturer for assistance."

    Anyway I hoped it will pe easyer and i dont think i can just erase everything on my disk just to install it to work for linux..

    Last few days i read a lot from your website and is full with useful informations. Thank you. Maybe someother time when i will be able to understand better how the MBR EFI GPT works...

     

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.