Browsing articles tagged with "dd - Admins Goodies"
May 19, 2012
tom

Save data after accidental dd format

as embarrassing as it sounds I managed to dd a debian iso to an external hd instead of my usb pen drive. now my 1.5 tb western digital has 1 700mb partition named debian and the rest is unallocated space. if I understand correctly how dd works the first 700mb of data in the disc are lost since they have been overwritten. is there any way to save the rest? //the disk was ntfs partitioned [...]

Continue Reading »
Mar 27, 2012
tom

How to delete the MBR (Master boot record) out of an image file?

I have a QEMU image myserver.img that is about 20GiB. The file serves as a “virtual” hard disk for the server. Now the first 512 bytes contain the MBR, and I am trying to overwrite those bytes with zeroes. On a normal disks, this one would work: dd if=/dev/zero of=/dev/sda bs=512 count=1 But when I try that on the image file, the file gets overwritten and is only 512 bytes in size (instead of 20GiB). [...]

Continue Reading »
Mar 15, 2012
tom

Backup with dd upon reboot

I’m trying to implement the easy to maintain backup solution for our local linux server. The goal is to be able to restore the whole system from image file. What I am thinking of is just to issue following script with cron FILENAME=`date +%F`.bak dd if=/dev/sda | bzip > /media/remote_backups/$FILENAME The problem is that this script should be run in special environment – when only basic services work and no filesystems are mounted. So, the [...]

Continue Reading »
Feb 26, 2012
tom

How can I split a drive image created with ‘dd’ into separate files for each partition?

I created an image of a failing drive with: dd if=/dev/sde of=/mnt/image001.dd The drive had only two partitions: Device Boot Start End Blocks Id System /dev/sde1 * 1 13 102400 7 HPFS/NTFS /dev/sde2 13 60802 488282112 7 HPFS/NTFS How can I split the image (image001.dd) into two or three files (1: MBR; 2: Partition 1; 3: Partition 2) so that I can mount the filesystems in it? A solution I’ve found that wouldn’t work for [...]

Continue Reading »
Feb 8, 2012
tom

Moving a Logical Volume directly from one server to another over the network?

I have a KVM host machine with several VMs on it. Each VM uses a Logical Volume on the host. I need to copy the LVs to another host machine. Normally, I would use something like: dd if=/the/logical-volume of=/some/path/machine.dd To turn the LV into an image file and use SCP to move it. Then use DD to copy the file back to a new LV on the new host. The problem with this method is [...]

Continue Reading »
Jan 27, 2012
tom

Partition size inconsistency after dd clone

We have recently upgraded a system HDD – it was 160GB, now 2TB. We upgraded as we were running low on space, mainly on /usr, and also on /home. I prepared the new drive with a Live CD and GParted (and made some partitions larger). Then I cloned /, /usr, and /boot to the new drive using dd. The partition size of /usr on the old drive was 23GB, but I made it ~50GB on [...]

Continue Reading »
Nov 17, 2011
tom

How does this benchmark calculation work?

I am testing disk I/O performance on a server of mine, which will eventually run Postgresql. I am following this web site to perform my benchmarks. The benchmark consists of running dd and reading/writing N blocks the size of 8k (which is the size of blocks Postgresql uses). N is to be calculated as follows: N = 250,000 * gigabytes of RAM So, I have 16GB of ram, which gives me 4 million blocks to [...]

Continue Reading »
Nov 16, 2011
tom

Disk cloning using dd thru gzip – how effective is it? [closed]

Is gzip or gzip -9 for a disk clone worth the extra time that it takes to perform the compression? Does it yield a significant saving? There is very little information on how effective piping data from dd thru gzip really is. (Some data simply doesn’t compress well, is the data stream of a disk that compress-able? You give the answer by yourself: Some data simply doesn’t compress well … and other data extremely well. [...]

Continue Reading »
Oct 14, 2011
tom

/dev/zero equivalent in windows?

I am trying to use the windows version of dd to copy a RHEL iso to a USB stick. However, I wanted to zero out the drive first to ensure there is no filesystem on it before writing it out. Is there an equivalent of /dev/zero in windows that I can use as the infile? .Check this dd version out Check more discussion of this question. Bookmark on Delicious Digg this post Recommend on Facebook [...]

Continue Reading »
Aug 25, 2011
tom

Using DD for disk cloning

There’s been a number of questions regarding disk cloning tools (yes, I did search for it) and dd has been suggested at least once. I’ve already considered using dd myself, mainly because ease of use, and that it’s readily available on pretty much all run of the mill bootable linux distributions. To my question, what is the best way to use dd for cloning a disk. I don’t have much time to go around, and [...]

Continue Reading »
Pages:1234»