Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pishrink reports 'ERROR: Image already shrunk to smallest size' #49

Closed
kle99 opened this issue Feb 7, 2018 · 1 comment
Closed

pishrink reports 'ERROR: Image already shrunk to smallest size' #49

kle99 opened this issue Feb 7, 2018 · 1 comment

Comments

@kle99
Copy link

kle99 commented Feb 7, 2018

Win32DiskImager reads SD-Card-Images to File. The image file is as large as the SD-Card.

History: I installed some packages and forgot to expand the filesystem.
pishrink reports error 'Image already shrunk to smallest size' but the file size is 8GB.
Problem: the image size is smaller than the file size.

pishrink runs on host raspberrypi5, raspi model RPi 3B.
SD-Card of the image is plugged in host raspberrypi4, raspi model 2B.

pishrink console output:
root@raspberrypi5:~# ./pishrink.sh /mnt/ntfs/pishrink/2018-02-06-jessie-3.5-adafruit-peppy--2016-11-08-pitft-35r.img /mnt/ntfs/pishrink/2018-02-06-jessie-3.5-adafruit-peppy--2016-11-08-pitft-35r-pishrink.img
Copying /mnt/ntfs/pishrink/2018-02-06-jessie-3.5-adafruit-peppy--2016-11-08-pitft-35r.img to /mnt/ntfs/pishrink/2018-02-06-jessie-3.5-adafruit-peppy--2016-11-08-pitft-35r-pishrink.img...
Creating new /etc/rc.local
/dev/loop0: 143409/391680 files (0.1% non-contiguous), 1125611/1552816 blocks
resize2fs 1.42.12 (29-Aug-2014)
ERROR: Image already shrunk to smallest size

but file size is larger than the image size:
root@raspberrypi5:~# ls -l /mnt/ntfs/pishrink/*img
-rwxrwxrwx 2 pi pi 7994972160 Feb 6 11:48 /mnt/ntfs/pishrink/2018-02-06-jessie-3.5-adafruit-peppy--2016-11-08-pitft-35r.img
-rwxrwxrwx 1 pi pi 7994972160 Feb 7 14:03 /mnt/ntfs/pishrink/2018-02-06-jessie-3.5-adafruit-peppy--2016-11-08-pitft-35r-pishrink.img

Linux command parted reports:
root@raspberrypi5:~# parted -s /mnt/ntfs/pishrink/2018-02-06-jessie-3.5-adafruit-peppy--2016-11-08-pitft-35r-pishrink.img print
Model: (file)
Disk /mnt/ntfs/pishrink/2018-02-06-jessie-3.5-adafruit-peppy--2016-11-08-pitft-35r-pishrink.img: 7995MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 4194kB 70.3MB 66.1MB primary fat16 lba
2 70.3MB 6431MB 6360MB primary ext4

Disk file size is 7995MB
Partition End is 6431MB

@Drewsif
Copy link
Owner

Drewsif commented Jun 17, 2020

Closing as a duplicate of #80. Looking into it though

@Drewsif Drewsif closed this as completed Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants