New answers tagged

0

Running fsck.xfs on the partition image would be a good way to know if the file is corrupted or not. Since it is a disk image rather than a partition image, you'll need to extract the partition from the disk. You can get its size and position from sfdisk -l -uS diskImageFile and then extract it with dd if=diskImageFile of=partitionFile bs=blockSize ...


3

If you're trying to image copy a partition that's in use you are setting yourself up for a really bad fall. Copying a partition like this requires that nothing is writing to it. At all. If you can quiesce the partition you could use ddrescue, which is designed to read disks and partitions with faulty sectors. A typical invocation to extract /dev/sda1 to the ...


6

You should never run dd on a mounted file system, because that can corrupt the image, esp. if you want to do a backup. You may want to use tar instead. If you are sure that the device is not failing, you may use the seek (for seeking N blocks into the output file) and skip=N (for skipping N blocks of the input) flags. On a Linux system, you can use the ...


2

If the device is larger than the 342GB it copied, you most likely have a bad sector on this disk. You can use seek and skip with identical values to resume. dd <your previous options here ...> seek=68424 skip=68424 conv=notrunc 68424 will most likely just produce the same I/O error again, so you'll have to increase it. You didn't say which block ...


0

I went ahead and followed the steps outlined above and it does work. Three additional steps after the above steps: create /etc/crypttab recreate initramfs Both are described in this guide to Ubuntu install with encrypted LVM and custom/multiple logical volumes (i.e., not limited to the installer defaults of / and /swap): http://www.olafdietsche.de/2014/...


0

Looks like it was previously answered on Serverfault. http://serverfault.com/questions/219234/lvm-dd-lvm First of all you should create an LVM that is at least the same size of the original one. Then you can do something like: local# dd if=/dev/vglocal/lvm-old | ssh remote dd of=/dev/vgremote/lvm-new And that should do it. If you already have ...


0

Yes. After restoring your dd image to the new larger LV you would need to "fsck -f" (to force a check on the resulting image, and ensure it is marked clean) and then "resize2fs" the LV in order for the restored image to expand and see the new space.


3

According to its man page, ddrescue should be called like this: SYNOPSIS ddrescue [options] infile outfile [logfile] So, in your specific case, ddrescue /dev/sda /mnt/hdd/backup.hdd; no if= or of=.


0

Another variation on the theme, getting all pertinent fields, avoiding external calls to awk or sed (uses read, which in bash is a built in) IFS=' +' read in_full in_part _x _x \ out_full out_part _x _x \ bytes _x _x _x _x seconds _x speed speed_units < <( echo $(dd if=/dev/zero of=/dev/null bs=1024 count=7 2>&1) ) echo -e "$bytes bytes ...


1

Because dd will copy the contents of the iso image along with partition table inside it, so having the USB device mounted is not recommended and backing up the contents of the USB device is because the dd command with wipe all data in it. If you have a USB stick with grub as the boot loader you can actually boot from an iso so that you don't have to wipe ...


2

There's no redundancy in raid0, so whatever you have overwritten is gone.


0

$ /sbin/mkfs.ext4 test1 mke2fs 1.42.12 (29-Aug-2014) Discarding device blocks: done [...] Now there's a hint. Let's see what the manual says: -E extended-options discard Attempt to discard blocks at mkfs time (discarding blocks initially is useful on solid state devices and sparse / thin-provisioned storage). When the device advertises that ...



Top 50 recent answers are included