General TC > General TC Talk

[Solved]: how to boot alternate kernel of same architecture

<< < (3/4) > >>

nick65go:
@GNUser: in your bad_boot.jpg picture, it seams that "udev daemon.. Done", so the new-kernel all built-ins modules passed. But, as curaga said, if the squashfs is not loaded then no other tcz can load.

Maybe now you understand my pseudo-obsession with http://landley.net/toybox/about.html
Because a statically linked shell (busybox, toybox) does not need a "libc" and will let you to boot in a prompter with just two pieces: kernel (+modules), and a shell. And THEN a simple init script can automate the rest (like TC does).

My suggestion is to temporary REPLACE the original busybox from tinycore with a statically linked one (but full options included). So you pass the initial busybox (modprobe, mount, etc). THIS is what I did in similar cases to replace default TC kernel. Good luck.

GNUser:

--- Quote from: nick65go on January 14, 2023, 05:18:34 AM ---My suggestion is to temporary REPLACE the original busybox from tinycore with a statically linked one (but full options included). So you pass the initial busybox (modprobe, mount, etc). THIS is what I did in similar cases to replace default TC kernel. Good luck.

--- End quote ---
Hi, nick65go. Busybox is part of the base system. Since base system also contains the libraries that busybox needs, I don't think this is the problem. That being said, it doesn't hurt to try a statically-linked busybox binary. I'll give it a shot when I have time.


--- Quote from: curaga on January 14, 2023, 02:33:23 AM ---There are a number of config options that may cause that. E.g. not having squashfs would mean extensions won't load. A hang at that point may be related to one of the config options that affect udev operation.

--- End quote ---
Thank you, curaga. I strongly suspect that this is the problem. Wish I had thought of that ;) TCL boot process assumes the kernel was compiled with certain config options. Among them, there are some config options which other distros would have no reason to enable (e.g., squashfs to load extensions).

This thread can be marked as "solved". The point was to figure out why the experiment was not working and I think now I know why.

Rich:
Hi GNUser

--- Quote from: GNUser on January 14, 2023, 09:26:50 AM --- ... This thread can be marked as "solved". ...
--- End quote ---
Done.  :)

curaga:
If there was any problem with busybox's libs, you wouldn't see any of the normal boot messages.

GNUser:

--- Quote from: GNUser on January 13, 2023, 01:28:07 PM ---FYI - This is just a learning exercise. There is no problem I'm trying to solve other than my ignorance.

I'm on TCL13.1 x86_64, using grub2, on a laptop with legacy BIOS. It's my daily driver laptop and everything works great.

As an experiment, I took the 64-bit linux kernel image from Devuan Chimaera (kernel version 5.10.0-9), renamed it vmlinuz64, and replaced TCL13.1's kernel image with it. I then remastered corepure64.gz to include /lib/modules/5.10.0-9-amd64 (which I copied from a working Devuan system). Then I tried to boot this monster.

Boot process hangs indefinitely after the first few steps. I took a picture of the step where it hangs.

Any idea why the boot process is hanging and how to fix it?

--- End quote ---
Not that I would ever use or recommend this Frankenstein configuration, but I finally figured this out--just for fun. There were two missing pieces:

1. Adding modprobe to top of tc-config
Some essential modules that are built-in to the TCL linux need to be explicitly loaded when booting the alien kernel (because alien kernel was configured with  FOO=m  rather than  FOO=y  for each of these important modules). So the first missing piece is to add a  modprobe  command to the very top of
 /etc/init.d/tc-config  in the remastered corepure64.gz:


--- Code: ---#!/bin/busybox ash
modprobe -a squashfs zram ext4 sd_mod ahci

--- End code ---

2. Removing foo-KERNEL.tcz from dep files
So that all extensions in  onboot.lst  can load normally, a tweak to the .dep files is needed:

--- Code: ---$ cd /etc/sysconfig/tcedir/optional
$ sed -i '/KERNEL/d' *.dep

--- End code ---
Without this tweak, extensions that depend on  wireless-KERNEL.tcz  for example will not be able to load because  wireless-5.10.0-9-amd64.tcz  does not exist in tce/optional.

Again, this was just a learning exercise. Don't try this at home :)

Thread is solved.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version