Menu

Boot options and where to put them

2017-07-05
2017-07-05
  • John Haywood

    John Haywood - 2017-07-05

    I've been trying to get an 8,2 MacBook Pro to boot into LinuxMint 18.x, and can add the necessary options to disable the outboard Radeon card, and just use the HD4000 in GRUB2

    However, I can't figure out for the life of me how to automatically pass the options below to the kernel in rEFInd. If anyone can help out, I'd be massively grateful

    First disable Radeon:

    in GRUB2 there's a line:
    gfxpayload=keep
    and we put the follwing after it:

    outb 0x728 1
    outb 0x710 2
    outb 0x740 2
    outb 0x750 0
    

    Next Kernel options

    Then after the default kernel option "quietsplash"
    we put
    i915.lvds_channel_mode=2 i915.modeset=1 i915.lvds_use_ssc=0
    (inside the quotes)

    Now I can do all of that on one line by editing the kernel options on boot in rEFInd:

    "outb 0x728 1" "outb 0x710 2" "outb 0x740 2" "outb 0x750 0" "quietsplash i915.lvds_channel_mode=2 i915.modeset=1 i915.lvds_use_ssc=0"

    (I didn't put gfxpayload=keep in at this time)
    but I'd like to adjust the default refind.conf so I dont have to manually enter the parameters each time

    Thanks for any help

    THEN - I might tackle the issue of getting both graphics cards to work

     
  • Roderick W. Smith

    In a default configuration, you'd put all the kernel options (gfxpayload=keep and i915.lvds_channel_mode=2 i915.modeset=1 i915.lvds_use_ssc=0) in the /boot/refind_linux.conf file. If that file does not exist, you can create it by typing sudo mkrlconf. In fact, if you type that command from a boot that uses the correct options, it should include the options in its default entry. Note that this assumes you want to launch the Linux kernel directly from rEFInd. If you're launching the kernel in some other way (via GRUB or ELILO, for instance), you'd need to modify the configuration in the boot loader, not in rEFInd.

    rEFInd does not currently support anything that's equivalent to GRUB's outb command. Sometimes other rEFInd options will do something that's similar. For instance, enable_and_lock_vmx, spoof_osx_version, and other options in refind.conf can affect low-level features that might be handled via outb commands in GRUB. Without knowing what those commands are doing, though, I can't suggest specific rEFInd equivalents, or even know whether such equivalents might exist.

    If you know how to do what you want in an EFI shell script, you could write that script and create a rEFInd manual boot stanza to launch the EFI shell and execute that script. You'd then be able to launch the script via rEFInd. This would be a rather ugly solution, and it would execute slowly (EFI shells generally impose a ~5-second delay when they start so as to enable you to opt out of launching the startup script), but it would work.

     
  • John Haywood

    John Haywood - 2017-07-21

    Thanks for the info. One follow up question regarding the refind.conf file:

    I installed refind from the Mac side, and I havent got the mkrlconf command available. The file location is as follows:

    /boot/efi/EFI/refind/refind.conf

    Is this the correct file and location or should I move/change the file to a different location?

    Thanks for all your work

     
  • Roderick W. Smith

    In most Linux distributions, rEFInd will be installed to /boot/efi/EFI/refind, so that location is correct from Linux.

    You can always pull mkrlconf out of the .zip file you used on the Mac side, or obtain it directly from the rEFInd git repository.

     
  • John Haywood

    John Haywood - 2017-07-24

    Unfortunately, even though I've generated the refind_linux.conffile from the linux side of my MacBook, verified that its contents do indeed contain the boot options, and verified the file's location at /boot/refind_linux.conf, I still only get the autodetected options, ie my two kernels with the three auto-generated options, but none of my kernel optiions

     
  • Roderick W. Smith

    You refer to the "three auto-generated" options, but rEFInd will normally generate only one or two options unless it reads a refind_linux.conf file. Thus, I suspect that rEFInd is reading this file, but it's not parsing the contents correctly. I can't be sure without more evidence, though. Please post the contents of refind_linux.conf (or a link to it on a pastebin site) and screen shots (digital photos) of the options shown when you hit F2, Tab, or Insert twice, as well as the overall description of the kernel in the main rEFInd screen.

    Note also that the line editor (F2, Tab, or Insert twice) shows everything on one line, which scrolls horizontally. If you have many options, some of them will be invisible in the line editor unless and until you scroll over to them by using the arrow keys. (Be sure to show multiple screen shots if this happens to you.)

     

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.