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

Lint & update factory-settings, min-sd, cp-sd, zip-sd + add zip-json-sd to generate .json snippets for Raspberry Pi Imager #199

Merged
merged 4 commits into from
Dec 6, 2021

Conversation

holta
Copy link
Member

@holta holta commented Dec 2, 2021

Ah well, as an aside min-sd and cp-sd still fail when an SD card sleeve is used (sleeves that allow a microSD to be inserted into a computer with a regular-sized SD slot).

As these sleeves generally lead to a partition name containing a 2-character suffix, as seen in this lsblk output:

mmcblk0     179:0    0  59.6G  0 disk
├─mmcblk0p1 179:1    0   256M  0 part
└─mmcblk0p2 179:2    0  59.4G  0 part

Whereas both scripts currently expect something like: (this is what arises when a typical USB card reader is used, instead of a sleeve)

sdb      8:16   1  59.6G  0 disk
├─sdb1   8:17   1   256M  0 part
└─sdb2   8:18   1  59.4G  0 part

Conclusion — the manual workaround is to manually hack both min-sd and cp-sd when using an SD card sleeve, on these lines...

...changing this...

DEVICE=${PARTITION:0:-1}

...to this...

DEVICE=${PARTITION:0:-2}

Related:

@holta holta changed the title Lint & update factory-settings, min-sd, cp-sd, zip-sd Lint & update factory-settings, min-sd, cp-sd, zip-sd + add zip-json-sd to generate .json snippets for Raspberry Pi Imager Dec 6, 2021
@jvonau
Copy link
Contributor

jvonau commented Dec 7, 2021

This is the same shortcomings pi-clone has when to it comes to writing a SD card image or loopback device, both use the p1 p2 for the partition naming causing pi-clone being only to write directly to the device, and not an image file as the partition naming is different.

@holta
Copy link
Member Author

holta commented Dec 7, 2021

This is the same shortcomings pi-clone has when to it comes to writing a SD card image or loopback device, both use the p1 p2 for the partition naming causing pi-clone being only to write directly to the device, and not an image file as the partition naming is different.

I did not know.

Thanks for pointing this out.

(Is there a ticket at https://github.com/raspberrypi-ui/piclone or https://github.com/nwright-mcc/piclone_cmd mentioning this possibly?)

Self-Reminder: Almost 2 years ago @georgejhunt fixed up piclone_cmd to work better on arm7l and aarch64:

@jvonau
Copy link
Contributor

jvonau commented Dec 7, 2021

raspberrypi-ui/piclone#7
raspberrypi-ui/piclone#8
raspberrypi-ui/piclone#23

Might be able adapt those in somewhere.

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

Successfully merging this pull request may close these issues.

2 participants