Created
August 27, 2014 16:41
-
-
Save jitomesky/4465dec3d84fd32c3126 to your computer and use it in GitHub Desktop.
NOOBS用のOSイメージを自動で作ってくれるスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mount /dev/sdb6 /mnt | |
mount /dev/sdb5 /mnt/boot | |
cd /mnt | |
rm -rf ~/raspi_img | |
mkdir ~/raspi_img | |
tar cpf ~/raspi_img/root.tar ./* --exclude=proc/* --exclude=sys/* --exclude=dev/pts/* --exclude=boot/* | |
cd boot | |
tar cpf ~/raspi_img/boot.tar ./* | |
cd ~/raspi_img | |
du -am > filesize.txt | |
xz -9 -e ~/raspi_img/root.tar | |
xz -9 -e ~/raspi_img/boot.tar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment