8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Macbook Pro Retina 15インチ(Early 2013)にUbuntu 12.04を入れる

Posted at

概要

MacでUbuntuを動かすと

  • NVidiaのグラボが使える
  • Retina解像度のディスプレイ
  • そこそこ持つバッテリ
  • 1台でMacも開発できる
  • Windowsとのトリプルブートもできる

というメリットがありそうです。

さっそくインストールしてみよう。

インストール

環境

  • MacBook Pro (Retina, 15-inch, Early 2013)
  • 2.8 GHz Intel Core i7
  • 16 GB 1600 MHz DDR3
  • Intel HD Graphics 4000 1024 MB / NVidia 650M
  • 751GB Flash Storage
  • Mac OS X Yosemite 10.10.1 (14B25)

ブートマネージャ

# on OSX
$ wget http://sourceforge.net/projects/refind/files/0.8.4/refind-bin-0.8.4.zip/download -O refind.zip
$ unzip refind.zip
$ cd refind-bin-0.8.4
$ ./install.sh

これでEFIパーティションにあるOSX以外のOSも起動できるようになります。

Ubuntu Bootable USB Stickを作る

# on OSX
$ wget http://ftp.jaist.ac.jp/pub/Linux/ubuntu-releases/precise/ubuntu-12.04.5-desktop-amd64.iso -O /tmp/ubuntu.iso
$ hdiutil convert -format UDRW -o /tmp/ubuntu.img /tmp/ubuntu.iso
$ diskutil unmountDisk /dev/<diskN> # diskutil listでUSBフラッシュの番号を確認しておく
$ sudo dd if=/tmp/ubuntu.img of=/dev/r<diskN> bs=1m

これでUbuntuの入ったUSBブート可能なフラッシュメモリの完成です。

Ubuntu OSパーティションの作成

  • Disk Utilityを開いてUbuntuのパーティションを作る。
  • フォーマットはfree spaceのままでOK
  • SSDなのでswap用の領域は不要

Ubuntuのインストール

  1. さきほど作ったUSBステイックを刺したまま再起動

  2. Install Ubuntuを選ぶ

  3. 指示通りにダイアログを進める

  4. 最後に再起動を促されるので、再起動する

  5. 再起動後はrEFIndの画面でMacとUbuntuが見えるはず。

Wifiを有効にする

1A. 別PCから必要なdebパッケージを持ってくる (dkms, libc6-dev, linux-libc-dev, bcmwl-kernel-source )
1B. USBの有線LANアダプタを付けてインターネットにつなぐ

でなんとかしてWifiのドライバインストールに必要なモジュールをインストールできるようにします。

# on Ubuntu
$ sudo dpkg -i <dependencies> # 手順1Aの人のみ
$ sudo apt-get update && sudo apt-get install bcmwl-kernel-source # 手順1Bの人のみ

NVidiaのグラボを有効にする

  1. ドライバのインストール
# on Ubuntu
$ sudo apt-get install linux-headers-`uname -r`
$ sudo apt-get install nvidia-current
$ sudo nvidia-xconfig 
  1. 設定ファイルの編集
  • xorg.conf
# on Ubuntu
$ sudo nano /etc/X11/xorg.conf

で設定ファイルを開き、

/etc/X11/xorg.conf
# Deviceセクションの中に以下を追加
Option "UseDPLib" "off"
  • grub
# on Ubuntu
$ sudo nano /etc/default/grub

で設定ファイルを開き

/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash“

となっているところを

/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT=“quiet i915.lvds_channel_mode=2 i915.modeset=0 i915.lvds_use_ssc=0 splash“

にする。

さらに

# on Ubuntu
$ sudo update-grub

をする。

  • rc.local
# on Ubuntu
$ sudo nano /etc/init.d/rc.local
/etc/init.d/rc.local
# 最後に追加
setpci -v -H1 -s 00:01.00 BRIDGE_CONTROL=0

Optional F1-12キーをファンクションキーにする

標準だと輝度や音量変更などの特殊キーに割り当てられていて、ファンクションキーはfnキーと同時に入力しないといけない。
これは面倒なので特殊キーとファンクションキーを入れ替える。

# on Ubuntu
$ echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf
$ sudo update-initramfs -u -k all
$ sudo reboot
8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?