[administrative][archlinux][clonezilla][disk cloning] 一块 windows 10 硬盘的备份
https://wiki.archlinux.org/index.php/disk_cloning
https://wiki.archlinux.org/index.php/full_system_backup_with_rsync
https://en.wikipedia.org/wiki/Comparison_of_disk_cloning_software
一个软件:
https://en.wikipedia.org/wiki/Acronis_True_Image
说白了,从技术上来讲,备份一块硬盘就两个途径。1 section to section 2. block to block
一,就是扇区到扇区备份:
这种方式,就是dd就好了,1T的备份出来就是1T,当然稍微聪明一点的方式就是gzip压缩一下,也许1T可以变成800G? 我不知道。
二,就是块到块备份:
这是一个比较聪明的方法,因为程序可以知道,哪个块是空的,哪个块是用了的。所以,实际上,只需要把用了的块备份出来就可以了。
也就是说,一块1T的硬盘,我只写了1G的数据,理论上也就备份1点多个G的数据出来就够了。
但这个前提是软件要认识文件系统。以及各种分区表,巴拉吧啦之类的。
这样的软件有:
ghost https://www.symantec.com/products/endpoint-hybrid-cloud-security/endpoint-management/ghost-solutions-suite
True Image http://www.acronis.com/zh-cn/personal/computer-backup/
他们都很好,他们都是收!费!达!
最后一个,我呕心沥血终于找到的,免费又好用,还是GPL:
http://clonezilla.org/
三, 安装clonezilla U盘启动
1. 下载zip格式的软件。
http://clonezilla.org/downloads/download.php?branch=stable
2. 根据文档 method B 安装
http://clonezilla.org/liveusb.php
a. 分区
(parted) mkpart primary 1MiB 1GiB (parted) mkpart primary 1GiB 100%
b. 创建文件系统
/home/tong/ISO [tong@T7] [20:07] > sudo mkfs.vfat -F 32 /dev/sdc1 # 这个地方是错的,见下文。正确应该用fat而不是vfat mkfs.fat 4.1 (2017-01-24) /home/tong/ISO [tong@T7] [20:07] > sudo mkfs.ntfs /dev/sdc2
c. 安装(先挂载起来)
/home/tong/ISO [tong@T7] [20:26] > unzip clonezilla-live-2.5.0-25-amd64.zip -d /run/media/tong/CentOS\ 7\ x86_64
/run/media/tong/CentOS 7 x86_64/utils/linux [tong@T7] [20:31] > sudo pacman -S syslinux
报错
/run/media/tong/CentOS 7 x86_64/utils/linux [tong@T7] [20:31] > sudo ./makeboot.sh /dev/sdc1 This command will install MBR and syslinux/extlinux bootloader on /dev/sdc Clonezilla files are assumed to be on /dev/sdc1 -------------------------------------------- Machine: 20BVA01HCD: Model: Kingston DT 101 G2 (scsi) Disk /dev/sdc: 15.6GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 1049kB 1074MB 1073MB primary fat32 boot 2 1074MB 15.6GB 14.5GB primary ntfs -------------------------------------------- Are you sure you want to continue? [y/n] y OK! Let's do it! -------------------------------------------- File system of /dev/sdc1: vfat -------------------------------------------- Do you want to install MBR on /dev/sdc on this machine "20BVA01HCD" ? [y/n] y OK! Let's do it! Running: cat "/run/media/tong/CentOS 7 x86_64/utils/mbr/mbr.bin" > /dev/sdc -------------------------------------------- Do you want to install the syslinux boot files on /dev/sdc1 on this machine "20BVA01HCD" ? [y/n] y OK! Let's do it! A filesystem supporting Unix file mode for syslinux is required. Copying syslinux to /tmp/linux_tmp.DmTXsa '/run/media/tong/CentOS 7 x86_64/utils/linux/syslinux' -> '/tmp/linux_tmp.DmTXsa/syslinux' Running: "/tmp/linux_tmp.DmTXsa/syslinux" -d syslinux -f -i "/dev/sdc1" syslinux.mnt.6420.0/syslinux/ldlinux.sys: No such file or directory Failed to run syslinux in installation mode! Program terminated!
没有 mcopy
/run/media/tong/CentOS 7 x86_64/utils/linux [tong@T7] [20:34] > sudo syslinux -d syslinux -f -i "/dev/sdc1" sh: mcopy: command not found syslinux: failed to create ldlinux.sys
https://bugs.archlinux.org/task/21605
/home/tong [tong@T7] [20:50] > sudo pacman -S mtools
四:
MD,大半夜的脑子进水选错了分区。。。成功。
/mnt/utils/linux [tong@T7] [21:00] > sudo ./makeboot.sh /dev/sdc1 This command will install MBR and syslinux/extlinux bootloader on /dev/sdc Clonezilla files are assumed to be on /dev/sdc1 -------------------------------------------- Machine: 20BVA01HCD: Model: Kingston DT 101 G2 (scsi) Disk /dev/sdc: 15.6GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 1049kB 1074MB 1073MB primary fat32 boot 2 1074MB 15.6GB 14.5GB primary ntfs -------------------------------------------- Are you sure you want to continue? [y/n] y OK! Let's do it! -------------------------------------------- File system of /dev/sdc1: vfat -------------------------------------------- Do you want to install MBR on /dev/sdc on this machine "20BVA01HCD" ? [y/n] y OK! Let's do it! Running: cat "/mnt/utils/mbr/mbr.bin" > /dev/sdc -------------------------------------------- Do you want to install the syslinux boot files on /dev/sdc1 on this machine "20BVA01HCD" ? [y/n] y OK! Let's do it! A filesystem supporting Unix file mode for syslinux is required. Copying syslinux to /tmp/linux_tmp.nRSUwF '/mnt/utils/linux/syslinux' -> '/tmp/linux_tmp.nRSUwF/syslinux' Running: "/tmp/linux_tmp.nRSUwF/syslinux" -d syslinux -f -i "/dev/sdc1" //NOTE// If your USB flash drive fails to boot (maybe buggy BIOS), try to use "syslinux -d syslinux -fs /dev/sdc1", i.e. running with "-fs". syslinux ran successfully in installation mode. Done! /mnt/utils/linux [tong@T7] [21:00] >
卸掉 syslinux 和mtools 再试。
依然成功!
update @2017-06-06
并不能启动。经过验证排查怀疑问题如下:
1. sudo mkfs.vfat -F 32 /dev/sdc1 用了vfat而不是fat,不能启动。
2. 还用了ntfs分区,同样也不能启动。
3. 正确的用法是严格按照文档中的命令,sudo mkfs.fat -F 32 /dev/sdc1
至此,U盘可以正确启动了。全是图像界面,按照提示,很易用。不做赘述。
update @2017-06-10
镜像的时候可以选择工具,选了partclone,结果报错。
最后选了ntfsclone,保存成功。我是说应该成功了。。。。因为它打印成功了,但是在最后进行完整性检查的时候,说不能检测,因为不是partclone。
一共生成一个文件夹,12G。