Ok, I asked a friend to give me a hand with the chroot to make me understand what I didn't understand and this time I succeeded, I still don't know if everything is ok but I want to write what I did. I tend to write because maybe it can help someone else and also because it's good for me to reorganize my thoughts and because I can read it again if I forget.
So let's go through the code now then I explain what I understand:
0 $ mkdir ~/chroot; cd .~/chroot; _wget http://tinycorelinux.net/12.x/x86_64/release/distribution_files/corepure64.gz
1 $ sudo su
2 # zcat ./corepure64.gz | cpio -i -H newc -d
3 # echo nameserver 208.67.222.222 > ./etc/resolv.conf
4 # TC=/home/tc/chroot
5 # mount -v --bind /dev $TC/dev
6 # mount -v --bind /dev/pts $TC/dev/pts
7 # mount -vt proc proc $TC/proc
8 # mount -vt sysfs sysfs $TC/sys
9 # mount -vt tmpfs tmpfs $TC/run
10# chroot "$TC" /bin/ash
It's basically a copy of the one juanito passed me minus several things.
0) prepare the dir
1) I log as root because in line 1 I probably should have written two sudo's (one before and one after the pipe)
2) unzip the root of tinycore
3) set dns for connection
4) environment variable for let juanito commands work
-) Skipped all the mkdir and mknod because all the dir's are already in corepure64.gz
5-9) All of these commands work. My friend and I couldn't figure out where sysfs is taken since it's not listed with the "df -h" command. For personal note he also told me that these dirs should be unmounted when you finish using the chroot with umount and that anyway when you turn off the pc these mounts are lost. He suggested to make a dedicated script to open and close the chroot.
10) then start! the first problem is that juanito's command requires the presence of bash in the chroot machine, but tinycore has only ash so it can't work with corepure64.gz. Second "problem", specifying PATH in that way means to assign less path than the basic ones, I removed this too, HOME, TERM and PS1 are identical, I removed them too. I also removed "/usr_/bin_/env_-i" but I don't know why, what is it for?
Please let me know if there is something wrong because I don't have the knowledge to understand it, for example doing everything from root risks that something won't work?
Currently the chroot works and also the connection but I can't install packages with tce-load -i, what's the problem?
My goal is to be able to use tinycore in chroot as if it was started directly from the host, so what I want to do is to install xorg and other programs afterwards. I've already seen someone who can do it with alpine and xephyr, so I want to do the same with tinycore!
Another thing i want to do, i've already prepared a version of tinycore that does what i like, when i want to create a chroot from that, will be enough to create an image of the booted disk? if yes, how?
Just a little off topic, I've written a little command that calculates the total of how much would occupy the sum of packages currently installed.
I would like to paste it but this code always make the server error, also if I replace all the spaces with _, so I attach it.