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

We should not use hardcoded partition numbers #13

Open
lmbarros opened this issue Nov 26, 2021 · 5 comments
Open

We should not use hardcoded partition numbers #13

lmbarros opened this issue Nov 26, 2021 · 5 comments

Comments

@lmbarros
Copy link

Some of our images have a different partition layout, so those hardcoded p1 and p2 in the script will fail with, e.g., RockPi flasher images.

Ideally, we should be using https://github.com/balena-io-modules/balena-image-fs to get the embedded image (instead of implementing a different solution here).

@jellyfish-bot
Copy link

[lmbarros] This issue has attached support thread https://jel.ly.fish/2c2897d3-0659-4045-b8e4-6c4e8d1c82f1

@20k-ultra
Copy link

Is this issue related to #11 ?

@lmbarros
Copy link
Author

Hi @20k-ultra. I am not super familiar with these tools, but yeah, sure looks like it is!

@jellyfish-bot
Copy link

[pdcastro] This issue has attached support thread https://jel.ly.fish/0cd5268c-16dc-4c66-a2d8-560a4790dbd1

@pdcastro
Copy link

Workaround for the Rock Pi 4B balenaOS flasher image partition layout:

After cloning this repo, edit the balena-image-flasher-unwrap script and replace all occurrences of "p1" and "p2" with "p4" and "p5". There should be 4 lines to be changed, as per following diff:

-mount "${balena_image_flasher_loop_dev}p1" "$balena_image_flasher_boot_mnt" > /dev/null 2>&1
+mount "${balena_image_flasher_loop_dev}p4" "$balena_image_flasher_boot_mnt" > /dev/null 2>&1

-mount "${balena_image_flasher_loop_dev}p2" "$balena_image_flasher_root_mnt" > /dev/null 2>&1
+mount "${balena_image_flasher_loop_dev}p5" "$balena_image_flasher_root_mnt" > /dev/null 2>&1

-mount "${balena_image_loop_dev}p1" "$balena_image_boot_mnt"
+mount "${balena_image_loop_dev}p4" "$balena_image_boot_mnt"

-mount "${balena_image_loop_dev}p2" "$balena_image_root_mnt"
+mount "${balena_image_loop_dev}p5" "$balena_image_root_mnt"

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

4 participants