User Tools

Site Tools


linux:gentoo-upgrade-mbp

Gentoo on MacBook Pro(MD318, 15inch, late 2011)

Cheers, finally I made it, the Gentoo back to work on my MacBook Pro.

I have spent several days to make the Gentoo back, because previous it works, but after one update whatever, it can't start the X.

The biggest problems I met is

  1. Hard Disk IO bug, the M4 SSD need upgrade the firmware
  2. The init system has changed from OpenRC to Systemd.
  3. Can't start X(startx, Xorg -configure, X -configure, aticonfig –initial) doesn't work

So you can image how difficult it is to fix all the problems, because

  1. The MacBook Pro doesn't support the usb bootable device
  2. I don't have DVD ROM, because I have replaced it with one Hard Disk.
  3. Sometimes the keyboard doesn't work for X and kernel problems.
  4. I don't aware the difference between OpenRC and Systemd

Upgrade the M4 SSD firmware without DVD ROM

  1. Download the firmware from the official website
  2. Get the BOOT2880.IMG from the iso file
  3. Download the riEFI file
  4. Mount the EFI and get the SYSLINUX
  5. cp -a SYSLINUX /boot/
  6. cp BOOT2880.IMG /boot/SYSLINUX
  7. Boot to the grub and press “c” to do the manual boot

root (hd0,3)
kernel /boot/SYSLINUX/ubnkern
initrd /boot/SYSLINUX/BOOT2880.IMG
boot 

Kernel Config 3.17.7

jianqing linux # uname -a
Linux jianqing 3.17.7-gentoo #6 SMP Sat Jan 31 01:16:40 CST 2015 x86_64 Intel(R) Core(TM) i7-2675QM CPU @ 2.20GHz GenuineIntel GNU/Linux

Manual Config the network

ifconfig enp2s0f0 10.0.0.30 netmask 255.255.255.0
route add default gw 10.0.0.1
echo "nameserver 8.8.8.8" >>/etc/resolv.conf
echo "nameserver 223.5.5.5" >>/etc/resolv.conf

Fix Gentoo System

ati-drivers
qlist -I ati-drivers
xorg-server
gnome
systemd
xdm
gdm slim
startx
slim
X
Xorg
Xorg -config /path/to/xorg.conf
Xorg -configure
aticonfig --initial
eselect open list
eselect open set 1
systemctl enable/disable xdm/gdm/slim
ls /etc/X11/
emerge -uDN world -pv
emerge --depclean -pv
emerge -uDN world --keep-going
emerge -uDN world --keep-going --skipfirst
emerge -uDN world --keep-going --resume

jianqing ~ # cat /etc/env.d/90xsession 
XSESSION="Gnome"

Compile kernel

cd /usr/src/linux
make menuconfig
make -j5
make modules_install
cp arch/x86_64/boot/bzImage /boot/kernel-3.17.7

grub menu.lst

jianqing linux # cat /boot/grub/menu.lst 

# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.
 
default 0
timeout 30
splashimage=(hd0,3)/boot/grub/splash.xpm.gz
 
 
title Gentoo Linux root (hd0,3) root=/dev/sda4 /boot/kernel-3.17.7-1 init=/usr/lib/systemd/systemd nomodeset
root (hd0,3)
kernel /boot/kernel-3.17.7-1 root=/dev/sda4 init=/usr/lib/systemd/systemd nomodeset
 
title Gentoo Linux root (hd0,3) root=/dev/sda4 /boot/kernel-3.10.25 init=/usr/lib/systemd/systemd nomodeset
root (hd0,3)
kernel /boot/kernel-3.10.25 root=/dev/sda4 init=/usr/lib/systemd/systemd nomodeset
 
title Gentoo Linux root (hd0,3) root=/dev/sda4 /boot/kernel-3.17.7 init=/usr/lib/systemd/systemd nomodeset
root (hd0,3)
kernel /boot/kernel-3.17.7 root=/dev/sda4 init=/usr/lib/systemd/systemd nomodeset
 
title Gentoo Linux root (hd0,3) root=/dev/sda4 /boot/kernel-3.10.25 nomodeset
root (hd0,3)
kernel /boot/kernel-3.10.25 root=/dev/sda4 nomodeset
 
title Gentoo Linux root (hd0,3) root=/dev/sda4 /boot/kernel-3.6.11
root (hd0,3)
kernel /boot/kernel-3.6.11 root=/dev/sda4
 
title Gentoo Linux root (hd0,3) root=/dev/sda4 /boot/kernel-3.6.11-2
root (hd0,3)
kernel /boot/kernel-3.6.11-2 root=/dev/sda4 radeon.modeset=0
 
title Gentoo Linux root (hd0,4) root=/dev/sda5 /boot/kernel-3.6.11
root (hd0,4)
kernel /boot/kernel-3.6.11 root=/dev/sda5
 
title Gentoo Linux root (hd0,3) root=/dev/sda4 /boot/kernel-3.3.8 
root (hd0,3)
kernel /boot/kernel-3.3.8 root=/dev/sda4
 
title Gentoo Linux root (hd0,4) root=/dev/sda5 /boot/kernel-3.3.8 
root (hd0,4)
kernel /boot/kernel-3.3.8 root=/dev/sda5
 
title Gentoo Linux root (hd0,4) root=/dev/sda5 /boot/kernel_3.2.12 
root (hd0,4)
#kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 real_root=/dev/sda3
kernel /boot/kernel_3.2.12 root=/dev/sda5
#initrd /boot/genkernel
 
# vim:ft=conf:

Need set the CONFIG_B43=m not CONFIG_B43=y

CONFIG_B43=m

systemctl enable dhcpcd
systemctl enable NetworkManager

/var/www/dokuwiki/wiki/data/pages/linux/gentoo-upgrade-mbp.txt · Last modified: 2016/05/05 13:07 by 127.0.0.1