Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo on 2012 Mac mini - [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 786

PostPosted: Thu Jan 02, 2025 3:28 am    Post subject: Gentoo on 2012 Mac mini - [SOLVED] Reply with quote

Hi,

I'm trying to get Gentoo running on my old mac-mini
It's this precise model:
https://support.apple.com/en-us/111926


Originally, its internal HDD had 2 partitions, an EFI partition and an APFS partition.

I deleted the second partition, then created two new partitions in its place, a swap and the root partition.

This is what it looks like currently:
Quote:

Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: APPLE HDD HTS541
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 00003B76-74D2-0000-3218-0000407A0000

Device Start End Sectors Size Type
/dev/sda1 40 409639 409600 200M EFI System
/dev/sda2 411648 8800255 8388608 4G Linux swap
/dev/sda3 8800256 1953525134 1944724879 927.3G Linux filesystem


I proceeded with a normal handbook-install for amd64.

Note that I did NOT touch the EFI partition.

But if I try and install grub, I get

Quote:
grub-install /dev/sda

Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.

Do I have to format the EFI partition?

Running the kernel install procedure seems to work correctly.

However, this is the contents of the EFI partition:
Quote:

ls -la /mnt/gentoo/efi/
drwxr-xr-x 4 root root 512 Dec 4 2013 .Trashes
drwxr-xr-x 4 root root 512 Jan 2 01:00 EFI

ls -la /mnt/gentoo/efi/EFI/
drwxr-xr-x 4 root root 512 Dec 4 2013 APPLE
drwxr-xr-x 2 root root 512 Jan 2 01:00 gentoo

ls -la /mnt/gentoo/efi/EFI/gentoo/
-rwxr-xr-x 1 root root 147456 Jan 2 01:00 grubx64.efi


It doesn't have the grub sub-folder in efi/EFI/gentoo

The install is all done, except if I reboot, the machine does not recognize the drive properly, it displays a blinking disk icon. I expect that is because of the faulty grub-install...

How should I proceed?

Thank you for any insight


Last edited by Progman3K on Sat Jan 04, 2025 6:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 516

PostPosted: Thu Jan 02, 2025 10:56 am    Post subject: Re: Gentoo on 2012 Mac mini Reply with quote

Progman3K wrote:
But if I try and install grub, I get

Quote:
grub-install /dev/sda

Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.

Do I have to format the EFI partition?


That output shows that you try to install GRUB in the old legacy BIOS mode.

You need to start the system in UEFI mode (ls -l /sys/firmware/efi/efivars should exist). Then you want in your /etc/portage/make.conf GRUB_PLATFORMS="efi-64".

And please check also the wiki for the correct "grub-install" command. Because you are mounting the ESP to /efi and not /boot/efi, you need to specify the ESP mount point. https://wiki.gentoo.org/wiki/GRUB#Installing_GRUB_for_EFI

The grub subfolder is under /boot and not on your ESP (unless you mount the ESP to /boot).
Back to top
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 786

PostPosted: Thu Jan 02, 2025 12:17 pm    Post subject: Re: Gentoo on 2012 Mac mini Reply with quote

sMueggli wrote:

That output shows that you try to install GRUB in the old legacy BIOS mode.

You need to start the system in UEFI mode (ls -l /sys/firmware/efi/efivars should exist).



Thanks, sMueggli!

How do I start the livecd (liveusb in this case) in UEFI mode?

I am using a Gentoo livedvd ISO I downloaded in 2022, that I imaged onto a 16GB key, is there a way to boot that in UEFI mode?
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 516

PostPosted: Fri Jan 03, 2025 3:55 pm    Post subject: Reply with quote

I have no experience with mac.

It does not need to be a Gentoo ISO, you can use basically any current Linux ISO. You can follow any tutorial/guide on how to install Linux or Ubuntu on mac mini.

If the USB device contains an "EFI" directory, the firmware should be able to load an EFI binary from there.
Back to top
View user's profile Send private message
flysideways
Guru
Guru


Joined: 29 Jan 2005
Posts: 501

PostPosted: Fri Jan 03, 2025 5:28 pm    Post subject: Reply with quote

Unless you have a reason to keep the old, unsupported, macos, you can just use the whole drive for Gentoo.

I have done so on both a 2008 Intel Macbook* and a 2012 Intel MacBook Pro.

* the 2008 Macbook is so old and tired, and only 1280x800 display, that I recently reinstalled the macos and no longer use that device. I've kept it around as a curiosity, more than anything else, as my Pi 5's significantly outperform it and have twice the ram, and twice the cores ...
Back to top
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 786

PostPosted: Sat Jan 04, 2025 6:13 pm    Post subject: Reply with quote

Solved!

I booted the machine with a more recent Gentoo liveUSB by holding down the Option key at boot.

Option key is ALT on a standard keyboard, by the way.

This presented me with an EFI boot option.

After choosing the EFI option and booting the live environment, I was able to mount the drives, chroot into the install, and finally install Grub correctly, as per the handbook instructions.

Thank you for your help!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum