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

Fix for build error on aarch64 with ERROR in function check_loop_device #3831

Merged
merged 1 commit into from Jun 6, 2022

Conversation

iav
Copy link
Contributor

@iav iav commented May 27, 2022

Image building in ubuntu jammy on aarch64 platform breaks with diagnostic

[ o.k. ] Calling image customization script [ customize-image.sh ]
[ o.k. ] No longer needed packages [ purge ]
[ o.k. ] Unmounting [ /root/armbian/.tmp/rootfs-4a58bdb8-aac0-472d-8f05-0d11ef0816e8 ]
[ o.k. ] Preparing image file for rootfs [ odroidn2 jammy ]
[ o.k. ] Current rootfs size [ 1285 MiB ]
[ o.k. ] Creating blank image for rootfs [ 1612 MiB ]
[ o.k. ] Creating partitions [ root: ext4 ]
[ error ] ERROR in function check_loop_device [ main.sh:588 -> main.sh:549 -> debootstrap.sh:97 -> debootstrap.sh:658 -> image-helpers.sh:112 -> general.sh:0 ]
[ error ] Device node /dev/loop0p1 does not exist
[ o.k. ] Process terminated

I found there no /dev/loop0p1 devices for partitions after loop mounting. Only on aarch64. On x64 devices for partitions are present.
Then I found adding -P to losetup fixes it.

How Has This Been Tested?

  • [×] Build image for Rockpi-4a on Odroid-N2 Ubuntu Jammy, then boot Rockpi board from that image
  • [×] Build image for Rockpi-4a on x64 Ubuntu Jammy, then boot Rockpi board from that image

Checklist:

  • [×] My code follows the style guidelines of this project
  • [] I have performed a self-review of my own code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [×] My changes generate no new warnings
  • [] Any dependent changes have been merged and published in downstream modules

@iav iav added the Bugfix Pull request is fixing a bug label May 27, 2022
@iav iav requested a review from 150balbes June 5, 2022 13:49
@igorpecovnik igorpecovnik added the Ready to merge Reviewed, tested and ready for merge label Jun 6, 2022
@igorpecovnik igorpecovnik merged commit 8d16d9f into armbian:master Jun 6, 2022
@iav iav deleted the fix_partprobe_on_arm branch June 6, 2022 10:15
@150balbes
Copy link
Contributor

After adding this fix, I began to regularly get the problem (no device found) of assembling images on different ARM devices and on x86 devices, after canceling this fix, the error disappeared. Does anyone else encounter the appearance of a build error with this fix. ?

@igorpecovnik
Copy link
Member

Does it fail with error or silently?

@150balbes
Copy link
Contributor

With an error and a message is issued and the assembly is interrupted.

@dledford
Copy link

My builds started failing reliably a while back. I'm pretty sure it's this change. The image build process always fails with an error about a loop partition not existing. I'll try a new build with this backed out and update here whether or not it starts working again.

@dledford
Copy link

My build finally worked again with this change reverted.

@igorpecovnik
Copy link
Member

@iav reverting or ?

@iav
Copy link
Contributor Author

iav commented Jul 27, 2022

revert, please. will look for other solution.

@dledford
Copy link

I'm testing a fix that might work (I want to at least make sure it doesn't reintroduce any breakage).

dledford added a commit to dledford/build that referenced this pull request Jul 27, 2022
…oop_device (armbian#3831)"

This reverts commit 8d16d9f.

Signed-off-by: Doug Ledford <dledford@redhat.com>
dledford added a commit to dledford/build that referenced this pull request Jul 27, 2022
Signed-off-by: Doug Ledford <dledford@redhat.com>
@dledford
Copy link

My build completed with the above referenced commits. However, I can't say if it will fix the original poster's problem. Theoretically it should, and it's certainly more correct than what's in this pull request, but the original poster would need to try it and see.

@150balbes
Copy link
Contributor

My build completed with the above referenced commits. However, I can't say if it will fix the original poster's problem. Theoretically it should, and it's certainly more correct than what's in this pull request, but the original poster would need to try it and see.

I think we can add this fix and observe the behavior of the build, if there are problems, we can think about other options.

@iav
Copy link
Contributor Author

iav commented Jul 28, 2022

On my odroid build with 0fe46f3 causes

[ error ] ERROR in function check_loop_device [ main.sh:588 -> main.sh:549 -> debootstrap.sh:97 -> debootstrap.sh:670 -> image-helpers.sh:118 -> general.sh:0 ]
[ error ] Device node /dev/loop0p2 does not exist
[ o.k. ] Process terminated

@150balbes
Copy link
Contributor

I suggest the current PR that adds -P to roll back, because it causes a problem for several different people, which clearly indicates that it creates a problem. Continue searching for a solution to the problem.

On my odroid build with 0fe46f3 causes

[ error ] ERROR in function check_loop_device [ main.sh:588 -> main.sh:549 -> debootstrap.sh:97 -> debootstrap.sh:670 -> image-helpers.sh:118 -> general.sh:0 ]
[ error ] Device node /dev/loop0p2 does not exist
[ o.k. ] Process terminated

I think this is your local problem, no one has had similar problems before, and after that PR, on the contrary, they appeared in different people. I may be wrong, but it may be related to errors in your system (problems with the file system, lack of free space, outdated packages, etc.).

igorpecovnik added a commit that referenced this pull request Jul 29, 2022
igorpecovnik added a commit that referenced this pull request Jul 29, 2022
smlinux pushed a commit to smlinux/armbian-tanix-tx6 that referenced this pull request Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Pull request is fixing a bug Ready to merge Reviewed, tested and ready for merge
Development

Successfully merging this pull request may close these issues.

None yet

4 participants