Utilisation du tuto https://blog.f8asb.com/2020/02/09/comment-faire-une-image-reduite-de-votre-carte-sd/
sudo umount /home/pi/img/
sudo mount -t cifs -o username=philippe,password=xxxxxx //192.168.0.35/img /home/pi/img/
sudo modprobe loop
sudo losetup -f
sudo losetup /dev/loop0 img/xxxxxxxx.img
sudo partprobe /dev/loop0
Dans l’interface graphique, ouvrir le fichier /dev/loop0 avec Gparted
Réduire la partition ext4
Sortir de l’interface graphique
sudo losetup -d /dev/loop0
sudo fdisk -l img/xxxxxxxx.img

Disk rasp1_backup_20200727.img: 59.5 GiB, 63864569856 bytes, 124735488 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: 0x80eaa150
Device Boot Start End Sectors Size Id Type
rasp1_backup_20200727.img1 8192 532479 524288 256M c W95 FAT32 (LBA)
rasp1_backup_20200727.img2 532480 19783679 19251200 9.2G 83 Linux

sudo truncate --size=$[(19783679+1)*512] img/xxxxxxxx.img

Laisser un commentaire 0

Your email address will not be published. Required fields are marked *