Manual remastering requires yourself to take care about deps.
I'm not sure /opt/tce/optional is valid ; couldn't find it on a quick look at tce-setup. I've once used /tmp/builtin successfully. But I don't see any downside of extracting extensions directly except of the need to fiddle around a little more. Also you'd have the deps available as soon as possible.
Hi misalf! Would that work? Many of the files extracted files are just symbolic links to a tcloop file (which as far as I understand only come into being when extensions are loaded with 'tce-load'). That's why I had thought that the proper way of doing it (putting the tcz files in /opt/tce/optional/ and having them listed in /opt/tce/onboot.lst) to be the way to go.
Yes, I have Xorg, fontconfig, nano, ntfs-3g and a bunch of deps inside initrd.
You just have to take care not to mess up permissions (f.e. /tmp has the sticky-bit set).
mkdir /tmp/my-initrd-dir
cd /tmp/my-initrd-dir
zcat /path/to/core.gz | sudo cpio -i -H newc -d
tce-load -i squashfs-tools
sudo unsquashfs -xattrs -force -dest /tmp/my-initrd-dir /etc/sysconfig/tcedir/optional/extension.tcz
You might have to create some symlinks manually, that would otherwise be created by the extensions start-up scripts (/usr/local/tce.installed/extension-name) which are not used if not inside their extensions. Same thing goes for other commands like you already did with ldconfig ; tc-config might be the place for these to go.
For extensions which do not contain a start-up script, you have to create an empty one because this is the way tce-load checks if the requested extension is already loaded (tce-load would create those with the same name as the .tcz without file name extension).
tce-load -i advcomp
cd /tmp/my-initrd-dir
sudo find | sudo cpio -o -H newc | gzip -9 > /tmp/my-initrd-dir.gz
advdef -z4 /tmp/my-initrd-dir.gz