WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Loading TCE packages outside of TinyCoreLinux  (Read 2802 times)

Offline cmk

  • Newbie
  • *
  • Posts: 25
Loading TCE packages outside of TinyCoreLinux
« on: August 29, 2022, 11:04:17 PM »
Hey what's up guys, I've just joined the forum, thanks for letting in.
TinyCore is so great that I'm now seriously thinking about migrating
to TinyCore form linux mint.

I had some success with remastering ISO via ezremaster tool in the GUI,
also manually playing around with boot codes and providing permanent /tce
folder on my USB flash drive worked like a charm.

What I'm looking for now is automating the creation of the custom TInyCore ISO with my preferred packages
so that I could generate/burn ISO by running a single shell script.

If I use existing /tce/optional + onboot.lst then everything is fine but say I want to add a new package.
Doing this under the TinyCore itself is trivial but any attempts to bring tce-load script suits from TinyCore
to linux mint didn't work for me.

So what I want to achieve is to be able to download .tcz packages with .md5 files and generating .dep files
outside of TinyCore. Is that possible?

I was thinking about writing my own script to download the tcz files but what I don't understand is how the dependencies
are getting resolved. I saw depmod is used in the tce-load script but after googling about depmod command it feels
like it depends on the current kernel configuration hence running depmod under linux mint might not have a sense.

In a perfect world it would've been nice to have existing .dep files that can be downloaded along with tcz files.
But I don't want to reinvent the wheel so is there any option to download tcz packages with all the dependencies
outside of TinyCore?

Thanks in advance!


Offline AlejandroPadrino

  • Full Member
  • ***
  • Posts: 143
Re: Loading TCE packages outside of TinyCoreLinux
« Reply #1 on: August 29, 2022, 11:51:58 PM »
From applications manager you will download your wanted .tcz package and all needed dependencies.  .tcz packages are in squashfs format, and core.gz after gzip decompressed is in cpio format.  This is all you need to build your custom TC.  :-)

Offline cmk

  • Newbie
  • *
  • Posts: 25
Re: Loading TCE packages outside of TinyCoreLinux
« Reply #2 on: August 30, 2022, 12:02:41 AM »
Hello, Alejandro

Like I've mentioned in the original post - it's trivial to do it from under the TinyCore either in GUI or via tce-load (for bulk downloading for instance),
now what I'm looking for is to achieve the same result but from the outside of the TinyCore so that the workflow goes the following way:

1. Downloading all the needed packages with deps from non TinyCore distro
2. Saving them to /tce folder
3. Creating new ISO (say with xorriso) including newly created /tce folder
4. Testing it it qemu or burning to the USB flash drive

I was wondering if anyone did this before?
Is there tce-load for other than TInyCore linux distros?
Or is there an alternative to tce-load?

But the major question is how to resolve the dependencies from the outside of the TinyCore
because it feels like the deps might be resolved properly only under the TinyCore kernel (I might be wrong though)

Offline cmk

  • Newbie
  • *
  • Posts: 25
Re: Loading TCE packages outside of TinyCoreLinux
« Reply #3 on: August 30, 2022, 12:22:17 AM »
Ahhh!!! What a noob I am!
.dep files are already there!

If someone else is gonna be searching for this, here's how the deps can get resolved:
Say, to download nano we do:
1. download http://repo.tinycorelinux.net/13.x/x86_64/tcz/nano.tcz
2. download http://repo.tinycorelinux.net/13.x/x86_64/tcz/nano.tcz.md5.text
3. download download http://repo.tinycorelinux.net/13.x/x86_64/tcz/nano.tcz.dep
4. recursively download dependencies from the .dep file
It's that simple!

Thanks to tce-load script for this insight!

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14501
Re: Loading TCE packages outside of TinyCoreLinux
« Reply #4 on: August 30, 2022, 12:23:08 AM »
@Rich wrote FetchExt.sh - see here: http://forum.tinycorelinux.net/index.php/topic,23034.msg164745.html

The repo contains files *dep and *tree with the deps and recursive deps respectively.

Offline cmk

  • Newbie
  • *
  • Posts: 25
