Single boot install on 2009 MacBook Pro

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Courgette

Single boot install on 2009 MacBook Pro

Post by Courgette »

I recently acquired a 2009 MacBook Pro 5.5 that only needed a hard drive in order to function again.
CPU: Intel Core Duo P7550 @ 2.26GHz
4Gb (total) of SODIMM DDR3 1333 MHz

Having a spare SSD laying around I figured I'd have a go at installing Mint (Cinnamon) on the machine. Now my experience with Linux is largely limited to Raspbarian and a touch of Ubuntu. No problems making up a boot stick and getting the installer rolling however where I am running into problems is that grub keeps failing to install. The installer gets very close to finishing and then I get a message telling me:
grub-efi-amd64-signed failed to install
Then the installer crashes.

I am definitely booted in EFI mode (I have a EFI system partition that is 512MiB fat32b flagged as boot, esp).
I have also tried installing Mint sans bootloader and although that has succeeded (at least now when I open Install Linux Mint is asks if I wish to install along side Mint 18.3 Sylvia) I am at a loss for how to now get the bootloaders onto the machine.
sudo efibootmgr shows:
BootCurrent: 0000
BootOrder: 0080
Boot0080* Mac OS X
Boot0081* Mac OS X
Boot0082*
BootFFFF*


I've google quite extensively and none of the posts with a similar problem have not proven particularly helpful and I am not at all sure how to proceed.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: Single boot install on 2009 MacBook Pro

Post by fabien85 »

Hi,
it's your occasion to try a better bootloader : refind.
Boot your live USB, then download refind here : http://www.rodsbooks.com/refind/getting.html, take the binary zip file
Unzip the file, open the unzipped folder in the file manager and right click > Open in terminal.
Then two choices :
1) the simpler route
2) the harder route, if you are familiar with the terminal and mounting partitions

1) simpler route
issue the following command

Code: Select all

./refind-install --usedefault /dev/sda
then shutdown, unplug the USB, boot pressing alt/option and choose the option "EFI Boot" with logo an internal hard drive. This will get you to refind where you will have an entry to boot Mint, called something like "Boot /boot/vmlinuz-blabla from X GB ext4 volume". Boot it, you should get to Mint. Now in Mint use the following instructions to install refind permanently as registered in the NVRAM :

Code: Select all

sudo apt-add-repository ppa:rodsmith/refind
apt update
apt install refind
2) harder route
use (g)parted to find what is the root partition (in the following I'm going to assume /dev/sda2). Also if you have a separate /boot (doesnt come by default, you need to either do it manually or choose full disk encryption for this) you will need to mount it too (at /mnt/boot).
Mount the root :

Code: Select all

sudo mount /dev/sda2 /mnt
Now install refind :

Code: Select all

./refind-install --root /mnt
shutdown, unplug the USB, boot normall and you should get refind with an entry to boot Mint, called something like "Boot /boot/vmlinuz-blabla from X GB ext4 volume".


Note that there are sometimes video problems with Macs, so if you later install the nvidia drivers and get a black screen, that's the probable culprit.
Courgette

Re: Single boot install on 2009 MacBook Pro

Post by Courgette »

Thanks fabien85! Those are super clear and easy to follow instructions. It is really appreciated. I did managed to get rEFInd installed no problem (the easy way). So booting into it via holding the 'option' key on boot I get to the rEFInd menu.
The only boot option I am given (without the USB stick in) is:
Boot EFI\refind\refind_x64.efi from EFI System Partition
Buuuuuut
When I select it I get a brief flash (maybe half a second?) of a black screen with a blue bar on it and then I'm right back at the rEFInd boot manager only now the Boot EFI\refind\refind_x64.efi from EFI System Partition option is gone.

So first time this happened I wondered if the bootloaderless install of mint hadn't quite gone right the first time. So I redid my partitions (sda1: EFI, sda2: /, sda3 /home, and sda4: swap) and reinstalled mint without the bootloader again. Only to have the exact same thing again happen again when I select that single option in the rEFInd boot manager.

Also thank you for the heads up about the nvidia drivers on the MacBook Pro. I had assumed there would be some initial toruble with the GPU and possibly the wireless card (just not initial install and bootloader).
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: Single boot install on 2009 MacBook Pro

Post by fabien85 »

Hi, so it looks like you have two different refind installed. It's not problematic though.
What's more intriguing is that refind doesnt detect your installed linux. Three possibilities :
1) Linux was not installed properly.
Booting your live USB, could you post the output of sudo parted --list ?
2) You made an encrypted install with full disk encryption. Did you ?
Though still in that case, refind should detect the kernel on the unencrypted /boot
3) Some necessary EFI drivers were not installed by refind. Try again the route 1) of my previous post but with now the following install command :

Code: Select all

./refind-install --usedefault /dev/sda1 --alldrivers
Courgette

Re: Single boot install on 2009 MacBook Pro

Post by Courgette »

sudo parted --list gives:
Model: ATA PNY CS2211 240GB (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/512B

Number Start End Size File System Name Flags
1 1049kB 530MB 538MB fat32 EFI system partition boot, esp
2 538MB 26.8GB 26.2BG ext4 root
4 26.8GB 225GB 198GB ext4 home
3 225GB 230GB 5000MB linux-swap(v1)

Model: JetFlash Transcend 8GB 9scsi)
Disk /dev/sdb: 6028MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File System Name Flags
1 32.3kb 8028MB 8028MB primary fat32 boot, lba



The initial install I attempted (and subsequently failed when it tried to install GRUB) was a full disk encrypt. Wouldn't my subsequent re-partitioning and reinstall overwrite any encryption that was set down?

I will try reissuing that refind command in a little bit when I can snag an ethernet port at work.
Courgette

Re: Single boot install on 2009 MacBook Pro

Post by Courgette »

Success! throwing ./refind-install --usedefault /dev/sda1 --alldrivers did the trick and I can now boot into the mint install. Thanks so much for the help! No issues with the GPU drivers thus far. Though it looks like it is running an open source driver rather than the nvidia ones proper.
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: Single boot install on 2009 MacBook Pro

Post by fabien85 »

Congrats!
Wouldn't my subsequent re-partitioning and reinstall overwrite any encryption that was set down?
yes it will overwrite everything. And we can indeed see from the parted output that you have a normal unencrypted partition setup (with a separate /home)
So encryption was not the issue, it's just that refind didnt install the EFI drivers (maybe it's the normal behaviour of the refind-install with the --usedefault option, I need to check).

(optional) now I would advise to reinstall refind one last time from the booted linux :

Code: Select all

sudo apt-add-repository ppa:rodsmith/refind
apt update
apt install refind
It's not mandatory but has the following advantages :
- refind will be updated like all other packages on your system
- upon reinstall, a /boot/refind_linux.conf file will be created, which will give more boot options for your linux. It will give for instance an option to boot in single user mode (i.e. get to a root shell), which is useful to try to recover a broken system. You may also edit this refind_linux.conf to tweak or add entries, e.g. by adding a graphical splash screen at boot, or adding an entry to boot in recovery mode.
No issues with the GPU drivers thus far. Though it looks like it is running an open source driver rather than the nvidia ones proper.
Yes by default the system uses the open-source nouveau driver. Trouble may (or may not) arise if you install the nvidia driver. So I advise to know a way to boot in recovery or single user mode before trying to install nvidia. That way , in case it turns out you cant boot to the desktop anymore with nvidia, you can just boot in recovery or single user mode, purge the nvidia packages (apt purge nvidia*), reboot and you are back to normal.
Locked

Return to “Installation & Boot”