Questions tagged [cloning]

Duplicating an installation of Linux or other Unix-like operating system. See also /migration

Duplicating an installation of Linux or other Unix-like operating system to deploy it on another computer, to provision virtual machines, to make a runnable backup or any other purpose. See also if you're just moving the installation and not duplicating it.

140 questions
161
votes
9 answers

dd vs cat -- is dd still relevant these days?

I recently realized we can use cat as much as dd, and it's actually faster than dd I know that dd was useful in dealing with tapes where block size actually mattered in correctness, not just performance. In these days, though, are there situations…
kizzx2
  • 1,833
  • 2
  • 12
  • 9
75
votes
5 answers

Moving Linux install to a new computer

I know that it can, in some circumstances, be difficult to move a Windows installation from one computer to another (physically move the hard drive), but how does that work on Linux? Aren't most of the driver modules loaded at bootup? So…
Falmarri
  • 12,897
  • 17
  • 58
  • 71
50
votes
10 answers

How to change filesystem UUID (2 same UUID)?

I have a fedora guest OS in VMware. I want to expand /boot partition, so I add another virtual disk to this VM, and try to clone the disk. After dd if=/dev/sda1 of=/dev/sdb1, blkid report that /dev/sda1 and /dev/sdb1 have same UUID/GUID. It's weird…
LiuYan 刘研
  • 3,910
  • 5
  • 31
  • 34
45
votes
5 answers

Full DD copy from hdd to hdd

ORIGINAL QUESTION: If I have 2 identical hard drives with the following characteristics: SATA 6.0 Gb/s 5400 rpm 3TB How long should a full dd copy take to complete? So far it's been running for 5 hours and still going... I am using Linux Ubuntu…
oshirowanen
  • 2,571
  • 15
  • 46
  • 66
38
votes
9 answers

Clone whole partition or hard drive to a sparse file

I like to clone a whole partition or a whole hard drive onto a larger external disk but like to create a sparse file. I often use dd for cloning, but it doesn't support sparse files. As a workaround I used something like: cp --sparse=always <(dd…
Martin Scharrer
  • 900
  • 1
  • 12
  • 16
34
votes
7 answers

How can I use DD to migrate data from an old drive to a new drive?

I am upgrading the internal SATA hard drive on my laptop from a 40G drive to a 160G drive. I have a Linux/Ubuntu desktop which has a SATA card. I would actually like to do the same thing for a couple CentOS & FreeBSD boxes at work, and it seems this…
Stefan Lasiewski
  • 19,264
  • 24
  • 70
  • 85
24
votes
5 answers

Why specify block size when copying devices of a finite size?

In online tutorials it is often suggested to use the following command to copy a CDROM to an iso image: $ dd if=/dev/dvd of=foobar.iso bs=2048 Why must the byte size be specified? I notice that in fact 2048 is the standard byte size for CDROM…
dotancohen
  • 15,494
  • 26
  • 80
  • 116
22
votes
1 answer

Move qcow2 image to physical hard drive

I have a qcow2 image that I use to boot an installation of linux using QEMU; I would like to place the contents of that image directly onto a physical hard drive so that I can boot to that linux installation directly from my desktop. I would like to…
Chris
  • 813
  • 2
  • 7
  • 11
22
votes
6 answers

can 'dd' be used to clone to a smaller HDD, knowing that partitions will need editing?

I've used dd to clone disks like this: dd if=/dev/sdb of=/dev/sda bs=4096 conv=notrunc,noerror,sync And it's always worked fine. Any and all docs on 'dd' take pains to remind you that the target disk must be the same size or bigger than the…
Ray Andrews
  • 2,125
  • 4
  • 20
  • 37
12
votes
5 answers

How can I clone/backup/restore Windows 10 from Linux?

Case scenario: $ sudo fdisk -l Disk /dev/sda: 223,6 GiB, 240057409536 bytes, 468862128 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel…
Sopalajo de Arrierez
  • 6,281
  • 21
  • 60
  • 98
12
votes
3 answers

Cloning a bootable USB stick to a different-sized stick

HARDWARE: 2 8GB USB flash drives DISTRO: Mint 9 Xfce persistent Live Cd One USB flash drive has two partitions: 1) FAT32 700MB Mint 9 partition 2) ext3 7.3GB casper-rw partition GOAL: I want to make a duplicate of that USB flash drive because I…
Joshua Robison
  • 623
  • 3
  • 12
  • 24
10
votes
3 answers

Using dd to clone a disk while mounted - risks?

I want to clone a hard disk using dd. Because I want to keep a process on the machine alive continuously, I would like to do this while the filesystem is still mounted. I understand this is not the "ideal" way to do this, but it also seems from…
alexandicity
  • 123
  • 1
  • 1
  • 6
10
votes
3 answers

Can I restore a single partition from a Clonezilla disk image?

I was thinking of performing a Clonezilla backup and was wondering what backup mode to choose. Generally speaking, Clonezilla offers the following backup options: savedisk: Save a full disk image saveparts: Save images of specific…
Glutanimate
  • 2,168
  • 4
  • 22
  • 38
7
votes
2 answers

How to create a snapshot of a physical disk?

I have Windows 7 installed on one of my disks. I want to boot this Windows system in my Xen HVM, but I do not want the changes to be permanent. So I want to create a snapshot of my Windows 7 partition. I checked with LVM, but it seems LVM can only…
David S.
  • 5,529
  • 5
  • 30
  • 39
7
votes
3 answers

How to install exactly the same packages on another computer in openSUSE?

Another computer can be as well virtual machine. I cannot make disk clone because of hardware differences and settings. I have computer A, installed and running, I also have computer B. I will install the same OS on B, so I would get the same base…
greenoldman
  • 6,086
  • 16
  • 54
  • 65
1
2 3
9 10