Skip to content

Instantly share code, notes, and snippets.

@wwj718
Created June 14, 2018 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wwj718/5323267a3f4347683024d5348d8b4f82 to your computer and use it in GitHub Desktop.
Save wwj718/5323267a3f4347683024d5348d8b4f82 to your computer and use it in GitHub Desktop.
backup RaspberryPi
备份镜像
查看sd卡的路径
df -h
备份镜像到磁盘
sudo dd if=/dev/树莓派设备地址 | gzip>/home/你的用户名/文件名.gz
例子
sudo dd if=/dev/disk2 | gzip > /Users/hidaris/rpi_opencv3_41_hass.gz
烧入
格式化sd卡 # use SD Card Formatter
查看设备驱动器
diskutil list
取消sd卡挂载
diskutil unmountDisk + SD卡设备路径
例子
diskutil unmountDisk /dev/disk2
开始烧入
sudo gzip -dc /home/你的用户名/文件名.gz | sudo dd of=/dev/树莓派设备地址
例子
sudo gzip -dc /Users/hidaris/rpi_opencv3_41_hass.gz | sudo dd of=/dev/disk2
@wwj718
Copy link
Author

wwj718 commented Jun 14, 2018

image

使用了4G 为何烧出来 有15G

能否只烧 iso

@wwj718
Copy link
Author

wwj718 commented Jun 22, 2018

sudo dd if=/dev/disk2 of=rpi_opencv3_41_hass.img

使用 pishrink resize到最小尺寸

pishrink支持只linux

说明 https://www.reddit.com/r/raspberry_pi/comments/4giomh/pishrink_make_your_pi_images_as_small_as_possible/ 说明

@wwj718
Copy link
Author

wwj718 commented Jun 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment