Raspbian†
Raspberry Pi用としてメンテナンスされているDebian系ディストリビューションの一つ。
Debian系なのでAPT(apt-get)を利用してパッケージをインストールする事が出来る。
初期設定を簡素化する為にRaspbian特有のシェルスクリプトが準備されており、
Linux初心者でも楽に最低限のOS設定をする事が出来るようになっている。
イメージバックアップ†
Raspberry PiではSDカードにOSをインストールする事を前提としている為、
ddコマンドによるイメージバックアップ・リストアが簡単に実行できるが、
小さい容量のSDカードへリストアすると、SDカード容量不足でddが欠落してしまう。
よって、Raspberry Pi(Raspbian)では専用のOSコピー(バックアップ)コマンドが用意されており、
こちらを利用する方が正確にコピーを取得する事が出来る。
+
| | rpi-clone
|
- 参考サイト
billw2/rpi-clone
Raspberry PiでIoTなシステム開発
- コマンド実行
バックアップ取得前に、コピー先SDカードをRaspberry Piに接続しておく。
今回はSDカードが、"/dev/sda"に接続されているとする。
# git clone https://github.com/billw2/rpi-clone
# ./rpi-clone sda -f
---
Do you want to initialize the destination disk /dev/sda? (yes/no): "yes"
You may enter a label for the destination rootfs /dev/sda2: [Enter]
Final check, is it Ok to proceed with the clone (yes/no)?: "yes"
Starting the filesystem rsync to sda
(This may take several minutes)...
---
Hit Enter when ready to unmount the /dev/sda partitions... [Enter]
unmounting /mnt/clone/boot
unmounting /mnt/clone
|