LoginSignup
4
4

More than 5 years have passed since last update.

ラズパイ2のセットアップ(メモ)

Last updated at Posted at 2015-10-20

環境

OS : OSX Yosemite 10.10.4 

準備したもの

  • ラズベリーパイ2 B
  • MicroSDカード

MicroSDカードにOSを書き込む。

OSのDL&展開

買ったまんまの状態だと何もできないみたいなので、まずOSをDLします。
公式サイトのダウンロードページを見ると現在(2015-10-17日)は「Raspbian jessie」と「Rasbian wheezy」がありますが、とりあえず新しい方のjessieをzipを落としてくることにしました。

展開する

ターミナルから展開するため以下コマンドを実行。

$ unzip 2015-09-24-raspbian-jessie.zip

結果

Archive:  2015-09-24-raspbian-jessie.zip
warning [2015-09-24-raspbian-jessie.zip]:  76 extra bytes at beginning or within zipfile
  (attempting to process anyway)
error [2015-09-24-raspbian-jessie.zip]:  reported length of central directory is
  -76 bytes too long (Atari STZip zipfile?  J.H.Holm ZIPSPLIT 1.1
  zipfile?).  Compensating...
   skipping: 2015-09-24-raspbian-jessie.img  need PK compat. v4.5 (can do v2.1)

note:  didn't find end-of-central-dir signature at end of central dir.
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)

こんな感じの文字が出てきて、展開できませんでした。
調べてみると、tar or dittoを使うとできるらしい。
参考:

$ tar xvf 2015-09-24-raspbian-jessie.zip 

ちなみに、「wheesy」の方をunzipで試すと問題なく展開できました。

$ diskutil list
$ diskutil unmountDisk /dev/disk1
$ sudo dd bs=1m if=2015-09-24-raspbian-jessie.img of=/dev/disk1

しばらくすると完了します(僕は30分くらいかかりました。)

以上でMicroSDカードにOSを書き込む作業完了です!
あとはMicroSDカードを取り出し、ラズベリーパイ側にさして、電源を繋げば
無事起動いたします!

※このあと、無線LANの設定をしようとしたのですが、「jessie」版ではうまく設定できなかったので、「wheesy」版を再インストールして見たところ、つながったので一旦はそのまま行こうと思います。

起動してからする事

$ sudo apt-get update
$ sudo apt-get upgrade

シャットダウンの方法

$ sudo shutdown -h now
4
4
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
4
4