发现 raspbian 系统可在不同树莓派之间通用,挺好。
不用重复“ 系统安装 -> 软件安装 -> 配置软件 "的老装机模式。 有旧和新树莓派二个,用如下过程,可以快速复制克隆,给新树莓派克隆系统,从此硬件升级一步到位,批量升级 linux 系统时收益更大。
原文出自 Pythonwood 的https://blog.pythonwood.com
1
songz 2018-05-09 14:35:29 +08:00
之前遇到类似问题,dd 一个系统,sd 卡大小 64gb,但是系统只用了 4gb 左右,dd 出来却有 60gb 左右,想知道怎么直接 dd 一个 4gb 左右大小的 img 文件
|
2
ys0290 2018-05-09 15:01:35 +08:00 via iPhone
usbit 这个软件怎么样,整体克隆
|
3
ryd994 2018-05-09 15:13:52 +08:00 via Android
其实 2 是可行的,你姿势不对
用 lsblk 查看 UUID,然后修改 fstab 和 grub 里的 UUID |
4
zgzh 2018-05-09 15:31:58 +08:00
傻瓜式。系统附件里面使用
SD Card Copier v1.0 This is an application to copy and back up SD cards. To use it, you will need a USB SD card writer. To back up your Raspberry Pi's internal SD card, insert a blank SD card into a USB card writer and connect it to your Pi. Then start the application, choose your card writer from the “ Copy To Device ” drop-down box and press “ Start ”. The copy process will take 10-15 minutes depending on the size of your card. The resulting card should be a bootable copy of your existing card; to restore, simply place the backup card into the onboard SD card slot, put the card to restore onto into the USB writer and repeat the copy process above. You can also back up to a standard USB stick, and then restore from the USB stick to an SD card by setting the “ Copy From Device ” drop-down to the USB stick and the “ Copy To Device ” to a USB card writer containing the card to restore onto. Note that you cannot copy onto the SD card from which your Pi is currently booted, which is why it does not appear in the “ Copy To Device ” dropdown. Note also that the destination card doesn ’ t need to be the same size as the source card, but it must have enough space to hold all the data that is on it. The application will warn you if there is insufficient space on the destination. Under Raspbian Stretch and later versions, you cannot mount two partitions with the same UUID, so you will not be able to mount a cloned SD card when booted from the disk from which it was cloned. If you need to do this, check the "New Partition UUIDs" box before copying. |
5
autoxbc 2018-05-09 15:36:00 +08:00
其实 Linux 都是这样的,我一个 08 年安装的 Kubuntu 迁移了 5 次也没问题
|
6
EzBlue 2018-05-09 15:38:18 +08:00
win32 disk image 不考虑下?
|
7
Osk 2018-05-09 16:24:49 +08:00 via Android
/dev/disk/by-partuuid 是内核自动生成和管理的吧,可以看下整个 /dev 都是挂载的一个 devtmpfs,而且对于 archlinux arm 等来说系统直接就是一个 tar,所以 tar 无法备份还原可能打开方式不对。
主要是 dd 的效率太低了,尤其是空间使用率不高时。 奇怪建议:你可以在新 sd 卡分区格式化时指定 uuid,这样理论上是不用修改原系统的 fstab 等。对应选项: mkfs.ext4 -U xxxx-xxxx-.... mkfs.vaft -i xxxxxxxx |
8
pythonwood OP 我也有这个需求,要能做个 gui 的工具傻瓜式操作就好了。
|
9
pythonwood OP @autoxbc 08 年就用 kubuntu 了,是 8.04 吗? 我最开始用的 10.04 ,也要好好保存。
|
10
autoxbc 2018-05-09 23:13:48 +08:00
@pythonwood #9
是 8.04 ,维护好可以持续升级,比重装方便 |
11
doublew 2018-05-28 13:45:33 +08:00
几年前,改写过一个脚本,能满足你的需求,你可以参考看看 htxps://github.com/imccie/rpi_backup_script
|
12
dosgo 2020-10-19 12:18:22 +08:00
|