Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing Gentoo on Late 2012 Mac Mini (Second HDD)
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
jon10121
n00b
n00b


Joined: 17 Jun 2014
Posts: 4

PostPosted: Tue Jun 17, 2014 5:33 pm    Post subject: Installing Gentoo on Late 2012 Mac Mini (Second HDD) Reply with quote

Hello everyone!

One of my first tasks as a new graduate student is to get a molecular dynamics simulation program running, and since it is no longer supported on Mac OS X, I figured I'd install a second HDD in my campus workstation and get Gentoo running. I've gotten the Samsung 250GB SSD installed, and went through the process of installing Gentoo with a friend to help me with some of the trickier bits. The problem I've run into is that, after the umount and reboot step, the Gentoo drive doesn't show up when I reboot the computer for drive select. To attempt to remedy this, I installed rEFInd, but it didn't automatically detect Gentoo or anything. I tweaked the config file to add a new operating system entry, but when I boot it, I get the following readout:

Code:
Starting kernel-genkernel-x86_64-3-12.21-gentoo-r1
Using load options 'ro root=UUID=bb31e711-2da7-4fce-9ff4-7a0aabaf12c5   '
Invalid loader file!
Error: Not Found while loading kernel-genkernel-x86_64-3.12.21-gentoo-r1


Here are some things that might be relevant. If anyone needs any more information, I'd be happy to provide it. I'm new to Mac though, and I've only used Ubuntu/Kubuntu in the past, so I apologize for my inexperience.

blkid readout:
Code:
/dev/loop0: TYPE="squashfs"
/dev/sda1: LABEL="EFI" UUID="2860-11F4" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="00000c45-2a8c-0000-9101-000029100000"
/dev/sda2: UUID="657e5b36-16e0-3567-8295-0005545b48b9" LABEL="Macintosh HD" TYPE="hfsplus" PARTLABEL="Customer" PARTUUID="00006ddc-2afb-0000-e358-000090270000"
/dev/sda3: UUID="a0d64d5c-70c0-3887-a0c0-e5460cca6ea1" LABEL="Recovery HD" TYPE="hfsplus" PARTLABEL="Recovery HD" PARTUUID="018169d8-30ee-4008-a996-4aef4da8cc36"
/dev/sdb1: PARTLABEL="grub" PARTUUID="c48a8bc3-4654-4b0a-97a6-f5b7796403f9"
/dev/sdb2: UUID="bc001ead-bc1f-465f-8d1c-00040bdfa8c8" TYPE="ext2" PARTLABEL="boot" PARTUUID="225ede6c-9180-4658-a728-b6fc2d8fea6a"
/dev/sdb3: UUID="150a4036-2fc6-4563-82b0-2cba4ce35917" TYPE="swap" PARTLABEL="swap" PARTUUID="747b3acd-7e88-4d18-b85b-142654f1c771"
/dev/sdb4: UUID="bb31e711-2da7-4fce-9ff4-7a0aabaf12c5" TYPE="ext4" PARTLABEL="rootfs" PARTUUID="355bca8b-2e05-489f-9f70-5c3918b0948c"
/dev/sdc1: LABEL="UUI" UUID="1F06-0930" TYPE="vfat"


refind.conf entry:
Code:
menuentry gentoo {
   volume /dev/sdb2
   loader kernel-genkernel-x86_64-3.12.21-gentoo-r1
   icon \EFI\refind\icons\os_gentoo.png
   ostype Linux
   options "ro root=UUID=bb31e711-2da7-4fce-9ff4-7a0aabaf12c5   "
}


refind_linux.conf entry (generated using mkrlconf.sh via liveCD)
Code:
"Boot with standard options"        "ro root=UUID=bb31e711-2da7-4fce-9ff4-7a0aabaf12c5   "
"Boot to single-user mode"          "ro root=UUID=bb31e711-2da7-4fce-9ff4-7a0aabaf12c5   single"
"Boot with minimal options"         "ro root=UUID=bb31e711-2da7-4fce-9ff4-7a0aabaf12c5"


Last edited by jon10121 on Tue Jun 17, 2014 7:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Tue Jun 17, 2014 6:17 pm    Post subject: Reply with quote

Perhaps
Code:
loader /boot/kernel-genkernel-x86_64-3.12.21-gentoo-r1
Back to top
View user's profile Send private message
jon10121
n00b
n00b


Joined: 17 Jun 2014
Posts: 4

PostPosted: Tue Jun 17, 2014 7:10 pm    Post subject: Reply with quote

Doesn't seem to work. It gives me the same error as above.
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Tue Jun 17, 2014 7:37 pm    Post subject: Reply with quote

Where is kernel-genkernel-x86_64-3.12.21-gentoo-r1?
From what you have above it appears that it is on /dev/sdb2. Where is it relative to the base of that?
Back to top
View user's profile Send private message
jon10121
n00b
n00b


