Create a Disk Image With dd Command

Situation: I want to re-use an external drive which already contains some data. So I will create a disk image on an external drive in case I need to copy that image back to the drive in the future. Solution: Normally, I just run dd to create an file.img when the disk is small, e.g. SD card. However, the drive capacity is 512GB. So a better option is to compress the image....

March 19, 2022 · 2 min · 246 words · kenno

Create a FreeBSD install disk with dd on OS X

I need to create a bootable FreeBSD install disk and the downloaded file happened to be on a Mac laptop. Since OS X is based on BSD, it also comes with dd utility. After a USB is inserted, I need to identify the disk. This can be done using diskutil command: $ sudo diskutil list /dev/disk0 (internal): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme 251.0 GB disk0 1: EFI EFI 314....

February 9, 2018 · 1 min · 199 words · kenno

Create bootable USB Fedora 24

Every time there is a new release of Linux distro, I need to create a bootable USB. And, I forgot how I did it last time. So, I tried by using the “Startup Disk Creator” program installed on my Ubuntu workstation, only to find out that it didn’t even work. After a while I remember, it was just a matter of using dd command to copy the ISO image to the USB....

June 27, 2016 · 1 min · 181 words · kenno

Copy RaspBSD image to micro SD card

The RaspBSD image for Raspberry Pi can be found at http://raspbsd.org/raspberrypi.html. After it’s been downloaded, we need to copy it to a microSD card. Before we can do that, we need to find out the device name represents the microSD card. One way to find out is to plug the card in, and check the newest messages of dmesg. $ dmesg ... [282430.689656] mmc0: new SDHC card at address aaaa [282430....

December 2, 2015 · 1 min · 165 words · kenno

Copy hard disks or partitions using dd

Warning: The following is for personal note only, and is not meant to be a tutorial or guide. On Debian server at work, we have /home reside on /dev/hda6 and I want to move to a new hard disk /dev/hdb. First, I need to format /dev/hdb using fdisk. Then use dd to copy the content from /dev/hda6 to /dev/hdb1, the newly createdd ext3 partition. # dd if=/dev/hda6 of=/dev/hdb1 bs=1024 The above commands instruct dd to read the content from /dev/hda6 and write it to /dev/hdb1....

July 14, 2009 · 1 min · 154 words · kenno