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 »
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 »
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 »
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 »
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 »
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 »
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 »
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 »
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 »
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 »
- SCP transfer only modified files
- How can I automate clearing and resetting a Linux user’s home directory to a default?
- Cron expression that runs every 5 minutes from 1:30 am – 6:00 am [duplicate]
- Understanding redundant power supplies
- Is there a way for administrators to disable users from installing Firefox extensions?