Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: zharr on July 03, 2026, 08:51:34 PM
-
I'm using piCore and trying to have all auto-loaded extensions copied to RAM (to unmount the SD card during operation) but normally mount optional extensions loaded later.
However this only seems to work when using tce-load directly, on boot it always seems to mount the extensions (though the copy2fs.flg works).
Seeing how the /etc/init.d/tc-config script has it's own implementation handling copy2fs.lst (different from tce-load), the issue might lie there.
That's why I'm posting here - I don't think it's necessarily a piCore packaging issue.
Sadly, I have not found a good way to edit that script to iterate on (or even run it safely).
Any help would be appreciated!
-
Hi zharr
... Seeing how the /etc/init.d/tc-config script has it's own implementation handling copy2fs.lst (different from tce-load), the issue might lie there. ...
I don't think so. The section of /etc/init.d/tc-config you are referring to looks like this:
if [ -n "$PRETCE" ]; then
PKG=optional ; LOADER="tce-load -i" ; LIST=onboot.lst
RAM=/tmp/tce
CPTOFS=""
if [ "$PRETCE" == "RAM" ] ; then
SRC=$RAM
[ -f $SRC/copy2fs.flg ] && CPTOFS=1
else
PPATH=${PRETCE%%/*}
mkdir -p /mnt/$PPATH
mount /dev/$PPATH /mnt/$PPATH
SRC=/mnt/$PRETCE
[ -x $SRC/onpre.sh ] && cp $SRC/onpre.sh /tmp
[ -f $SRC/copy2fs.flg ] && CPTOFS=1
if [ $CPTOFS ] ; then
cp $SRC/$PKG/* $RAM/$PKG/
cp $SRC/$LIST $RAM/
SRC=$RAM
umount /mnt/$PPATH 2>/dev/null
fi
fi
MNT=""
while read NAME OPT
do
[ $CPTOFS ] || grep -q $NAME $SRC/copy2fs.lst 2>/dev/null && FL="-c" || FL=''
[ $FL ] || MNT=1
su "$USER" -c "/usr/bin/$LOADER $SRC/$PKG/$NAME"
[ "$SRC" == "$RAM" ] && [ "$FL" == "-c" ] && rm $RAM/$PKG/$NAME
done < $SRC/$LIST
[ "$SRC" != "$RAM" ] && [ $MNT ] || umount /mnt/$PPATH 2>/dev/null
rm $RAM/copy2fs.flg $RAM/copy2fs.lst 2>/dev/null
[ -x /tmp/onpre.sh ] && /tmp/onpre.sh
fi
Unless you are using the pretce= boot code, that section will not execute.