WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: init (error -26) with Core 15.0  (Read 543 times)

Offline linic

  • Newbie
  • *
  • Posts: 23
init (error -26) with Core 15.0
« on: December 23, 2024, 03:37:35 PM »
With Core 15.0, init fails with error code -26 on by IBM 560Z (Pentium II, 64 MB of RAM). I have a working Core 14.0 frugal install on it which works very well.

Just for testing, I tried this:
Code: [Select]
0. boot my frugal Core 14.0 install like I usually do.
1. wget the new version of core.iso in /home/tc/
2. mkdir c15 && mount core.iso c15/
3. mount /dev/sda1 (this is where my /tce/boot/ is)
4. sudo mkdir /mnt/sda1/tce/boot/c15
5. cp /home/tc/c15/boot/core.gz /mnt/sda1/tce/boot/c15/core15.gz
6. cp /home/tc/c15/boot/vmlinuz /mnt/sda1/tce/boot/c15/vmlinuz15

Then, I edited /mnt/sda1/tce/boot/extlinux/extlinux.conf to add the following

Code: [Select]
LABEL core15
KERNEL /tce/boot/c15/vmlinuz15
INITRD /tce/boot/c15/core15.gz
APPEND vga=789 base norestore syslog showapps nozswap

vmlinuz15 and core15.gz get loaded and the boot process starts until it fails with:

Code: [Select]
Run /init as init process
Failed to execute /init (error -26)
Run /sbin/init as init process
Starting init: /sbin/init exists but couldn't execute it (error -26)
Run /etc/init as init process
Run /bin/init as init process
Run /bin/sh as init process
Starting init: /bin/sh exists but couldn't execute it (error -26)
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
Kernel Offset: disabled
Rebooting in 60 seconds..

I tried the same thing with Core 14.0 by copying the core.gz and the vmlinuz in /mnt/sda1/tce/boot/c14/core14.gz and /mnt/sda1/tce/boot/c14/vmlinuz14 and added the following to /mnt/sda1/tce/boot/extlinux/extlinux.conf

Code: [Select]
LABEL core14
KERNEL /tce/boot/c14/vmlinuz14
INITRD /tce/boot/c14/core14.gz
APPEND vga=789 base norestore syslog showapps nozswap

This works well.

Before going deeper into this rabbit hole, does anyone know why I'm getting error -26 only with Core 15.0? Thank you!

    [Edit]: Added code tags.  Rich
« Last Edit: December 23, 2024, 05:27:11 PM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11718
Re: init (error -26) with Core 15.0
« Reply #1 on: December 23, 2024, 05:27:57 PM »
Hi linic
Please use  Code Tags  when posting commands and responses seen in a terminal. To use  Code Tags  click on the  #  icon
above the reply box and paste your text between the  Code Tags  as shown in this example:

Quote
[code][   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]