Re: Loading TCE packages outside of TinyCoreLinux
« Reply #5 on: August 30, 2022, 02:16:02 AM »
@Rich wrote FetchExt.sh - see here: http://forum.tinycorelinux.net/index.php/topic,23034.msg164745.html

The repo contains files *dep and *tree with the deps and recursive deps respectively.

Thank you, Juanito!
FetchExt.sh is exactly what I've been looking for.
Quite a fun thing that I've almost completed my own tool in python which literally does the same thing)
Thank you for your support again, TInyCore is awesome!

Offline cmk

  • Newbie
  • *
  • Posts: 25
Re: Loading TCE packages outside of TinyCoreLinux
« Reply #6 on: August 30, 2022, 05:23:09 AM »
If someone is interested, I've just made a python script that fetches tcz modules and dependenices:
https://github.com/maksimKorzh/tce-download

And here's a video demo on how to use it and how to enable /tce folder onboot (real hardware demo):
https://www.youtube.com/watch?v=bAY2xAUv5YQ

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 653
Re: Loading TCE packages outside of TinyCoreLinux
« Reply #7 on: August 30, 2022, 05:50:26 AM »
Thank you for making a video and explaining tiny core.

I see in the video, you using qemu in linux environment.
Have you tried add the "-enable-kvm" to the command line to make qemu faster.

Code: (bash) [Select]
-enable-kvm     enable KVM full virtualization support

Code: (bash) [Select]
qemu-system-x86_64 --cdrom CorePure64-current.iso -enable-kvm
You have to enable virtualization support in the bios.

« Last Edit: August 30, 2022, 06:00:03 AM by patrikg »

Offline cmk

  • Newbie
  • *
  • Posts: 25
Re: Loading TCE packages outside of TinyCoreLinux
« Reply #8 on: August 30, 2022, 06:14:07 AM »
Thank you for making a video and explaining tiny core.

I see in the video, you using qemu in linux environment.
Have you tried add the "-enable-kvm" to the command line to make qemu faster.

Code: (bash) [Select]
-enable-kvm     enable KVM full virtualization support

Code: (bash) [Select]
qemu-system-x86_64 --cdrom CorePure64-current.iso -enable-kvm
You have to enable virtualization support in the bios.

Oh, thank you Patrik! I didn't since I run it on the real hardware, but thanks for kindly pointing out!
I didn't know that!

Btw, I've added a checksum checking a moment ago and now debugging the script by downloading
gnome-desktop dependencies. In a couple of hours script should be stable enough for use by others)

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 653
Re: Loading TCE packages outside of TinyCoreLinux
« Reply #9 on: August 30, 2022, 06:23:37 AM »
Thanks you also, by the way:
I have also test another way of doing what you doing, you can follow this article to make some images that you can burn to some usb thumb drives or to some ssd or to some spinning disks using qemu :)

https://fabianstumpf.de/articles/tinycore_images.htm

Don't forget then burning the image to the usb thumb drive or to ssd or to disk, you have to expand the partition to correct size after you booting the system natively.
You need to do the following:
Thanks to @bmarkus at this forum for the original text:

1) Start fdisk partitioning tool as root:

   
Code: (bash) [Select]
sudo fdisk -u /dev/sda
   Now list partitions with 'p' command and write down the starting and
   ending sectors of partition.

2) Delete partition with 'd' than recreate it with 'n' command.
   Use the same starting sector as deleted had and provide end
   sector or size greater than deleted had having enough free space
   for Mounted Mode. When finished, exit fdisk with 'w' command. Now
   partition size increased but file system size is not yet changed.

3) Reboot. It is necessary to make Kernel aware of changes.

4) After reboot expand file system to the new partition boundaries with
   typing the following command as root:

Code: (bash) [Select]
   sudo resize2fs /dev/sda1
Now you are ready to use the bigger partition.
« Last Edit: August 30, 2022, 06:45:48 AM by patrikg »

Offline cmk

  • Newbie
  • *
  • Posts: 25
Re: Loading TCE packages outside of TinyCoreLinux
« Reply #10 on: August 30, 2022, 08:32:28 AM »
Thanks you also, by the way:
I have also test another way of doing what you doing, you can follow this article to make some images that you can burn to some usb thumb drives or to some ssd or to some spinning disks using qemu :)

https://fabianstumpf.de/articles/tinycore_images.htm

