Skip to content

Description

Cheat sheet for cloning disk images with Linux.


Attributes

UpdatedNever
Created
CategoryNotes
EffortStub

Topics


Links

Backlinks
Creating a Headless Raspberry Pi Startup Disk

Source

View on sourcehut

License

Cloning a Disk Image © 2022 by Jon Webb is licensed under CC BY-SA 4.0

Cloning a Disk Image

Linux

  1. Find the target storage device name using lsblk -f (e.g. sdb)
  2. Unmount device filesystems if needed
    1. Check whether filesystems are mounted using df (e.g. /dev/sdb1)
    2. Unmount any mounted filesystems from the target storage device with umount (e.g. sudo umount /dev/sdb1)
  3. Copy the disk image to the target device using dd:
$ sudo dd if=disk_image.img of=/dev/sda bs=4MB status=progress