- Muchas notas - Fran Acién

20240307 - Resize img file with gparted

I have the image file from insightsat that I would like to shrink. The steps are:

  1. sudo losetup --find --partscan OBC_backup_20231015.img
  2. Then look for the number of the loop: lsblk
  3. Abre el loop con gparted sudo gparted /dev/loop25
  4. Escribelo en una image dd if=/dev/loop25 of=test.img
  5. Mira hasta donde es el ultimo bloque: fdisk -l -u test.img
  6. Corrige el bloque que no está en su sitio: dd if=test.img of=anotherTest.img count=13471743