WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: how to compile my kernel? and converting tinycore initrd to traditional rootfs?  (Read 255 times)

Offline youxiaojie

  • Newbie
  • *
  • Posts: 5
dear fried,I hope to using tinycore on 486, is there way to compile kernel and turn core.gz as traditional rootfs on harddisk? the factory method is to load core.gz as initrd, so if run with 64M mem, factory kernel ok but no initrd.
« Last Edit: December 01, 2025, 04:17:41 AM by youxiaojie »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15344
You could try searching these forums on "scatter mode".

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12341
Hi youxiaojie
If it helps, this thread includes instructions on how to reduce the
size of core.gz:
https://forum.tinycorelinux.net/index.php/topic,27458.0.html

Offline youxiaojie

  • Newbie
  • *
  • Posts: 5
You could try searching these forums on "scatter mode".
I see the post, ungz using cpio to recover. does initrd/initramfs readonly or readwritable? if readonly, why usingsquashfs root file as routers did?

Offline youxiaojie

  • Newbie
  • *
  • Posts: 5
Hi youxiaojie
If it helps, this thread includes instructions on how to reduce the
size of core.gz:
https://forum.tinycorelinux.net/index.php/topic,27458.0.html

thanks.I once compiled most minimum kernel of 6.xx can run in 32MB deselect many many configs.smp and cpu bug fix... by make tinyconfig

Offline linic

  • Newbie
  • *
  • Posts: 38
Hi youxiaojie,
Quote
I once compiled most minimum kernel of 6.xx can run in 32MB deselect many many configs.smp and cpu bug fix... by make tinyconfig
If you are interested in compiling your kernel with less options than the default kernel, I'm doing it for PII (so 686) here https://github.com/linic/tcl-core-560z

For 486, you'll have to modify the scripts a bit. This post will be useful https://forum.tinycorelinux.net/index.php/topic,27623.msg178627.html#msg178627

Also, if you don't have docker, you don't necessarily need it as you can run the scripts called in https://github.com/linic/tcl-core-560z/blob/main/Dockerfile.edit-config and in https://github.com/linic/tcl-core-560z/blob/main/Dockerfile to edit your config and compile your kernel. You'll have to do some reasearch and trial and error. It may take you time.

If you are time constrained, you should still check about trimming core.gz as Rich suggested.
Quote
If it helps, this thread includes instructions on how to reduce the
size of core.gz:
https://forum.tinycorelinux.net/index.php/topic,27458.0.html
I had added an option in my git repo based on Rich's answer. I haven't run it since some time though... https://github.com/linic/tcl-core-560z/blob/main/Dockerfile.trim
« Last Edit: December 01, 2025, 10:43:39 AM by linic »

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 395
I built a smaller kernel for TC16 with things like SMP, ACPI, and NFS support disabled and it boots fine on a 486 laptop with 16MB RAM.

Replace vmlinuz with that after unpacking core.gz to a partition (I use an ext2 filesystem since it's simpler than ext3/4 so maybe uses the least RAM). Depending on how much RAM you have the normal tc-config might work OK, but if it's taking an eternity to boot even with the smaller kernel, try replacing /etc/init.d/tc-config with this really stripped down version I made. It just does the bare minimum to get things started. Uncomment the "#/sbin/udevadm trigger --action=add 2>&1 >/dev/null &" line to enable loading drivers during start up, I run that manually after it's started up. I also set up /etc/fstab manually before booting.

I use LOADLIN to boot TCL from MSDOS.