亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

How to make disk image with dd on Linux or Unix

發布時間:2020-08-01 21:56:10 來源:網絡 閱讀:350 作者:頂風走千里 欄目:系統運維

How to clone an entire hard disk

The syntax is:
dd if=/dev/input/DEVICE-HERE of=/dev/OUTPUT/DEVICE-HERE bs=64K conv=noerror,sync
To clone /dev/sdc (250G) to /dev/sdd (250G) in Linux, enter:
# dd if=/dev/sdc of=/dev/sdd bs=64K conv=noerror,sync
To clone /dev/ada0 (250G) to /dev/adb0 (250G) in FreeBSD, enter:
# dd if=/dev/ada0 of=/dev/adb0 bs=64K conv=noerror,sync
Where,

  1. if=/dev/file?: Input device/file.

  2. of=/dev/file?: Output device/file.

  3. bs=64k?: Sets the block size to 64k. You can use 128k or any other value.

  4. conv=noerror?: Tell dd to continue operation, ignoring all read errors.

  5. sync?: Add input blocks with zeroes if there were any read errors, so data offsets stay in sync.

How to clone a partition

To clone /dev/sdc1 to /dev/sdd1, enter:
# dd if=/dev/sdc1 of=/dev/sdd1 bs=128K conv=noerror,sync
Sample outputs:

15874+0?records?in
15873+0?records?out
1040252928?bytes?transferred?in?3.805977?secs?(273320858?bytes/sec)

dd make disk image

You can boot from a live cd. Once booted, make sure no partitions are mounted from the source hard drive disk. You can store disk image on an external USB disk. The syntax is as follows
dd if=/dev/INPUT/DEVICE-NAME-HERE conv=sync,noerror bs=64K | gzip -c > /path/to/my-disk.image.gz
In this example, create disk image for /dev/da0 i.e. cloning /dev/da0 and save in the current directory:
# dd if=/dev/da0 conv=sync,noerror bs=128K | gzip -c > centos-core-7.gz
Sample outputs:

How to make disk image with dd on Linux or UnixFig.01: dd command in action
The above command just cloned the entire hard disk, including the MBR, bootloader, all partitions, UUIDs, and data.


How to restore system (dd image)

The syntax is:
# gunzip -c IMAGE.HERE-GZ | dd of=/dev/OUTPUT/DEVICE-HERE
For example:
# gunzip -c centos-core-7.gz | dd of=/dev/da0

Tip #1: Not enough disk space locally? Use remote box

You can send the image through ssh and save it on the remove box called server1.cyberciti.biz:
# dd if=/dev/da0 conv=sync,noerror bs=128K | gzip -c | ssh vivek@server1.cyberciti.biz dd of=centos-core-7.gz

Tip #2: See progress while making an image with dd

You need to?use GNU dd with coreutils version 8.24 as follows (pass the?status=progress?to the dd):
# dd if=/dev/sdc1 of=/dev/sdd1 bs=128K conv=noerror,sync status=progress
Sample outputs:

How to make disk image with dd on Linux or Unixgdd (GNU DD) in action with progress bar running on MacOS X


Tip #3: Save extra information

  • See?how to save and restore MBR only.

  • Not a fan of dd? See?top 6 open source disk cloning and imaging softwares.

  • Want to deal with corrupted disk??Try ddrescue command.


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

娄烦县| 随州市| 五家渠市| 镇雄县| 金山区| 盈江县| 和顺县| 宁安市| 伊春市| 张北县| 景谷| 越西县| 黎川县| 双牌县| 平谷区| 龙山县| 多伦县| 牟定县| 犍为县| 怀化市| 舟曲县| 和龙市| 凤翔县| 南汇区| 绍兴市| 南川市| 甘泉县| 房产| 成武县| 八宿县| 潼关县| 民和| 永平县| 株洲市| 弥勒县| 安顺市| 岐山县| 安仁县| 西乌珠穆沁旗| 宁波市| 阿拉善盟|