Screenly

Making an image that leaves off the whole rest of the disk

$ sudo fdisk -lu /dev/sdb

Disk /dev/sdb: 14.9 GiB, 15931539456 bytes, 31116288 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 type: dos
Disk identifier: 0xdc3cf659

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1        8192   93813   85622 41.8M  c W95 FAT32 (LBA)
/dev/sdb2       94208 7626751 7532544  3.6G 83 Linux

# Add +1 to the last sector
$ sudo dd if=/dev/sdb bs=512 count=7532545 | xz > screenly.xz
7532545+0 records in
7532545+0 records out
3856663040 bytes (3.9 GB, 3.6 GiB) copied, 557.069 s, 6.9 MB/s

https://www.reddit.com/r/linuxquestions/comments/2o74i4/getting_dd_or_dcfldd_to_ignore_unallocated_space/



Finding the Pi on your local network

$ sudo arp-scan --interface=eth0 --localnet | grep -i b8:27:eb
$ arp -na | grep -i b8:27:eb
Comments