WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved]: how to boot alternate kernel of same architecture  (Read 2867 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1461
Re: [Solved]: how to boot alternate kernel of same architecture
« Reply #15 on: October 07, 2024, 10:45:57 PM »
In summary, to use a different distro's kernel in TCL (assuming same architecture and alien glib version =< TCL glib version):

1. change alien kernel's filename to vmlinuz64 (or vmlinuz) and put it in TCL's boot directory
2. add the entire /lib/modules/<alien_kernel_version> directory to corepure64.gz (or core.gz) (warning: massive bloat)
3. add modprobe -a squashfs zram ext4 sd_mod ahci (assuming you use ext4) to top of /etc/init.d/tc-config in corepure64.gz (or core.gz)
4. $ sed -i '/KERNEL/ d' /etc/sysconfig/tcedir/optional/*.dep

Again, I do not run any TCL machines like this and do not recommend this setup. It was just a fun hacking exercise.
« Last Edit: October 07, 2024, 11:03:14 PM by GNUser »

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1232
Re: [Solved]: how to boot alternate kernel of same architecture
« Reply #16 on: October 08, 2024, 08:26:35 AM »
If you take the alien kernel modules and run https://github.com/tinycorelinux/sorter on it, you can separate thing into the -KERNEL.tcz extensions.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1461
Re: [Solved]: how to boot alternate kernel of same architecture
« Reply #17 on: October 08, 2024, 08:39:05 AM »
Thanks for the tip, Paul. Good to know--that's much better than the kludge in step #4 of my summary.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1461
Re: [Solved]: how to boot alternate kernel of same architecture
« Reply #18 on: October 08, 2024, 09:26:11 AM »
Just a quick follow-up: With Paul_123's solution all the sorted modules can be moved out of the rootfs, of course.

Another alternative is to keep step 2 (i.e., all alien kernel modules go into the bloated rootfs) but change step 4: Instead of editing .dep files, create dummy extensions (wireless-5.10.0-9-amd64.tcz, graphics-5.10.0-9-amd64.tcz, etc.) and place them into tce/optional just to satisfy dependencies.

Ok, time to put my system back together. Vanilla TCL is the best.