Canedje wrote:Thanks again for this help.
The image itself is to big to copy to my new SD card, missing some Mb's.
Is it also possible to connect a USB HD with the image on it to my RPI and use your programm?
If you USB HD is formatted NTFS then yes, it wont work if its FAT32 because FAT32 cant handle files bigger than 4Gb.
(note my SD card method worked because SD card was formatted RAW because I used my camera to format it, you cant use a flash drive because they are formatted FAT32.)
I have tested this on a USB HD and I have some advice before you try it.
1. don't use a HD which has any data already on it that you may want, best to use empty drive.
2. if you can re-partition the drive so you have a smaller drive ( twice the size of the file you are wanting to shrink ) and format it NTFS now this is not strictly necessary but if you are using a big HD it will take ages to run the program especially as you are accessing it over USB.
3. make sure the drive name has no spaces in it ( you can change this on windows pc using properties by right click on drive in question in my computer.)
4. rename the image file to some thing simple ( I.E clone.img) while the drive is connected to windows pc.
5. when you come to run the program you will find the USB HD is mounted under its own name so you need to change the path to the file remember I said you can get the full path from file manager. ( I.E /media/pi/HD because my drive was named HD )
Hope this helps.
Edit.
Been doing some more testing , found shrunk image will boot but cant expand it to use full SD card. raspi-config reports its not an SD card ? now this may be because HD was formatted NTFS or it may be because my psu is only 2A and kept getting low power warning which may have corrupted image. will try again when my replacement 2.5A psu arrives.