This command is used to do low level copying of data.

learn more… | top users | synonyms

113
votes
26answers
212k views

Using DD for disk cloning

There's been a number of questions regarding disk cloning tools 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 ...
17
votes
9answers
12k views

How to set up disk cloning with dd, netcat and ssh tunnel?

I would like to copy stuff in bulk (reimage disk using dd) with netcat from host A to B via ssh encrypted channel on Linux. What commands should I type on both ends?
17
votes
3answers
2k views

Securely wipe an entire Linux server with itself

I have remote ssh access and root access. I do not have physical access. I'm not looking for solutions involving booting into anything, I want to do this from what is currently running. OS is SL6. ...
8
votes
2answers
1k views

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 * ...
6
votes
3answers
7k views

dd on entire disk, but do not want empty portion

I have a disk, say /dev/sda. Here is fdisk -l: Disk /dev/sda: 64.0 GB, 64023257088 bytes 255 heads, 63 sectors/track, 7783 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size ...
6
votes
1answer
2k views

combine partitions to one disk image

I have 3 images. Each image was done by cloning (by dd) a partition (these partitions formatted using ext3 file system). One partition is boot-able with GRUB1 (CentOS) How can I combine them to one ...
6
votes
1answer
274 views

Experiences with using `dd` to copy multi-partition, multi-FS device