It will appear like this in your post:
Code: [Select]
[   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517

Code Tags  serve as visual markers between what you are trying to say and the information you are posting. They also preserve
spacing so column aligned data displays properly. Code tags also automatically add horizontal and or vertical scrollbars
to accommodate long lines and listings.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11718
Re: init (error -26) with Core 15.0
« Reply #2 on: December 23, 2024, 05:30:21 PM »
Hi linic
Maybe you are running out of RAM?

Just a thought, try adding a small (64Meg) swap partition to your device.

Offline linic

  • Newbie
  • *
  • Posts: 23
Re: init (error -26) with Core 15.0
« Reply #3 on: December 24, 2024, 06:50:55 AM »
Hi Rich,

Thanks for responding so quickly! I'll use the Code Tags from now on.

About, the swap partition, I have one of 3145724k. Here's an excerpt of the logs which print on the screen at
boot up for 14.0:

Code: [Select]
[...]
fb0: VESA VGA frame buffer device
ccp_crypto: Cannot load: there are no available CC
Driver for HIFM 795x crypto accelerator chip has been successfully registered.
hid: raw HID events driver (C) Jiri Kosina
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usb 1-1: new full-speed USB device number 2 using uhci_hcd
ipip: IPv4 amd MPLS over IPv4 tunneling driver
initializing XFRM netlink socket
MET: Registered PF_PACKET protocol family
Key type dns_resolver registered
microcode: sig=0x652, pf=0x2, revision=0x2c
microcode: Microcode Update Driver: v2.2
IPI shorthand broadcast: enabled
registered taskstats version 1
Key type .fscrypt registered
Key type fscrypt-provisioning registered
Key type encrypted registered
Freeing unused kernel image (initmem) memory: 732K
Write protecting kernel text and read-only data: 8500k
Run /init as init process
init started: BusyBox v1.36.0 (2023-01-17 10:14:32 UTC)
[...screen clears out...]
Booting Core 14.0
Running Linux Kernel 6.1.2-tinycore
[...]
Adding 3145724k swap on /dev/sda2. Priority:-2 extents:1 accross:3145724k SS
Possible swap partition(s) enabled.

With 15.0, I get:

Code: [Select]
[...]
MET: Registered PF_PACKET protocol family
Key type dns_resolver registered
microcode: Microcode Update Driver: v2.2
IPI shorthand broadcast: enabled
registered taskstats version 1
Key type .fscrypt registered
Key type fscrypt-provisioning registered
Key type encrypted registered
Freeing unused kernel image (initmem) memory: 772K
Write protecting kernel text and read-only data: 8780k
Run /init as init process
Failed to execute /init (error -26)
Run /sbin/init as init process
Starting init: /sbin/init exists but couldn't execute it (error -26)
Run /etc/init as init process
Run /bin/init as init process
Run /bin/sh as init process
Starting init: /bin/sh exists but couldn't execute it (error -26)
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
Kernel Offset: disabled
Rebooting in 60 seconds..

It looks like swap is only loaded when init and BusyBox have started.

Interestingly I was able to boot using this entry

Code: [Select]
LABEL vmlinuz15withcore14
KERNEL /tce/boot/c15/vmlinuz15
INITRD /tce/boot/c14/core14.gz
APPEND vga=789 base norestore syslog showapps nozswap

and I get:

Code: [Select]
[...]
MET: Registered PF_PACKET protocol family
Key type dns_resolver registered
microcode: Microcode Update Driver: v2.2
IPI shorthand broadcast: enabled
registered taskstats version 1
Key type .fscrypt registered
Key type fscrypt-provisioning registered
Key type encrypted registered
clk: Disabling unused clocks
Freeing unused kernel image (initmem) memory: 772K
Write protecting kernel text and read-only data: 8780k
Run /init as init process
init started: BusyBox v1.36.0 (2023-01-17 10:14:32 UTC)
[...screen clears out...]
Booting Core 14.0
Running Linux Kernel 6.6.8-tinycore
[...]
Adding 3145724k swap on /dev/sda2. Priority:-2 extents:1 accross:3145724k SS
Possible swap partition(s) enabled.

Does /init comes from BusyBox? Since swapping the core.gz makes init work, it looks like my issue comes from the version of BusyBox which comes with 15.0.

Additionaly, I searched for error -26 and it looks like it is ETXTBSY and happens when something writes to a file that is being executed (https://lwn.net/Articles/866493/). I don't understand which file init would be modifying which is also being executed. init is the first process and the parent of all other processes. Would it be trying to modify itself after it has started execution? Could another possibility maybe be that error -26 is not accurate and the new init has an insctruction that the CPU doesn't support and this fails in a weird way returning error -26?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14852
Re: init (error -26) with Core 15.0
« Reply #4 on: December 24, 2024, 07:09:09 AM »
/sbin/init is provided by busybox, but looks like it is called by /init, which is a script.

You could try replacing /bin/busybox in tc-15.x by the one in tc-14 to confirm if busybox is the problem or not?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11718
Re: init (error -26) with Core 15.0
« Reply #5 on: December 24, 2024, 10:07:23 AM »
Hi linic
I did a little experimenting.

I added a Core15 entry on one of my machines with your boot codes.
The machine booted up fine.

Then I decided to make the machine look a little more like yours and
added the boot code:
Code: [Select]
mem=64MThis time I got the same /init (error -26) errors as you did.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11718
Re: init (error -26) with Core 15.0
« Reply #6 on: December 24, 2024, 10:56:24 AM »
Hi linic
I tried a few more things.

When I increased the memory by 8Meg:
Code: [Select]
mem=72Mit no longer got  /init errors. It did eventually stop with
an out of memory error.

I then added the boot code:
Code: [Select]
udev.children-max=1Found here:
https://forum.tinycorelinux.net/index.php/topic,24886.msg158364.html#msg158364
That got me to a command prompt.

But lowering the other boot code back to:
Code: [Select]
mem=64Mcaused the /init errors to return.

So it looks like you're right on the edge memory wise.

Offline linic

  • Newbie
  • *
  • Posts: 23
Re: init (error -26) with Core 15.0
« Reply #7 on: December 25, 2024, 08:10:03 AM »
Hi Rich,

Thanks for checking that! You're awesome! Thanks for the boot codes. I didn't know about them. Looks like I was lucky using 14.0 initially which requires a little less RAM.

Have an awesome 25th of December!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11718
Re: init (error -26) with Core 15.0
« Reply #8 on: December 25, 2024, 08:17:27 AM »
Hi linic
Sorry I couldn't give you any better news.

For future reference, here's where a list of kernel boot codes can be found:
https://www.mjmwired.net/kernel/Documentation/kernel-parameters.txt

Online patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 726
Re: init (error -26) with Core 15.0
« Reply #9 on: December 25, 2024, 05:03:13 PM »
And to the boot codes for tc you have them here:

https://distro.ibiblio.org/tinycorelinux/faq.html#bootcodes

Offline mocore

  • Hero Member
  • *****
  • Posts: 687
  • ~.~

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11718
Re: init (error -26) with Core 15.0
« Reply #11 on: January 01, 2025, 01:48:15 AM »
Hi linic
Though it won't solve your problem, I did find something interesting.
Even though I allocated 72 Mbytes of RAM, free reports only 60 Mbytes present:
Code: [Select]
free -m
              total        used        free      shared  buff/cache   available
Mem:             60          10          22          20          27          26
Swap:             7           0           7

Looking through dmesg shows the missing 12 Mbytes used as a RAM disk:
Code: [Select]
    47.59M    59.76M    12.17M  RAMDISK: [mem 0x02f98000-0x03bc3fff]

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 301
Re: init (error -26) with Core 15.0
« Reply #12 on: January 01, 2025, 06:39:23 PM »
Though it won't solve your problem, I did find something interesting.
Even though I allocated 72 Mbytes of RAM, free reports only 60 Mbytes present:
Code: [Select]
free -m
              total        used        free      shared  buff/cache   available
Mem:             60          10          22          20          27          26
Swap:             7           0           7


Looking through dmesg shows the missing 12 Mbytes used as a RAM disk:
Code: [Select]
    47.59M    59.76M    12.17M  RAMDISK: [mem 0x02f98000-0x03bc3fff]

Interesting. I've always put this down to the size of the Linux kernel being subtracted from the total. But 0x03bc3fff - 0x02f98000 = 12,763,135 decimal so around the 12MB missing from the total.

The documentation for RAMDISK says it can be configured with the ramdisk_size= kernel parameter. Although I'm confused that only 4MB is missing from the 80MB physical RAM in my PC running Damn Small Linux (kernel 2.4.31) even though it's using the default 4096K block size:

Code: [Select]
free -m
             total       used       free     shared    buffers     cached
Mem:            76         61         14          0          3         35
-/+ buffers/cache:         22         54
Swap:          101          0        101

dmesg | grep RAMDISK
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

Does TCL reserve three 4MB RAMDISKs instead of one? But then DSL's dmesg says it's initialised 16! I'm confused. This might be something to play with when I have time to see if I can squeeze new TCL HDD installs on my i486 laptop more easily in its 16MB of RAM (TC15 was a really tight fit).
« Last Edit: January 01, 2025, 06:44:47 PM by CNK »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11718
Re: init (error -26) with Core 15.0
« Reply #13 on: January 01, 2025, 09:16:31 PM »
Hi CNK
...
Code: [Select]
----- Snip -----
dmesg | grep RAMDISK
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

 ... But then DSL's dmesg says it's initialised 16! I'm confused. ...
I suspect DSL probably created 16 devices (/dev/ram0 - /dev/ram15) each
capable of addressing 4 Mbytes, but hasn't allocated memory to them yet
because they are not currently in use.

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 301
Re: init (error -26) with Core 15.0
« Reply #14 on: January 01, 2025, 09:58:30 PM »
I suspect DSL probably created 16 devices (/dev/ram0 - /dev/ram15) each
capable of addressing 4 Mbytes, but hasn't allocated memory to them yet
because they are not currently in use.

That could be, but I'm not sure why TCL would be using any. According to this interesting description of the differences between ramdisk, ramfs, rootfs and initramfs, since kernel 2.6 ramdisk isn't used during boot, replaced by initramfs.

The default ramdisk size and number can be changed in the kernel configuration, and it seems TC15 x86 uses these values:
Code: [Select]
CONFIG_BLK_DEV_RAM_COUNT=8
CONFIG_BLK_DEV_RAM_SIZE=8192

So 8MB ramdisk block size instead of the standard 4MB. I'm still not clear on how or if that can subtract from available memory if the ramdisks aren't used though.