Joined: 17 Jun 2014
Posts: 4

PostPosted: Tue Jun 17, 2014 7:46 pm    Post subject: Reply with quote

It is in the /boot directory. I setup the directories the same way that the amd64 handbook says to, with the exception that I swapped all sda for sdb. My partion scheme is as follows:

Code:
/dev/sdb1 > bios
/dev/sdb2 > /boot(ext2)
/dev/sdb3 > swap
/dev/sdb4 > rootfs(ext4)


I apologize for not giving a proper terminal dump, but the flash drive I use as the liveUSB is currently in use gathering spectrophotometer data.
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Tue Jun 17, 2014 8:32 pm    Post subject: Reply with quote

It is clearly having trouble finding the kernel. Try setting volume to the PARTUUID for /dev/sdb2.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Jun 17, 2014 8:43 pm    Post subject: Re: Installing Gentoo on Late 2012 Mac Mini (Second HDD) Reply with quote

jon10121 wrote:
Code:
Invalid loader file!

jon10121 ... the kernel in question is not a valid EFI executable ... you need to enable the following in the kernel

Code:
CONFIG_EFI=y
CONFIG_RELOCATABLE=y
CONFIG_EFI_PARTITION=y
CONFIG_EFI_VARS=m
CONFIG_EFI_STUB=y

You would then copy your kernel as "kernel-genkernel-x86_64-3.12.21-gentoo-r1.efi", rEFInd will then autodetect it ... and any other kernel installed similarly in future (so no need to define it as you have in refind.conf). If you want to pass kernel parameters then the 'refind_linux.conf' is all thats needed (so again, no need to define this stuff in refind.conf) ... refind.conf can/should just be the bare minimum ... all I have is the following:

Code:
# egrep -v '(^#|^$)' /boot/efi/refind/refind.conf
timeout 5
hideui banner
use_graphics_for linux
showtools shell, reboot, exit
dont_scan_dirs efi/grub2

Ask if you have further issues or questions ...

best ... khay
Back to top
View user's profile Send private message
jon10121
n00b
n00b


Joined: 17 Jun 2014
Posts: 4

PostPosted: Wed Jun 18, 2014 2:03 am    Post subject: Reply with quote

We finally got it working. What we did is as follows:

1. Went into the kernel config file and applied the EFI changes as listed above (The only one that needed to be altered was the EFI_STUB one)
2. Recompiled the kernel
3. We tried to open up the initramfs file like a zip, and it was saying that it was corrupted, so we decided to rebuild that using the instructions in the Gentoo Handbook
4. The rEFInd still didn't automatically pick-up the install, so we changed the refind.conf file to have this entry:
Code:
menuentry Gentoo{
    icon /EFI/refind/icons/os_gentoo.png
    loader /EFI/refind/gentoo/kernel-genkernel-x86_64.3.12.21-gentoo-r1.efi
    initrd /EFI/refind/gentoo/initramfs-genkernel-x86_64-3.12-21-gentoo-r1
    options "ro real_root=UUID=bb21e711-2da7-4fce-9ff4-7a0aabaf12c5 root=UUID=bb21e711-2da7-4fce-9ff4-7a0aabaf12c5 rootfstype=ext4"
}


Boots up fine now, it appears to be. Now, off to build the environment. I greatly appreciate the help!
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Wed Jun 18, 2014 12:29 pm    Post subject: Reply with quote

jon10121 wrote:
4. The rEFInd still didn't automatically pick-up the install, so we changed the refind.conf file to have this entry:
Code:
menuentry Gentoo{
    icon /EFI/refind/icons/os_gentoo.png
    loader /EFI/refind/gentoo/kernel-genkernel-x86_64.3.12.21-gentoo-r1.efi
    initrd /EFI/refind/gentoo/initramfs-genkernel-x86_64-3.12-21-gentoo-r1
    options "ro real_root=UUID=bb21e711-2da7-4fce-9ff4-7a0aabaf12c5 root=UUID=bb21e711-2da7-4fce-9ff4-7a0aabaf12c5 rootfstype=ext4"
}

jon10121 ... you can use the ESP (EFI System Partition) for storing the kernel and initramfs but as you have /boot as a seperate partition it would make sense to use it. As for the path used to store the kernel above, these are not searched by rEFInd as it only expects that rEFInd itself is stored within /EFI/refind, so your schema really should look like the following:

/EFI/refind/{drivers_x64/,icons/,refind.conf,refind_x64.efi}
/EFI/gentoo/{kernel-genkernel-x86_64.3.12.21-gentoo-r1.efi,initramfs-genkernel-x86_64-3.12-21-gentoo-r1}

... but, again, as you have boot move the kernel and initramfs there as the default is to scan the "boot" directory in addition to various hard-coded directories (see, refind.conf-sample).

rEFInd will also try to detect if there is an initramfs based on the name and its matching the kernel so you likely don't need to define this in refind.conf.

best ... khay
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