Orangepi zero 2 supported bullseye cant update

Recommended Posts

Armbian monitor


Hello updating supported bullseye 4.9 orange pi zero 2 dont work, problem with libc6 because of kernel version. I tried hacking uname -r update was successful but wont boot anymore.


I use clean install with clean image from website :


dpkg: error processing archive /var/cache/apt/archives/libc6_2.31-13+deb11u2_arm64.deb (--unpack):

 new libc6:arm64 package pre-installation script subprocess returned error exit status 1

Errors were encountered while processing:


E: Sub-process /usr/bin/dpkg returned an error code (1)



apt --fix-broken install give me :


ERROR: Your kernel version indicates a revision number
of 255 or greater.  Glibc has a number of built in
assumptions that this revision number is less than 255.
If you\'ve built your own kernel, please make sure that any
custom version numbers are appended to the upstreamkernel number with a dash or some other delimiter.


Thanks for your work

Link to post
Share on other sites

Armbian is a community driven open source project. Do you like to contribute your code?

Ooooh, that's a good problem ...


So this apparently the part of the pre-install script that's killing your update. Which is as a result of glibc storing part of the Linux kernel via unsafe assumptions as part of kernel version comparison code.


if [ "$system" = "Linux" ]
        # Test to make sure z < 255, in x.y.z-n form of kernel version
        # Also make sure we don't trip on x.y.zFOO-n form
        kernel_rev=$(uname -r | sed 's/\([0-9]*\.\)\{1,2\}\([0-9]*\)\(.*\)/\2/')
        if [ "$kernel_rev" -ge 255 ]
            echo "ERROR: Your kernel version indicates a revision number"
            echo "of 255 or greater.  Glibc has a number of built in"
            echo "assumptions that this revision number is less than 255."
            echo "If you\'ve built your own kernel, please make sure that any"
            echo "custom version numbers are appended to the upstream"
            echo "kernel number with a dash or some other delimiter."
            exit 1


Presumably, this script is only run on update of the libc6 package. You might be able to downgrade your kernel from 4.9.280 to 4.9.255, reboot, and then resume your update?


Another person suggested a slightly more hacky approach HERE, but apparently this issue has been known for some time. Also looks like the patch level is being deliberately applied via build system. Might be worth submitting a bug report? Perhaps @Igor knows more here?

Link to post
Share on other sites

Hello thanks for your reply. I tried to Switch kernel with armbian-config but it always fail dunno why, it is a clean install with last supported image Bullseye from website. I found a hack to install libc6 is basically edit uname -r script and echo Fake kernel version like 4.9.250. installation could go on but my orange pi zero 2 wont boot anymore i Guess its another problem. Im rather noob with all this stuff so i dont really know what happen. Have a nice day


Link to post
Share on other sites

Another option is to hack libc6, and just straight up remove that check. You won't be running a signed package, but you should be able to install the package, regardless of your kernel version.


~ $ mkdir -p work/libc-hack/DEBIAN
~ $ cd work
work $ apt-get download libc6
work $ dpkg -x libc6_2.31-0ubuntu9.2_arm64.deb libc-hack
work $ dpkg -e libc6_2.31-0ubuntu9.2_arm64.deb libc-hack/DEBIAN

< open up unpack/DEBIAN/preinst with a text editor and remove/comment that "exit 1" (line ~149), save >

work $ fakeroot dpkg-deb --build libc-hack
dpkg-deb: building package 'libc6' in 'libc-hack.deb'.
work $ sudo dpkg -i libc-hack.deb


The most correct fix is renumber the kernel version with the last number 255 or less. But unless it starts using debian epoch numbering (ie - 1:linux-image-4.9.XX), upgrading from 4.9.280 without the last number going above 255 is going to be hard.


It's kind of a kernel bug, but really a glibc problem. Ultimately, it's Armbian kernel problem, falling on whomever is maintaining that kernel version, and how they want to best tackle that problem.


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.