ddrescue is a tool that can be used to repair and clone disks on a Linux system. This includes hard drives, partitions, DVD discs, flash drives, or really any storage device. It performs data recovery by copying data as blocks.
If ddrescue encounters errors from the data it’s trying to copy, it can discard them and keep only the good data. This makes it an ideal tool when trying to recover data from a corrupted disk. In this tutorial, you will learn how to install ddrescue and use it to clone a full disk or partition, and write that data to an empty storage space.
In the section, we will use ddrescue to clone a partition or full disk (the process is the same) to an image file. That file can that be written to another disk or partition afterwards. We will also show the process to clone a partition directly to another disk, bypassing the image file creation and instead creating a direct clone onto new hardware.
First, open a command line terminal and identify the device path to the hard drive or partition that you would line to clone. For this, you can use a tool like lsblk, fdisk, etc.
$ lsblk
Here we find the device path /dev/sdb1 which is the partition we want to clone
Note that the -d option will force ddrescue to ignore the kernel’s cache and instead access the disk directly.ddrescue process of cloning the partition to an image file
Note that if you are trying to recover data from a corrupted disk, you may want to append the -r option after the first try above. This will instruct ddrescue to retry bad sectors in an effort to recover as much data as possible. You can specify the number of retries after the option. In this example, we will use 3 retries.
The -f option indicates that we are sending our output to a block device rather than a file.
If you want to clone a disk or partition directly to another, thereby bypassing any image file, you can do so with the following syntax. In this example, we are cloning partition /dev/sdX1 to /dev/sdX2.
Next, we will use the following command syntax to copy the partition to an image file. We are using /dev/sdX in the example below, but you would just need to substitute your own partition or device in place of it. The contents will be written to a file called backup.img.
After completing the steps above, you can access the cloned storage and will hopefully see all of your files there, assuming that ddrescue was successful in recovering them.
From https://halny.com/knowledge-base/hgu-supported-service-scenarios/
HGU mode allows to flow multiple traffic classes across VEIP. All UNI interfaces are belonged to one VEIP and it cannot be controlled by OMCI. This non-OMCI part can be controlled by Web and Auto provisioning. Most OLT vendors support dual stack: – IP-HOST #1 -> MGMT (WEB, XML provisioning) – configure by OMCI (from OLT) – VEIP (non-OMCI : INTERNET, VoIP, IPTV services) – configure by ONT WEB or provisioning
1.Bridge mode – only INTERNET:1-4/WIFI + MGMT
2.Bridge mode – INTERNET:1-4/WIFI, VoIP Interface + MGMT
3.Bridge mode – INTERNET:1-2/WIFI, IPTV:3-4, VoIP Interface + MGMT
4.Router mode – only INTERNET:1-4/WIFI + MGMT
5.Router mode – INTERNET:1-4/WIFI, VoIP Interface + MGMT
6.Router mode – INTERNET:1-2/WIFI, IPTV:3-4, VoIP + MGMT
$ make O=sandbox sandbox_config
$ make O=sandbox
$ O=sandbox ./test/vboot/vboot_test.sh
/home/hs/ids/u-boot/sandbox/tools/mkimage -D-I dts -O dtb -p 2000
Build keys
do sha1 test
Build FITwith signed images
Test Verified Boot Run: unsigned signatures::OK
Sign images
Test Verified Boot Run: signed images:OK
Build FITwith signed configuration
Test Verified Boot Run: unsigned config:OK
Sign images
Test Verified Boot Run: signed config:OK
check signed config on the host
Signature check OKOK
Test Verified Boot Run: signed config:OK
Test Verified Boot Run: signed config with bad hash:OKdo sha256 test
Build FITwith signed images
Test Verified Boot Run: unsigned signatures::OK
Sign images
Test Verified Boot Run: signed images:OK
Build FITwith signed configuration
Test Verified Boot Run: unsigned config:OK
Sign images
Test Verified Boot Run: signed config:OK
check signed config on the host
Signature check OKOK
Test Verified Boot Run: signed config:OK
Test Verified Boot Run: signed config with bad hash:OK
Test passed