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 not working with Home Assistant #238

Open
EtienneStieger opened this issue Jun 20, 2022 · 3 comments
Open

PiShrink not working with Home Assistant #238

EtienneStieger opened this issue Jun 20, 2022 · 3 comments

Comments

@EtienneStieger
Copy link

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.

@EtienneStieger
Copy link
Author

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

@GeoffMorg
Copy link

GeoffMorg commented Jun 26, 2022

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.

@Drewsif
Copy link
Owner

Drewsif commented Feb 7, 2023

Can you post the output of the script when you run it?

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

3 participants