Information Technology Grimoire

Version .0.0.1

IT Notes from various projects because I forget, and hopefully they help you too.

dd

Test First If Needed

Read Only

sudo badblocks -sv /dev/sdb

Test with Write Patterns and Read

sudo badblocks -wsv /dev/sdb

use dd to create image

Verify Your Disks

lsblk

Extract a Compressed Image

xz -d kali-linux-2023.4-raspberry-pi-arm64.img.xz

Write Image to Disk

Make double sure that you know what /dev/sdb is or you will destroy it and all data on it

sudo dd if=kali-linux-2023.4-raspberry-pi-arm64.img of=/dev/sdb bs=4M status=progress conv=fsync
15023996928 bytes (15 GB, 14 GiB) copied, 836 s, 18.0 MB/s15032385536 bytes (15 GB, 14 GiB) copied, 836.901 s, 18.0 MB/s
3584+0 records in
3584+0 records out
15032385536 bytes (15 GB, 14 GiB) copied, 1260.44 s, 11.9 MB/s

or if you have an ISO, still verify the /dev/sdx though

sudo dd if=Downloads/gparted-live-1.5.0-6-amd64.iso of=/dev/sda bs=4M status=progress oflag=sync
536870912 bytes (537 MB, 512 MiB) copied, 83 s, 6.4 MB/s
128+0 records in
128+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 83.476 s, 6.4 MB/s

Eject the Media

sudo eject /dev/sdb