Closed kevinzezel closed 1 year ago
can you show the output of running this command:
parted myimg.img unit B print
Same problem here:
> parted sdcard.img unit B print
Error: Can't have a partition outside the disk!
How did you take the image of your sdcard
Tried dd, now I make a copy using ddrescue. Stay tuned.
@Drewsif same problem. root@edge-device:~# sudo pishrink.sh bb/rpi.img bb/rpi-shk.img pishrink.sh v0.1.4 pishrink.sh: Copying bb/rpi.img to bb/rpi-shk.img... ...
pishrink.sh: Gathering data ... Error: /root/bb/rpi-shk.img: unrecognised disk label pishrink.sh: ERROR occurred in line 288: parted failed with rc 1 pishrink.sh: Possibly invalid image. Run 'parted bb/rpi-shk.img unit B print' manually to investigate ...
root@edge-device:~# parted bb/rpi.img unit B print Error: /root/bb/rpi.img: unrecognised disk label Model: (file) Disk /root/bb/rpi.img: 4294966784B Sector size (logical/physical): 512B/512B Partition Table: unknown Disk Flags:
@robertoschwald have you resolved? @Drewsif how to fix?
it mean your image bad, simple fix error parted sdcard.img unit B print
throw.
For Error: Can't have a partition outside the disk!
just correct sectors then try pishrink again.
fdisk -l -u=sectors sdcard.img
# result
Disk sdcard.img: 1.84 GiB, 1975517696 bytes, 3858433 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: 0x3a3113ee
Device Boot Start End Sectors Size Id Type
sdcard.img1 * 2048 34815 32768 16M 83 Linux
sdcard.img2 34816 3862527 3827712 1.8G 83 Linux
Total sectors (3858433) should equal End of last device (3862527) +1
But 3858433 != 3862527 + 1
so missing 3862527 + 1 - 3858433 = 4095 sectors
dd if=/dev/zero bs=512 count=4095 >> sdcard.img
parted sdcard.img unit B print
# should work without any errors
Hi,
I got this error:
Regards, Kevin