PiShrink not working with Home Assistant
Hi,
PiShrink does not work properly with Home Assistant (Hassio). It does the shrink without complaining (via Windows Subsystem for Linux - 5.10.16.3-microsoft-standard-WSL2) , but the momemt I write the shrunk image to SD card on Win 10 using Balena Etcher (or Win32DiskImager), the resulting SD card does not work.
A interesting side-effect to this is that the SD card maps to a handfull of drive letters on Windows 10, instead of the usual 2 drive letters.
Can this issue perhaps be looked into? It would be greatly appreciated.
An additional piece of information:
This might be realated to the fact that there seems to be multiple logical parts within the image file: sudo mount -t drvfs -o noatime,uid=0,gid=0 'W:' /mnt/w
sudo fdisk -l /mnt/w/Home_Assistant_Working.img
Device Start End Sectors Size Type /mnt/w/Home_Assistant_Working.img1 2048 67583 65536 32M Microsoft reserved /mnt/w/Home_Assistant_Working.img2 67584 116735 49152 24M Linux filesystem /mnt/w/Home_Assistant_Working.img3 116736 641023 524288 256M Linux filesystem /mnt/w/Home_Assistant_Working.img4 641024 690175 49152 24M Linux filesystem /mnt/w/Home_Assistant_Working.img5 690176 1214463 524288 256M Linux filesystem /mnt/w/Home_Assistant_Working.img6 1214464 1230847 16384 8M Linux filesystem /mnt/w/Home_Assistant_Working.img7 1230848 1427455 196608 96M Linux filesystem /mnt/w/Home_Assistant_Working.img8 1427456 124735454 123307999 58.8G Linux filesystem
I have the same problem. In fact I thought it had trashed the SD card as it wouldn't even mount back on the PC I had written it on - but it did on another, and you could see all these partitions, and it mounted correctly. No working boot partition though. This is when writing it on a WSL 2 UBUNTU, which completes with no errors.
I have problems writing on another Pi too - telling me it won't autoexpand due to missing /etc - but that's another issue. That won't boot either, "firmware not found". Shame though as pishrink was invaluable for helping me use a different SD card on a number of occasions.
Happy to provide any necessary assistance to debug this.
EDIT: On the WSL2 UBUNTU I shrunk a non Home Assistant image, and although I didn't notice the message about autoexpand won't work, at startup I got the console message "rc-local.service: Service has no ExecStart=, ExecStop". It did boot but did not expand. This was an image from a working Pi3.
Can you post the output of the script when you run it?