I have a disc with several partitions on, each of which has a different kind of file system (ext3, ext4, and, let's say, NTFS). I want to know if I can copy the whole disc to a new one (which is of ...
6
votes
2answers
3k views

/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 ...
6
votes
2answers
3k views

Mount dd image with multiple partitions

I have created an image of a disk using dd using the command dd if=/dev/sdb of=/jobs/image.dd. The SATA drive /dev/sdb has 3 partitions on it (one NTFS, two FAT32). How do I mount the complete image ...
6
votes
2answers
161 views

Best way to clone a Linux system

I've just finished setting up a Debian system running on an embedded device. It has custom partitioning, numerous config file changes, web content, and a couple of applications compiled from source. ...
5
votes
2answers
3k views

Mounting a linux image built with “dd” on Mac OSX 10.7 [closed]

I recently did a ssh root@myserver "dd if=/dev/xvda " | dd of=/<localpath>/myimage.img as instructed by my VPS server docs at linode. I did this before to another linux system and mounted it ...
4
votes
2answers
2k views

Why is Clonezilla faster than dd?

On my SSD imaging (Source and Destination are 2 SSDs) I get 12GBpm using CloneZilla while with dd I get only 5GBpm. What makes Clonezilla so much faster than dd?
4
votes
6answers
2k views

How can I know if netcat & dd are working?

I'm running on server A (Source): dd bs=16M if=/dev/sda|bzip2 -c|nc serverB.example.net 19000 On server B (Destination): nc -l -p 19000|bzip2 -d|dd bs=16M of=/dev/sdb Do I need to see some ...
4
votes
3answers
6k views

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 ...
4
votes
3answers
1k views

Get exact size in bytes of a disk & partitions in windows

I'm using dd (under cygwin) to copy a shadow image of a disk in windows. Shadow copy will only give me a partion, so what I am doing is: 1) using dd to grab the disk header (32k on Win2003) 2) using ...
4
votes
1answer
541 views

Backup root partition with dd without downtime

Is there a way to remount / as read-only and buffer new writes in RAM, so can backup the / media with dd? I want to create a bootable image from my SoHo-Server (Debian 6) without a live cd or any ...
4
votes
2answers
2k views

create image of a USB drive without unallocated partition

I have 8GB USB drive attached to my system which looks like this: [root@host]# fdisk -l /dev/sdb Disk /dev/sdb: 8462 MB, 8462008320 bytes 255 heads, 63 sectors/track, 1028 cylinders Units = ...
4
votes
3answers
2k views

Best way to copy large amount of data between partitions

I'm looking to transfer data across 2 lv of an HP-UX server. I have a couple of those transfers to do, some of which are mostly binary (Oracle tablespace...) and some others are more text files ...
4
votes
1answer
324 views

Linux page cache slows down IO on dual cpu server with 64GB ram

I have a massive problem with the linux page cache which slows down the IO. For instance if I copy a lvm partition with dd, linux cache the data in the buffers or caches (free –m). That is not the ...
4
votes
3answers
700 views

Recovering with DDRescue Cannot Complete (write error: Read-only file system)

I'm trying to recover a corrupt VDI using vdfuse to mount the VDI and using dd_rescue to rescue the borked partition. dd_rescue seems to be working fine but once it reached about half of the ...
4
votes
2answers
6k views

LVM -> dd -> LVM?

I've 'cloned' a LVM partition using dd over ssh to a remote server(emergency backup...). On that remote server, is it possible to 'transform' the dd cloned file back into a LVM partition? Thanks. ...
4
votes
4answers
419 views

IDE compatability with SATA image

We had an old CNC machine's hard-drive fail recently. The hard-drive is an old 1275MB IDE (Seagate) and there were defiantly bad sectors on it. I was able to image the contents of the drive onto a ...
3
votes
3answers
1k views

Creating an iso file in Linux

I have created iso files by using two commands: dd if=/dev/cdrom of=filename cp /dev/cdrom filename What's the difference between the two, both have worked for me.
3
votes
2answers
799 views

In Linux, how can I create thin-provisioned file so it can be mounted and a filesystem created on it?

I am building a system that gives users certain amounts of disk space. The way I am doing it is: create a file with dd create an ext4 filesystem inside the file mount the file and tell the user ...
3
votes
2answers
203 views

How to view a full disk data (more than one partition) cloned with dd

I've a disk image done with dd: dd if=/dev/sda of=/mnt/fulldisk.img /dev/sda have some partitions (Windows+Linux) My problem is: I need to know if the image is done well, how can I access data? ...
3
votes
1answer
529 views

Mount new partition on a removable disk after dd?

How do I mount a new partition on a removable disk after dd without removing and re-inserting the device? If I use dd to write an image to a removable device, such as a usb-stick or an sd-card, the ...
3
votes
1answer
375 views

Using dd on disks with different sector sizes

I would like to move a partition to a new drive. The old drive has a sector size of 512 bytes while the new one has a sector size of 4096 bytes. I tried doing a dd of the full disk, but that failed ...
3
votes
2answers
386 views

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 ...
3
votes
1answer
8k views

How to copy KVM disk image to LVM

Problem I'm getting a No space left on device error when doing a dd command. I'm trying to move a KVM qcow2 file to an LVM partition and thought that the LVM partition needed to be the same size as ...
2
votes
4answers
817 views

DD copy works at terminal but not by cron

On an RHEL5.4 system I setup a script to backup a drive with dd copy every night by cron. I spit the dd output into a log file and email. It is in /etc/crontab and /var/spool/cron/root when I ...
2
votes
2answers
497 views

After using dd new disk cannot be booted and partition tables lost

After I used dd to clone a 120 gb hard disk to new empty 320 gb hard disk, the new disk cannot be booted. And fdisk tell me the partition table is no valid and Gparted just cannot edit the ...
2
votes
5answers
3k views

Creating a 80GB image with dd on a FAT32 drive

I have a question concerning the creation of an drive image with dd. Normally i would simply type: "dd if=/dev/foo of=/dev/bar". But in this case i only have a fat32 formatted drive at hand, which ...
2
votes
3answers
95 views

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 ...
2
votes
1answer
2k views

Restoring a smaller partition image to larger partition using dd

I recently backed up an 11GB ext4 partition to a file using dd, repartitioned, and restored the file to a 40GB partition. parted now shows the partition as 40GB, Nautilus reads it as 11GB, and both ...
2
votes
4answers
3k views

Break up a dd image into multiple files

I'm doing some data recovery from a hard disk. The disk has about 300GB of data on it, but I lack another hard drive that has 300GB of free space. I have three HDs, with 150, 40, and 120 GB free. ...
2
votes
2answers
2k views

Monitor Disk I/O Using DD

I've bee looking into the possibility that my server is experiencing a lot of iowait issues. I've found a lot online about running the dd command. I am unable to run this conv: [root@vps ~]# dd ...
2
votes
2answers
2k views

Can't dd /dev/kmem in Ubuntu Jaunty

I am keen to dump the contents of physical RAM into a flat file on my Ubuntu box but all I get is a 1MB file using dd (Which is odd as I have 4GB of RAM!). The command I am using is dd if=/dev/mem ...
2
votes
1answer
867 views

Raw copy with sector precision on windows

Is there some program for windows that is able to do what dd does in linux out of the box? I need to copy from a file to a physical disk in raw mode where I need to define offsets for input and ...
2
votes
2answers
3k views

Is it possible to restore disk image to a different size hard disk

recently I made a backup 120 GB disk image using dd: dd if=/dev/sda of=backup.img Now I have a new 320 GB hard disk and want to restore that backup image to that new disk. Will running dd ...
2
votes
2answers
83 views

DD over SSH from Server to Server

Is it possible to DD one server to another? Maybe through SSH? I've looked around and I have seen examples of DD using SSH from local to server and vice versa, but is it possible to do it from server ...
2
votes
3answers
107 views

LVM: Using an image of a PV?

I have a logical volume spanning several drives. One of those drives (3TB, the largest of the bunch) is dying, and I am currently making an image of it (via ddrescue). I'm not yet sure on how to use ...
2
votes
1answer
218 views

Large write with dd fail on RAID-5

I have a server with a RAID controller which connects to a JBOD over SAS. JBOD is populated with 16 SAS-HDDs of 3TB (8 of one make and 8 of other, same rpm). I have configured 3 logical drives with ...
2
votes
1answer
1k views

dd oflag=direct 5x fast

I have Centos 6.2 in server with this specs: 2xCPU 16 Core AMD Opteron 6282 SE 64GB RAM Raid controller H700 1GB cache NV - 2HD 74GB SAS 15Krpm RAID1 stripe 16k (OS Centos 6.2) sda - 4HD 146GB SAS ...
1
vote
5answers
605 views

I mistakenly `dd if=/floppy-image of=/dev/sda` and erased my entire partition

I think I have just made the worst mistake one can made - please help me recovering from it. A guy from another room came over said to me this is a BIOS update (or something similar) for the new ...
1
vote
5answers
190 views

Does filling up disk with dd removes files securely?

I want to remove my files securely without worrying about anyone restoring them, I know I can use shred but it takes too long even with -n 1 so I thought maybe if I remove files and write on the disk ...
1
vote
2answers
172 views

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 ...
1
vote
7answers
1k views

dd and drive imaging

When you image a drive with dd, you get a image usually of the same exact size of the drive. You can compress the image, but that is really Dependant on how many continuous null's or zeros their are ...
1
vote
2answers
391 views

Why does dd show slow disk speed first time?

I'm checking the disk speed of a hdd on CentOS 6 using dd command. The setup is a DRBD setup - with this server being primary. To ensure that I get correct values, I execute the dd command 3 times ...
1
vote
1answer
437 views

Operating System not found when loading DD image in VMware

I provide much details below to hopefully make my issue as clear as possible. Using dd if=/dev/ps3da2 of=/mnt/edexhdd/EDPS3LINUX.iso bs=16384 I copied a fairly huge partition from a physical Linux ...
1
vote
2answers
284 views

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 ...