Don't forget then burning the image to the usb thumb drive or to ssd or to disk, you have to expand the partition to correct size after you booting the system natively.
You need to do the following:
Thanks to @bmarkus at this forum for the original text:

1) Start fdisk partitioning tool as root:

   
Code: (bash) [Select]
sudo fdisk -u /dev/sda
   Now list partitions with 'p' command and write down the starting and
   ending sectors of partition.

2) Delete partition with 'd' than recreate it with 'n' command.
   Use the same starting sector as deleted had and provide end
   sector or size greater than deleted had having enough free space
   for Mounted Mode. When finished, exit fdisk with 'w' command. Now
   partition size increased but file system size is not yet changed.

3) Reboot. It is necessary to make Kernel aware of changes.

4) After reboot expand file system to the new partition boundaries with
   typing the following command as root:

Code: (bash) [Select]
   sudo resize2fs /dev/sda1
Now you are ready to use the bigger partition.

Yeah, I read that a few times already.
I do it in a bit different way:
1. Download smallest ISO
2. Download packages
3. Extract files from ISO, alter boot codes
4. Copy packages to ISO folder (extracted one)
5. Create new ISO with xorriso

And when I need to manually alter /home/.profile (like to enable alsa for instance) I just do it afterwards and since
I use home=sdb changes are persistent.

Btw I'm really wondering how many guys here are using TinyCore as their main system?
I'm gonna try to migrate to TInyCore from Linux Mint to at least be capable of producing my YouTube programming tutorials.
I love minimalism and freedom above all and TinyCore is just perfect solution I think.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 653
Re: Loading TCE packages outside of TinyCoreLinux
« Reply #11 on: August 30, 2022, 08:58:12 AM »
There is a very good wikipedia page that has links to some linux distributions that runs in ram.

https://en.wikipedia.org/wiki/List_of_Linux_distributions_that_run_from_RAM

And one of them is TC. :)

I think Alpine is the most used one today, because of many use cases in docker.
I got in contact with the one of the first one long time ago, it was LRP.

Linux Router Project. Just run from one 1.44MB floppy.
https://en.wikipedia.org/wiki/Linux_Router_Project
https://web.archive.org/web/20030624030005/http://www.linuxrouter.org/
« Last Edit: August 30, 2022, 09:07:43 AM by patrikg »

Offline cmk

  • Newbie
  • *
  • Posts: 25
Re: Loading TCE packages outside of TinyCoreLinux
« Reply #12 on: August 30, 2022, 09:21:51 AM »
Package downloader update:
https://github.com/maksimKorzh/tce-download

 - added md5 checksums checking
 - added dependency tree verification
 - extensively tested (repo admins, sorry for torturing the repo during testing!)

Here's the package list I've successfully downloaded via my script (64-bit):
Code: [Select]
wifi.tcz
firmware-atheros.tcz
firmware-ipw2100.tcz
firmware-ipw2200.tcz
firmware-iwimax.tcz
firmware-iwl8000.tcz
firmware-iwl9000.tcz
firmware-iwlwifi.tcz
firmware-marvel.tcz
firmware-myri10ge.tcz
firmware-netxen.tcz
firmware-openfwwf.tcz
firmware-ralinkwifi.tcz
firmware-rtlwifi.tcz
firmware-ti-connectivity.tcz
firmware-ueagle-atm.tcz
firmware-vxge.tcz
firmware-zd1211.tcz

Now I have CorePure64-current with WiFI support running on my laptop!

P.S. I can't see Xvesa.tcz on 64-bit repo db, downloading Xfbdev results in a fail when running 'startx',
can someone please kindly tell me which packages do I need to download to a basic GUI setup like in CorePlus-current (32-bit)?
Thanks in advance!

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14501
Re: Loading TCE packages outside of TinyCoreLinux
« Reply #13 on: August 30, 2022, 09:30:39 AM »
Xvesa is 32bit only, so if you don’t want to use Xorg-7.7, you need to use Xfbdev.

If you run the first line of .xsession from the console prompt you might get more info on why Xfbdev doesn’t start.

As a minimum you need Xfbdev, flwm, aterm and wbar.
« Last Edit: August 30, 2022, 09:32:16 AM by Juanito »