WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: LXD container image for TCL  (Read 3227 times)

Offline Dweller

  • Newbie
  • *
  • Posts: 3
LXD container image for TCL
« on: October 12, 2020, 09:50:50 AM »
Hi there, am relatively new to Tony Core Linux but love the small size and the tcz file concepts.   I expect I'm still not quite off mount stupid in terms of learning curve yet ;-).

I've also recently been playing with LXD 4.5 (Linux containers) which are a linux ightweight container mechanism build around cgroups which allow multiple versions of Linux distro's to hare the same kernel.    Very quick and I love the fact that the images are very small (Squashfs).    Minimal Ubuntu 20.04 is only 40bm for LXD.

However I was wondering if TCL could work within this environment..  So really my question is how custom is the TCL Kernel and would it be happy using say a ubuntu kernel behind the scenes and is it possible to kick start the mounting process of the tcz files which I assume are done at boot time normally.

Thanks in advance

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: LXD container image for TCL
« Reply #1 on: October 12, 2020, 11:35:35 AM »
Hi Dweller
Welcome to the forum.

Please do not double post. If someone has an answer, they will post it to this thread. This is a small forum, so you may
have to exercise some patience. Your other post has been deleted.

Offline Dweller

  • Newbie
  • *
  • Posts: 3
Re: LXD container image for TCL
« Reply #2 on: October 13, 2020, 06:47:49 AM »
No problem I thought I might have posted my initial post to the wrong thread..  So apologies for the cross posting..

The main compatibility issue with LXD/LXC is there is no Linux boot as the kernel is already running its just a matter of the container spawning off the usual OS boot processes..

However LXD does support cloud-init which might be a useful hook for bootstrapping..  But I don't know enough about tiny-core-linux to know if thats a wild goose chase.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: LXD container image for TCL
« Reply #3 on: October 13, 2020, 08:59:19 AM »
Hi Dweller
... But I don't know enough about tiny-core-linux to know if thats a wild goose chase.
The first thing you need to know about is persistence. By default, only the  tce  directory is persistent. It includes:
Code: [Select]
tce/optional/ # This is where extensions are stored.
tce/onboot.lst # This lists which extensions to load when you boot.
tce/mydata.tgc # Archive containing the /home and /opt directory, plus any system files you choose to back up.

Optionally, you can make the /home and /opt directories persistent so that they do not need to be backed up.

All other directories get created from scratch every time you boot.

This is a diagram showing how Tinycore works:
http://distro.ibiblio.org/tinycorelinux/architecture.html

This is a writeup by ulfr listing the boot process:
http://forum.tinycorelinux.net/index.php/topic,22020.msg137790.html#msg137790

This fine book is also worth reading (about 1 hour):
http://tinycorelinux.net/corebook.pdf
I highly recommend if you plan on running Tinycore.

There is also a Wiki:
http://wiki.tinycorelinux.net/doku.php?id=wiki:start
« Last Edit: October 27, 2022, 09:38:02 PM by Rich »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: LXD container image for TCL
« Reply #4 on: October 13, 2020, 09:00:24 AM »
So really my question is how custom is the TCL Kernel
The tinycore kernel config is here: http://tinycorelinux.net/11.x/x86/release/src/kernel/config-5.4.3-tinycore

Offline Dweller

  • Newbie
  • *
  • Posts: 3
Re: LXD container image for TCL
« Reply #5 on: December 09, 2020, 09:09:55 AM »
Thanks..  that should tell me where to look to start the boot strap within a LXD container..  Cheers