delete from hateblo.jp where 1=1;

タイトルに意味はありません。

初期設定

環境

  • Raspberry Pi Type Bを持っている
  • SD cardは用意した
  • テレビはあるが離れている

準備

http://www.pc-links.com/blog/raspberrypi/setup/ を参考にしつつ、SDカードを準備する

  1. ツール関係をダウンロードする
    1. Raspberry Pi Downloads - Software for the Raspberry Pi から Raspbian
    2. Runtime error - Tech Info から DDforWindows
  2. ツール関係を解凍しておく
  3. SD card をマウントする
  4. DDforWindows を管理者モードで起動する(ヒント:右クリック)
  5. ファイルを指定して、書き換え

テレビで動作確認などを行う

HDMIからしか映像が出力されなさげ...

  1. HDMI接続する(テレビの入力は切り替えておく)
  2. SDカードを差し込む
  3. 電源を入れる
  4. linuxの起動画面が現れる
  5. 初期設定メニューが表示されることを確認する
    1. 初期パスワードとかを設定する
    2. SSHを有効にする
    3. finish (finishを選択すると自動的にお目にかかることはないので注意)
  6. 起動してログインできることまで確認し、シャットダウンする

さて...テレビを長く使うわけにはいかない

  1. ノートPCで、wifi接続しているので、とりあえず、ネットワークの共有を行う
  2. Raspberry Piを接続して、起動
  3. Windows側からコマンドプロンプトを開いて、「arp -a」と入力し、Raspberry Piらしきアドレスを確認する
C:\Users\usera>arp -a

インターフェイス: 192.168.137.1 --- 0xb
  インターネット アドレス      物理アドレス      種類
  192.168.137.219       29-29-be-ef-29-29     動的
  192.168.137.255       ff-ff-ff-ff-ff-ff     静的

関係するツールをインストール

その前にOSの更新
pi@raspberrypi ~ $ sudo uname -a                                                                                                   
Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l GNU/Linux
pi@raspberrypi ~ $ sudo aptitude update
pi@raspberrypi ~ $ sudo aptitude upgrade
vi
$ sudo aptitude install vim
The following NEW packages will be installed:
  libgpm2{a} vim vim-runtime{a} 
0 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,315 kB of archives. After unpacking 24.6 MB will be used.
Do you want to continue? [Y/n/?] 
Get: 1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgpm2 armhf 1.20.4-6 [34.9 kB]
Get: 2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main vim-runtime all 2:7.3.547-7 [4,607 kB]
Get: 3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main vim armhf 2:7.3.547-7 [674 kB]
Fetched 5,315 kB in 4s (1,104 kB/s)
Selecting previously unselected package libgpm2:armhf.
(Reading database ... 68878 files and directories currently installed.)
Unpacking libgpm2:armhf (from .../libgpm2_1.20.4-6_armhf.deb) ...
Selecting previously unselected package vim-runtime.
Unpacking vim-runtime (from .../vim-runtime_2%3a7.3.547-7_all.deb) ...
Adding 'diversion of /usr/share/vim/vim73/doc/help.txt to /usr/share/vim/vim73/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim73/doc/tags to /usr/share/vim/vim73/doc/tags.vim-tiny by vim-runtime'
Selecting previously unselected package vim.
Unpacking vim (from .../vim_2%3a7.3.547-7_armhf.deb) ...
Processing triggers for man-db ...
Setting up libgpm2:armhf (1.20.4-6) ...
Setting up vim-runtime (2:7.3.547-7) ...
Processing /usr/share/vim/addons/doc
Setting up vim (2:7.3.547-7) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
lm-sensors (センサーなしなので、意味なし)

センサーの情報が気になるので、参照できないか試してみる → 無理

Raspberry Pi 3.2.23 kernel | Chris's Digital Realm を参考に、設定を行う。

pi@raspberrypi ~ $ sudo sensors-detect
/sys/bus/pci/devices: No such file or directory at /usr/sbin/sensors-detect line 3003.

Attachment #573101 for bug #806364 のとおりに直す

pi@raspberrypi ~ $ sudo vi /usr/sbin/sensors-detect
pi@raspberrypi ~ $ sudo sensors-detect                                                                               
# sensors-detect revision 6031 (2012-03-07 17:14:01 +0100)
# DMI data unavailable, please consider installing dmidecode 2.7
# or later for better results.

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): 
FATAL: Module cpuid not found.
Failed to load module cpuid.
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 15h power sensors...                             No
Intel digital thermal sensor...                             No
Intel AMB FB-DIMM thermal sensor...                         No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): 
Sorry, no supported PCI bus adapters found.
Module i2c-dev loaded successfully.

Sorry, no sensors were detected.
Either your system has no sensors, or they are not supported, or
they are connected to an I2C or SMBus adapter that is not
supported. If you find out what chips are on your board, check
http://www.lm-sensors.org/wiki/Devices for driver status.
pi@raspberrypi ~ $ sudo sensors                                                                                                    
No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.

センサーが見つかりません。残念。