Skip to content

搞英语 → 看世界

翻译英文优质信息和名人推特

Menu
  • 首页
  • 作者列表
  • 独立博客
  • 专业媒体
  • 名人推特
  • 邮件列表
  • 关于本站
Menu

复制树莓派图像

Posted on 2022-08-17

大约一年前,我将节奏舞台设置转移到了Raspberry Pi上运行。我真的很喜欢有一个只做这件事的小灯箱。目前我有两个,一个用于口哨合成器,一个用于其他所有功能。

因为我想为演出失败提供一些保险,所以两个盒子的配置相同,并根据它们收到的输入决定扮演哪个角色。这意味着如果其中一个失败了,我可以使用另一个,根据我需要更多的低音啸叫或中音愚蠢。

当翠鸟在一个月前参加我们的第一个舞蹈周末时,这确实发生了。我认为其中一个盒子上的 SD 卡因关机不当而损坏。由于我有额外的 SD 卡,我决定制作一些 SD 卡克隆。

在我的 Mac 上,这看起来像:

  
$ 磁盘工具列表  
/dev/disk0(内部):  
   #: 类型名称大小标识符  
   0:GUID_partition_scheme 500.3 GB 磁盘 0  
   1:Apple_APFS_ISC 524.3 MB 磁盘0s1  
   2:Apple_APFS 容器磁盘 3 494.4 GB 磁盘 0s2  
   3:Apple_APFS_Recovery 5.4 GB disk0s3  
  
/dev/disk3(综合):  
   #: 类型名称大小标识符  
   0:APFS 容器方案 - +494.4 GB 磁盘 3  
                                 物理存储disk0s2  
   1:APFS Volume Macintosh HD 15.4 GB disk3s1  
   2:APFS 快照 com.apple.os.update-... 15.4 GB 磁盘 3s1s1  
   3:APFS 卷预启动 446.8 MB disk3s2  
   4:APFS 卷恢复 822.2 MB disk3s3  
   5:APFS 卷数据 251.1 GB disk3s5  
   6:APFS 卷 VM 1.1 GB 磁盘 3s6  
  
/dev/disk4(内部,物理):  
   #: 类型名称大小标识符  
   0:FDisk_partition_scheme *31.3 GB 磁盘 4  
   1:Windows_FAT_32 启动 268.4 MB disk4s1  
   2:Linux 31.0 GB 磁盘 4s2  

好像 SD 卡是 /dev/disk4。

  
$ diskutil unmountDisk /dev/disk4  
成功卸载 disk4 上的所有卷  

最好在读取它之前卸载它,并且在写入它之前需要它。

我做了一个图像:

  
$ time sudo dd if=/dev/disk4 of=~/Desktop/rpi.dmg  
61069312+0 条记录在  
61069312+0 条记录输出  
31267487744 字节在 807.574215 秒内传输(38717789 字节/秒)  
  
真正的 13m27.618s  
用户 0m12.921s  
系统 4m47.337s  

将 SD 卡换成另一个, diskutil unmountDisk /dev/disk4再次,然后写入映像:

  
time sudo dd if=~/Desktop/rpi.dmg of=/dev/disk4  
61069312+0 条记录在  
61069312+0 条记录输出  
31267487744 字节在 4960.289760 秒内传输(6303561 字节/秒)  
  
真正的 82m40.324s  
用户 0m16.477s  
系统 3m51.574s  

将卡弹出,放入树莓派,就可以了!

我压缩了图像以供以后保存:

  
$ cat ~/Desktop/rpi.dmg | gzip > ~/Desktop/rpi.dmg.gz  
$ du -hs ~/Desktop/rpi.dmg*  
 29G /用户/jeffkaufman/Desktop/rpi.dmg  
1.0G /用户/jeffkaufman/Desktop/rpi.dmg.gz  

期待从周六开始的一周内玩Spark in the Dark ,并享受更多技术冗余!

评论来自: 脸书

原文: https://www.jefftk.com/p/duplicating-rasberry-pi-images

本站文章系自动翻译,站长会周期检查,如果有不当内容,请点此留言,非常感谢。
  • Abhinav
  • Abigail Pain
  • Adam Fortuna
  • Alberto Gallego
  • Alex Wlchan
  • Answer.AI
  • Arne Bahlo
  • Ben Carlson
  • Ben Kuhn
  • Bert Hubert
  • Bits about Money
  • Brian Krebs
  • ByteByteGo
  • Chip Huyen
  • Chips and Cheese
  • Christopher Butler
  • Colin Percival
  • Cool Infographics
  • Dan Sinker
  • David Walsh
  • Dmitry Dolzhenko
  • Dustin Curtis
  • Elad Gil
  • Ellie Huxtable
  • Ethan Marcotte
  • Exponential View
  • FAIL Blog
  • Founder Weekly
  • Geoffrey Huntley
  • Geoffrey Litt
  • Greg Mankiw
  • Henrique Dias
  • Hypercritical
  • IEEE Spectrum
  • Investment Talk
  • Jaz
  • Jeff Geerling
  • Jonas Hietala
  • Josh Comeau
  • Lenny Rachitsky
  • Liz Danzico
  • Lou Plummer
  • Luke Wroblewski
  • Matt Baer
  • Matt Stoller
  • Matthias Endler
  • Mert Bulan
  • Mostly metrics
  • News Letter
  • NextDraft
  • Non_Interactive
  • Not Boring
  • One Useful Thing
  • Phil Eaton
  • Product Market Fit
  • Readwise
  • ReedyBear
  • Robert Heaton
  • Rohit Patel
  • Ruben Schade
  • Sage Economics
  • Sam Altman
  • Sam Rose
  • selfh.st
  • Shtetl-Optimized
  • Simon schreibt
  • Slashdot
  • Small Good Things
  • Taylor Troesh
  • Telegram Blog
  • The Macro Compass
  • The Pomp Letter
  • thesephist
  • Thinking Deep & Wide
  • Tim Kellogg
  • Understanding AI
  • 英文媒体
  • 英文推特
  • 英文独立博客
©2025 搞英语 → 看世界 | Design: Newspaperly WordPress Theme