My original question was closed because it's assumed this thread () answers my question, so I am rephrasing my question and title. The author in the linked post makes no mention of whether he intends partitions to be copied (just &quot;files&quot;) and neither do the responses.  Will &quot;dd&quot; accept the disk's partitions, and its various volume formats? I have some 10 partitions, with some being HFS+, some APFS, one ExFAT. Will these formats also be copied with dd? Would appreciate some help, thank you!
121829
What is the best way to clone a disk between two Macs? I ask this every couple years or so and every time I get the same answer. "Use ", they say. But the unfortunate fact is that CCC is a file-level copy between disks. When I migrate to my new Mac, sure all the files are there but there are quirks here and there (including file dates being different etc).   So, really now, once again: how do you clone the disk over byte-for-byte?
60417
I have 3 partitions: one for Windows 7 (ntfs), one for Ubuntu (ext4) and one just for data (ntfs so both operating systems can see them).  My problem is that I had stored some files on the data partition using Ubuntu and when I booted Windows 7 all that data was gone! After that I couldn't find the files even when using Ubuntu.  My files were simply GONE :(  Is there something I can do in Ubuntu or is it just windows problem?
92833
I'm trying to transfer a 4 TB Time Machine backup from one USB 3 hard drive to another. I'm currently using SuperDuper to do it, and it's going to take upwards of two full days to perform the copy, if not longer.  That's significantly slower than the usual maximum speed for copying over USB 3, and I suspect that what's slowing things down is the overhead of copying each file individually, rather than just copying the raw data on the drive, sector by sector.  Given that I just need to duplicate a partition on to another drive:    Would it result in a usable partition if I did a sector-by-sector copy? Would that be faster than using SuperDuper? And if yes to both of the above, what are some methods I could use to do that?   I already tried using Disk Utility's restore feature to clone feature, but it got about 5% of the way in and then failed with a weird error about a drive being busy. So I don't think it's reliable enough, and it has no option for resuming where it left off. But that said, it did seem like it was going much faster, and if it didn't fail, it would've taken around 8 hours for it to finish.  edit: for posterity, the reason Disk Utility failed to copy the drive is because my destination drive was dying and loaded with bad sectors. Under normal circumstances it would probably work and be about as fast as dd. However I like Allan's answer the most because, in case something causes dd to stop mid-copy, you can restart it from where it left off.
20764
I want to back-up all files from my laptop partitions to external HDD.  I ran, for example  cp -a /med*/ravb*/*00   /med*/ravb*/M*L*/7.3GB_CP &amp;&amp; echo "7.3GB BACKED UP PROPERLY" || echo "7.3GB FAILED TO BACK UP"   The issue is that dot files are also getting included which I don't want. What should I do so as to ignore all dot files for backing up.
112815
I am doing a dd on two identical drives with this command:   dd if=/dev/sda of=/dev/sdb bs=4096   Both hard drives are the exact same model number, and both have 1TB of storage space. /dev/sda  uses a blocksize of 4096. /dev/sda is a local drive and /dev/sdb is a remote caddy. I might be able to use the following protocols:   USB2.0 HighSpeed (Currently the plan) Gigabit Over-The-Network clone (Really do not want to even try this) USB3.0 (If I find my other drive caddy) eSATA (If I find/buy a cable) SATA (If I find/buy a cable, gotta love laptop CD drives)   Is there a way to run this drive copy that takes less that 96 hours? I am open to using tools other than dd.  I need to clone the following partitions (including UUIDs)   Fat32 EFI Partition (*) NTFS Windows Partition (*) HFS+ OSX Partition  EXT4 Ubuntu Partition (*) Swap Partition (*)   * Supported by Clonezilla    I have tried Clonezilla (and it was MUCH faster), but it does not support HFS+ smart copying, which I need. Maybe the newest version supports this?  When I made my first clone, I did all of the partitions except HFS+ and it went very quickly. (No more than 3 hours total)
69940
I need some help recover files from a partially overwritten partition.  I will start with what happened. I was trying to make a image out of my hard drive using dd, but I found somewhere online that using pv would tell me the best bs count to make the copy, what it didn't say was that it would make the copy.  I ran the following command:  pv &lt; /dev/sda &gt; /dev/sdc   When I realized what was going on I stopped it, but it had already written around 1GB. I would like to recover the files that were not written over, I suspect those that were are long gone.  If someone knows a way I would be thankful.
31181
The first 7GB of a 500GB NTFS partiton was accidentally overwritten with another file. Is it possible to recover some of the data in the remaining 493 GB of the NTFS volume? The partition table is intact. The executed command was:  dd if=file of=/dev/sdc1   Thanks  Edit: My question is different. I overwrite first 7GB of NTFS partition. Other question mostly deals with hardware failures or bad sectors.
9077
I was using:  dd  if=/path/to/my/ubuntuiso/ubuntu.iso  of=/dev/sdb1  bs=4M  &amp;&amp;  sync   In order to create bootable Ubuntu USB drives on older Ubuntu versions. It was working perfectly. Sometimes I used the Startup Disk Creator program, which  worked well.  But when I use the same methods on Ubuntu 16.04 LTS, I get some warnings while formatting it afterwards.   The installation media works as expected, but when I try to format that USB stick after my work is done, I get the following warning :    The partitioning of that Pendrive looks strange :    And it also shows my 16GB pendrive as 64GB.  After struggling a lot with Gparted, I will somehow format it. But Why is it happening like this ?? Is there any better methods of creating bootable Ubuntu in 16.04 ?  EDIT : there is a related question . But my question is not about how to format it properly. My question is "How to create a bootable USB without that errors." &amp; "Wht are the causes of that error"
42777
To stupid people, like me, you would have thought overwriting each bit on a disk would render the data completely unrecoverable.  Why do disk wiping tools have the option for multiple passes, i.e. 3 or 5, even 7 and different methods?  Surely the first pass does the job?  My question - Is it just down to pure paranoia or should I be using multiple passes when wiping disks... and why?
107945
I have dd crashing after running a few hours.  Typically with a message like  Input/output error 68424+1 records in 68424+1 records out 342124883968 bytes (342 GB) copied, 5114.68 s, 66.9 MB/s   Is there something I can do about it?  Is there some way I can use the output? Or restart where it left off?  Is there any reason to think it is because the partition being backed up is being used?  It always crashes around 70-80%, often when the partition should be less-used.  Since this process takes so long, it is difficult to try different things.  I output to an image.  I could probably use a partition, but LVM is involved:  sudo lvmdiskscan /dev/centos/swap [       3.89 GiB]  /dev/sda1        [     500.00 MiB]  /dev/centos/root [      50.00 GiB]  /dev/sda2        [     465.27 GiB] LVM physical volume /dev/centos/home [     411.38 GiB]  /dev/sdb1        [     931.51 GiB]  3 disks 2 partitions 0 LVM physical volume whole disks 1 LVM physical volume   dd conv=sync,noerror if=/dev/centos/home bs=2000000   of=/run/media/ob/X_1T_Media1GHD-PCTU3/c/sd9e22_cel.image dd: error reading '/dev/centos/home': Input/output error 171062+1 records in 171063+0 records out 342126000000 bytes (342 GB) copied, 4625.3 s, 74.0 MB/s 220856+2 records in 220858+0 records out 441716000000 bytes (442 GB) copied, 6138.1 s, 72.0 MB/s   Friday Morning  ddrescue --sector-size=2048 --cluster-size=$((256*512)) --sparse --verbose /dev/centos/home /run/media/ob/X_1T_Media1GHD-PCTU3/c/sd7c_dd.image /run/media/ob/X_1T_Media1GHD-PCTU3/c/sd7c_dd.map  GNU ddrescue 1.18.1 About to copy 441714 MBytes from /dev/centos/home to /run/media/ob/X_1T_Media1GHD-PCTU3/c/sd7c_dd.image     Starting positions: infile = 0 B,  outfile = 0 B     Copy block size: 131072 sectors       Initial skip size: 32 sectors Sector size: 2048 Bytes  Press Ctrl-C to interrupt rescued:   441714 MB,  errsize:    8192 B,  current rate:        0 B/s    ipos:   342124 MB,   errors:       1,    average rate:   60675 kB/s    opos:   342124 MB, run time:    2.02 h,  successful read:       9 s ago Finished    But   extundelete sd7c_dd.image  --restore-directory /home/ob/p -o /tmp/tt extundelete: Bad magic number in super-block when trying to open filesystem sd7c_dd.image   /dev/mapper/centos-home on /home type xfs (rw,relatime,attr2,inode64,noquota)
109113
My C: is a small solid state that's already filling up. I'd like to move WLS to my D: or E: drive. Is this possible?  I imagine I'd have to uninstall then reinstall in order to move it. I'm ok with that if it's possible.
45326
Is there a way to get all possible partitions of an integer? Possibly specifying max and/or min summand. I'm interested in partitions themselves, not just partition count.
5303
I have done half an hour reading around to prepare to clone my hard drive.  It has multiple partitions, including a Windows partition.  I am going to buy a very large external hard drive for the backup.  I would like to be able to use this clone to restore the whole drive in case something goes wrong (I'm about to do some OS re-shuffling).  I want do learn how to do this using dd, as I like low-level tools that don't require installing anything.  I found the following useful code from the  (entered from a root shell using a live CD):  dd if=/dev/hda of=/dev/hdb &amp; pid=$! while kill -USR1 $pid; do sleep 1; done   (I know that I will have to edit the input and output locations.)  However I have two questions.  The first one is very noobie: this command is split across two lines.  Surely when I press enter after the exclamation mark it will start the process?  Two, on other sites it recommended entering block size.  Like this:  # dd if=/dev/hda conv=sync,noerror bs=64K of=/mnt/sda1/hda.img   I don't know anything about block sizes.  Is 64K right?  It looks like my block size is 512 bytes from the following, the output of sudo fdisk -ul:  Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0xc3ffc3ff     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *          63   143364059    71681998+   7  HPFS/NTFS/exFAT Partition 1 does not start on physical sector boundary. /dev/sda2       976867328  1465147391   244140032    7  HPFS/NTFS/exFAT /dev/sda3       143364094   976867327   416751617    5  Extended Partition 3 does not start on physical sector boundary. /dev/sda5       143364096   162895871     9765888   82  Linux swap / Solaris /dev/sda6       162897920   205864959    21483520   83  Linux /dev/sda7       205867008   976867327   385500160   83  Linux  Partition table entries are not in disk order  Disk /dev/mapper/cryptswap1: 10.0 GB, 10000269312 bytes 255 heads, 63 sectors/track, 1215 cylinders, total 19531776 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x433bb3a7  Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table   Thank you.
34502
I have backups up everything, but I'm still uneasy about the process and would like confirmation. I'd rather do this one time correctly. I want to shrink /dev/sda6/ by 200GB and reallocate it to /dev/sda2. I boot a LiveCD and turn off LinuxSwap (locked otherwise). I've been reading that it is very hard to move &quot;left&quot; when partitioning and other AskUbuntu threads are confusing me. Do I need to resize /dev/sda6 by 200GB &quot;preceding&quot; (rather than &quot;following&quot;), and then resize /dev/sda4 by 200GB? A little guidance would ease my nerves of messing everything up. Thank you ahead of time.
51227
My computer came with only one hard disk drive: C. It has a capacity of 920 GB. And I have used 80 GB of it.   Now I want two drives in my computer: C and D. But I want 150 GB in the C drive and the rest (770 GB) in the D drive. And I don't want that any files that I currently have in my C drive get deleted. How can I do that?  (I can't back up at the moment, because I already installed a lot of software and customized the operating sytstem. That's a lot of work.)   Thank you.
99889
What is the difference between "extended" partitions and "logical" partitions on my hard disk? What's the need for each? I am using Linux
15958
In windows 10, when you want to format a partition specifically as FAT32 (for example an SDcard that is going to be used in your phone) when you right-click the disk and choose format, only NTFS and exFAT are shown as possible format options.  Is there another way, preferably without installing an additional tool or booting into a different mode to format as FAT32?