# Cloning linux drive

**URL:** <https://forum.logik.tv/t/cloning-linux-drive/9274>\
**Category:** Flame Questions\
**Tags:** system-admin\
**Created:** [October 5, 2023, 4:04pm UTC](https://forum.logik.tv/t/cloning-linux-drive/9274 "2023-10-05T16:04:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul\_round](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/paul_round/32/389_2.png) [@paul\_round](https://forum.logik.tv/u/paul_round)\
**Post date:** [October 5, 2023, 4:04pm UTC](https://forum.logik.tv/t/cloning-linux-drive/9274/1 "2023-10-05T16:04:49Z")

</div>

Whats the best way to clone the system drive in a linux Flame?  
We want to put a larger drive in one of our flames, but without the hassle of a clean install at the moment.

---

<div class="post-metadata">

**Author:** ![ALan](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@ALan](https://forum.logik.tv/u/ALan)\
**Post date:** [October 5, 2023, 5:18pm UTC](https://forum.logik.tv/t/cloning-linux-drive/9274/2 "2023-10-05T17:18:45Z")

</div>

Clonezilla

---

<div class="post-metadata">

**Author:** ![AntonisNtelis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/antonisntelis/32/673_2.png) [@AntonisNtelis](https://forum.logik.tv/u/AntonisNtelis)\
**Post date:** [October 5, 2023, 5:55pm UTC](https://forum.logik.tv/t/cloning-linux-drive/9274/3 "2023-10-05T17:55:47Z")

</div>

if you have a usb dock with 2 sata slots cloning is very easy. When it finishes you reclaim the unallocated space of the larger drive with gparted.

---

<div class="post-metadata">

**Author:** ![allklier](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/allklier/32/4309_2.png) [@allklier](https://forum.logik.tv/u/allklier)\
**Post date:** [October 5, 2023, 11:15pm UTC](https://forum.logik.tv/t/cloning-linux-drive/9274/4 "2023-10-05T23:15:38Z")

</div>

That’s a good option.

Not as easy if the drive is in an M.2 slot on the mainboard and you just take a snapshot, rather than swap the drive.

I used to have a bootable USB stick that had a self-contained version of windows and a disk copy utility. But it wasn’t great and not cheap.

You almost want to make a basic Linux image that boots with memory fs into a a console and you can run the dd command to copy. Anyone have a pointer to such an image?

PS: I guess that’s what Clonezilla Live is…

---

<div class="post-metadata">

**Author:** ![randy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/randy/32/6122_2.png) [@randy](https://forum.logik.tv/u/randy)\
**Post date:** [October 6, 2023, 1:57am UTC](https://forum.logik.tv/t/cloning-linux-drive/9274/5 "2023-10-06T01:57:00Z")

</div>

My favorite way of dealing with this is with Ansible Playbooks. Since I’m always tweaking installs for multiple machines, it’s a great way of automagically firing off dozens of commands to install everything from scratch, but automated.

Ansible is free, open source, and only requires ssh keys to be installed and off you go. For example, I have the following Ansible Playbooks, which I built entirely using ChatGPT…

install\_step1\_dku.yml

* * *

- name: Install DKU  
hosts: all  
become: yes  
gather\_facts: no  
tasks:
  - name: Install NFS utils  
ansible.builtin.yum:  
name: nfs-utils  
state: present  
become: yes

  - name: Create /Volumes/hotstorage directory  
ansible.builtin.file:  
path: /Volumes/hotstorage  
state: directory  
become: yes

  - name: Mount NFS share  
ansible.builtin.mount:  
path: /Volumes/hotstorage  
src: ‘10.10.0.122:volume1/hotstorage’  
fstype: nfs  
opts: ‘defaults’  
state: mounted  
become: yes

  - name: Copy DKU tarball  
ansible.builtin.copy:  
src: “/Volumes/hotstorage/02\_assets/flame\_versions/DKU\_17.3.0.tar”  
dest: “/tmp/DKU\_17.3.0.tar”  
remote\_src: yes

  - name: Extract DKU tarball  
ansible.builtin.unarchive:  
src: “/tmp/DKU\_17.3.0.tar”  
dest: “/tmp”  
remote\_src: yes

  - name: Install DKU  
ansible.builtin.shell: “/tmp/DKU\_17.3.0/INSTALL\_DKU”  
args:  
chdir: “/tmp/DKU\_17.3.0”  
register: install\_dku\_result

  - name: Reboot the system  
ansible.builtin.reboot:

I have another 7-10 Playbooks I run that install Chrome, check /etc/fstab, install Teradici, mount servers, install plugins like Matchbox, Boris, Neat Video, install different versions of Flame, install Machine Learning Timewarp, and even install and configure ZFS/framestores.

I’ve found this be a much better use of my time than dealing with Snapshots or updating clones or whatever. It’s not that hard, you can self teach it to yourself over a weekend with ChatGPT and YouTubes.

---

<div class="post-metadata">

**Author:** ![Viktor.S](https://avatars.discourse-cdn.com/v4/letter/v/c2a13f/32.png) [@Viktor.S](https://forum.logik.tv/u/Viktor.S)\
**Post date:** [October 6, 2023, 6:52am UTC](https://forum.logik.tv/t/cloning-linux-drive/9274/6 "2023-10-06T06:52:07Z")

</div>

> [@paul\_round](#):
>
> Whats the best way to clone the system drive in a linux Flame?  
> We want to put a larger drive in one of our flames, but without the hassle of a clean install at the moment.

You can use:

- DD command in command prompt (most powerful, but one must be careful what he is doing because you can very easy destroy what you want to clone)
- Disk application (which is part of every Gnome install) - create Partition Image \> Restore Partition Image
- As ALan wrote Clonezilla
- As AntonisNtelis wrote usb dock - just be careful as not everyone can read XFS file system, and you have to physically remove drive from flame
- Randy - secret Skynet agent?

Sometimes cloning to bigger drive has it’s own issues: you have only allocated same size as original drive and can’t use free space (cloning is 1=1) and you have to fiddle it after clone. Stick to Linux - don’t use Windows or Mac cloning soft (Linux is very sensitive about permissions and those are not always correctly read and copied by Windows).

---

<div class="post-metadata">

**Author:** ![allklier](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/allklier/32/4309_2.png) [@allklier](https://forum.logik.tv/u/allklier)\
**Post date:** [October 6, 2023, 12:13pm UTC](https://forum.logik.tv/t/cloning-linux-drive/9274/7 "2023-10-06T12:13:54Z")

</div>

Right. When cloning a drive, I think it’s best to clone at hardware/block level, rather than filesystem level. On occasion partition level may make sense based on what the goal is. Also best to clone while the source drive is unmounted/not in use, so you get a stable state of affairs. To much nuance that may not make it over in terms of permissions, locked files, etc.

It does take longer on drives that aren’t full, and may wasteful on larger target drive, and maybe that is ok.

All depends on circumstances.

---

<div class="post-metadata">

**Author:** ![ALan](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@ALan](https://forum.logik.tv/u/ALan)\
**Post date:** [October 6, 2023, 3:34pm UTC](https://forum.logik.tv/t/cloning-linux-drive/9274/8 "2023-10-06T15:34:04Z")

</div>

Also this is another situation were a Central S+W Project Server has major win. Workstations become ephemeral dumb compute nodes. Swap the drive, wipe the os, burn down the workstation. Doesn’t matter, your Stone is safe.

---

<div class="post-metadata">

**Author:** ![Slabrie](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@Slabrie](https://forum.logik.tv/u/Slabrie)\
**Post date:** [October 12, 2023, 12:38pm UTC](https://forum.logik.tv/t/cloning-linux-drive/9274/9 "2023-10-12T12:38:45Z")

</div>

As Alan stated, Clonezilla ([Clonezilla - Downloads](https://clonezilla.org/downloads.php)) is a very good tool to not only clone your disk but create snapshot of your system drive so you are protected in case of HW issues. All of you should have a look at this great utility.

---

<div class="post-metadata">

**Author:** ![paul\_round](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/paul_round/32/389_2.png) [@paul\_round](https://forum.logik.tv/u/paul_round)\
**Post date:** [October 12, 2023, 12:40pm UTC](https://forum.logik.tv/t/cloning-linux-drive/9274/10 "2023-10-12T12:40:09Z")

</div>

Agreed, I use it a lot at home with my hackintosh.
