Raspberry Piのファームウェア更新とか、CentOS7のアップデートをしてみる。
■本日の目標
・Raspberry Pi 3をアップデートする■主な作業環境
・HW:Raspberry Pi 3 Model B・OS:CentOS Linux release 7.3.1611 (Core)
■外部アクセス(インターネット接続)の確認
・GoogleにPingを投げる。$ ping -c 2 www.google.co.jp PING www.google.co.jp (216.58.220.227) 56(84) bytes of data. 64 bytes from nrt13s37-in-f3.1e100.net (216.58.220.227): icmp_seq=1 ttl=54 time=5.26 ms 64 bytes from nrt13s37-in-f3.1e100.net (216.58.220.227): icmp_seq=2 ttl=54 time=5.31 ms --- www.google.co.jp ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 5.265/5.290/5.315/0.025 ms
問題なく通ってる。
■ファームウェアを更新
「rpi-update」を使ってアップデートする$ rpi-update -bash: rpi-update: コマンドが見つかりません
残念ながら入っていないようなので、Hexxeh/rpi-updateからインストールする。
$ curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update && chmod +x /usr/bin/rpi-update % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 12762 100 12762 0 0 8360 0 0:00:01 0:00:01 --:--:-- 8368
それではアップデート開始
$ rpi-update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom *** Performing self-update *** Relaunching after update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom *** We're running for the first time *** Backing up files (this will take a few minutes) *** Backing up firmware *** Backing up modules 4.4.33-v7.1.el7 ############################################################# This update bumps to rpi-4.9.y linux tree Be aware there could be compatibility issues with some drivers Discussion here: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=167934 ############################################################## *** Downloading specific firmware revision (this will take a few minutes) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 168 0 168 0 0 109 0 --:--:-- 0:00:01 --:--:-- 109 100 53.8M 100 53.8M 0 0 668k 0 0:01:22 0:01:22 --:--:-- 337k *** Updating firmware *** Updating kernel modules *** depmod 4.9.25-v7+ *** depmod 4.9.25+ *** Updating VideoCore libraries *** Using HardFP libraries *** Updating SDK *** Running ldconfig *** Storing current firmware revision *** Deleting downloaded files *** Syncing changes to disk *** If no errors appeared, your firmware was successfully updated to a86bfee5b47a74c13056997f1e4d8b9d8090b398 *** A reboot is needed to activate the new firmware
アップデート成功!
再起動してSSH接続できればひとまず安心。
$ reboot
■OSもアップデート
・ついでにOSもアップデートする。$ yum update ・・・ (長いので省略・・・3回くらいYes/Noクエスチョンあり) ・・・ 完了しました!
うつらうつらしてたら終わってた。
TeraTermの自動ログから20分掛かってた模様。
たびたびだけど、再起動して問題ないか確認。
$ reboot
・・・いつもは1分もすれば戻ってきたけど、
アップデート後の初回起動のためか、5分くらい復旧しなくて軽く焦った。
Raspberry Piのインジゲータも普段通りでどうなってるのかわからなかった。
こういうときモニタで表示させてると経過がわかっていいんだろうな。
最後に・・・
必ずしもアップデートをすれば幸せになれるわけではない(むしろ不利益の方が多い可能性もある)けど、これも一つ勉強ということで。