guysoft / CustomPiOS

A Raspberry Pi and other ARM devices distribution builder
GNU General Public License v3.0
516 stars 150 forks source link

Action Build Error - initramfs-tools #237

Open lightumcc opened 5 days ago

lightumcc commented 5 days ago

What were you doing?

I forked a repository for some specific usage. When I finished setup everything and push to GitHub, the action starts to run.

What did you expect to happen?

Build Successfully and output build.img.gz

What happened instead?

Few days ago, I build it successfully and it use initramfs-tools (0.142+deb12u1), when I made some updates today, the GitHub Action start to use initramfs-tools (0.142+rpt1+deb12u1) and build failed. Both the success and fail log has been uploaded in the attachments.

Was there an error message displayed? What did it say?

Processing triggers for initramfs-tools (0.142+rpt1+deb12u1) ...
[2507](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2508)
update-initramfs: Generating /boot/initrd.img-6.6.51+rpt-rpi-v8
[2508](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2509)
mkinitramfs: MODULES dep requires mounted sysfs on /sys
[2509](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2510)
update-initramfs: failed for /boot/initrd.img-6.6.51+rpt-rpi-v8 with 1.
[2510](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2511)
dpkg: error processing package initramfs-tools (--configure):
[2511](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2512)
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
[2512](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2513)
Processing triggers for libgdk-pixbuf-2.0-0:armhf (2.42.10+dfsg-1+deb12u1) ...
[2513](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2514)
Processing triggers for libc-bin (2.36-9+rpt2+deb12u9) ...
[2514](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2515)
Processing triggers for dbus (1.14.10-1~deb12u1) ...
[2515](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2516)
Errors were encountered while processing:
[2516](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2517)
 initramfs-tools
[2517](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2518)
W: --force-yes is deprecated, use one of the options starting with --allow instead.
[2518](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2519)
E: Sub-process /usr/bin/dpkg returned an error code (1)
[2519](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2520)
++++ echo_red 'build failed, unmounting image...'
[2520](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2521)
++++ echo -e -n '\e[91m'
[2521](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2522)
++++ echo build failed, unmounting image...
[2522](https://github.com/CreatechStudio/VGORC-TM-DisplayOS/actions/runs/11929842708/job/33249442850#step:8:2523)
build failed, unmounting image...

Version of FullPageOS?

N/A

Screenshot(s) showing the problem:

N/A

If you are building FullPageOS - provide a build.log that is created for the build

Via attachments. Fail-0_build.txt Success-0_build.txt

guysoft commented 5 days ago

Hey, This is a CustomPiOS issue, not a FullPageOS issue, since fullpageos does not have initramfs. I transferred it to the CustomPiOS repo.

You should really use make_custom_pi_os not copy an existing repository.

The mounting is done here: https://github.com/guysoft/CustomPiOS/blob/devel/src/common.sh#L208

You can test adding there a bind mount to sysfs and see if that solves the issue.

You will need to fork CustomPiOS. and then clone+checkout the branch of your fork here i the github action:

    - name: Checkout CustomPiOS
      uses: actions/checkout@v2
      with:
        repository: 'lightumcc/CustomPiOS'
        path: CustomPiOS
        ref: Your_branch_name_here

https://github.com/guysoft/CustomPiOS/wiki/Building#quickstart---i-want-to-build-a-new-distro-using-docker (You could even use fullpageos as a remote module and have your stuff in a separate module, so it will not break on upgrades)

lightumcc commented 5 days ago

Thanks for the advice and I'm very sorry for the hassle. I am trying to migrate it to build from CustomPi OS. However, what I'm trying to express is that even if I don't change anything, building FullPage OS using GitHub Action in my fork alone causes this error, independent of whether FullPage OS uses initranmfs or not, and this error occurs in apt installation.

guysoft commented 5 days ago

If you have an error then please share it. I can't tell you what is the cause or fix if I don't know what error you get. As you can see the current devel branch builds fine on FullPageOS.

lightumcc commented 5 days ago

I created a fork of FullPage OS just now at lightumcc/FullPageOS and just run an Action cause the same error on initranmfs as the log I uploaded. I'm pretty sure if you manually trigger the action you will have the same result.

guysoft commented 5 days ago

Ok, You wrote:

However, what I'm trying to express is that even if I don't change anything, building FullPage OS using GitHub Action in my fork alone causes this error

But what you provided above does have an error because /sys is not mounted. And I told you how to fix that.

guysoft commented 4 days ago

Related: https://github.com/guysoft/CustomPiOS/pull/238

guysoft commented 4 days ago

Error comes from here: https://salsa.debian.org/kernel-team/initramfs-tools/-/blob/master/hook-functions#L482

lightumcc commented 3 days ago

Related: #238

True, that is a helpful solution