Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 747 Bytes

shrink-iso.md

File metadata and controls

32 lines (23 loc) · 747 Bytes

Shrink your ISO

Shrink it

  1. Mount the image using another Linux (a Raspberry Pi works).

  2. Find the name of the device using sudo fdisk -l (in our case it's /dev/sda)

  3. Resize the filesystem

    • sudo e2fsck -f /dev/sda2
    • sudo resize2fs /dev/sda2 3400M
  4. Resize the partition (it must be larger than the file system):

    sudo parted /dev/sda resizepart 2 3450M

Expand it on first boot

  1. Boot on the card freshly shrinked.

  2. Run raspi-config to expand the partition:

    sudo raspi-config --expand-rootfs
  3. Halt the system

Make an image file

Copy the image using dd and count:

sudo dd bs=1m count=3500 if=/dev/rdisk2 of=$(date +%F)-poppy-ergo-jr.img