Is there a way to bypass disk restore limit

Solution 1:

Truncate image file

Removes unwanted space from end of image file so image fits on smaller drive when flashed

Input

ubuntu@ubuntu:~$ cd /media/ubuntu/DATA/
ubuntu@ubuntu:/media/ubuntu/DATA$ fdisk -l DiskImageofsdd.img

Output

Disk DiskImageofsdd.img: 28.66 GiB, 30752636928 bytes, 60063744 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: gpt
Disk identifier: 82741D01-6511-4A8A-8FDF-52D8C165C178

Device                 Start      End  Sectors   Size Type
DiskImageofsdd.img1     1953     3906     1954   977K BIOS boot
DiskImageofsdd.img2     3907   503906   500000 244.1M EFI System
DiskImageofsdd.img3   505856 44578815 44072960    21G Linux filesystem
DiskImageofsdd.img4 44578816 60061695 15482880   7.4G Microsoft basic data

Input (Removes Microsoft basic data partition).

ubuntu@ubuntu:/media/ubuntu/DATA$ truncate --size=$[(44578815+1)*512] NewDiskImageofsdd.img