可以使用以下命令运行 ubuntu 来制作完整的磁盘映像:
dd if=/dev/sda of=/image_name
Run Code Online (Sandbox Code Playgroud)
制作完成后,如何在崩溃的系统上恢复该映像?
hat*_*man 17
Boot from the live cd. Mount your destination media to (say) /mnt.
dd if=/dev/sdXXX of=/mnt/mybackup.ddimg
Run Code Online (Sandbox Code Playgroud)
To restore:
dd if=/mnt/mybackup.ddimg of=/dev/sdXXX
Run Code Online (Sandbox Code Playgroud)
The destination drive should be the same size or bigger than the original.
A better way is using tar.
Mount the source to /mnt, mount the destination to /home (say)
tar cvfpz /home/mybackup.tar.gz /mnt
Run Code Online (Sandbox Code Playgroud)
This can then be restored to any size drive:
tar xvfpz /home/mybackup.tar.gz
Run Code Online (Sandbox Code Playgroud)
(After mounting source to /home and destination to /mnt.)
Then just install grub.
除了hatterman 的好答案之外,您还可以gzip像这样压缩图像:
dd if=/dev/sdx | gzip > /mnt/mybackup.ddimg.gz
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
61756 次 |
| 最近记录: |