Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: boughtonp on November 25, 2022, 09:26:13 AM

Title: How to create a remastered ISO with extra extensions added?
Post by: boughtonp on November 25, 2022, 09:26:13 AM
I'm trying to create a TinyCore ISO with extra software, but none of the extensions I add will execute.

Code: [Select]
mkdir ./tc-iso
sudo mount TinyCorePure64-13.1.iso ./tc-iso -o loop,ro
cp -a ./tc-iso ./new-tc-iso
sudo umount ./tc-iso

chmod +w new-tc-iso/cde/{optional,onboot.lst}
cp vim.tcz new-tc-iso/cde/optional/
md5sum vim.tcz > new-tc-iso/cde/optional/vim.tcz.md5.txt
echo vim.tcz >> new-tc-iso/cde/onboot.lst
chmod -w new-tc-iso/cde/{optional,onboot.lst}

sudo genisoimage -l -J -r -V tc-custom -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -o tc-custom.iso new-tc-iso

qemu-system-x86_64 -m 512 -cdrom tc-custom.iso

Adding bootcodes "showapps pause" show vim IS included in list of extensions

Code: [Select]
tc@box:~$ tce-status -i | grep vim
vim
tc@box:~$ vim
sh: vim: not found
tc@box:~$ which vim
/usr/local/bin/vim
tc@box:~$ /usr/local/bin/vim
sh: /usr/local/bin/vim: not found
tc@box:~$ sudo vim
sudo: unable to execute /usr/local/bin/vim: No such file or directory


What do I need to do to make it work?

Title: Re: How to create a remastered ISO with extra extensions added?
Post by: Rich on November 25, 2022, 10:53:49 AM
Hi boughtonp
Welcome to the forum.

You forgot to include the dependencies for  vim.tcz:
Code: [Select]
ncursesw.tcz
gvim-base.tcz
as listed in the dependency file:
http://tinycorelinux.net/13.x/x86_64/tcz/vim.tcz.dep

Add the following files to  cde/optional  and it should work:
http://tinycorelinux.net/13.x/x86_64/tcz/vim.tcz.dep
http://tinycorelinux.net/13.x/x86_64/tcz/ncursesw.tcz
http://tinycorelinux.net/13.x/x86_64/tcz/ncursesw.tcz.md5.txt
http://tinycorelinux.net/13.x/x86_64/tcz/gvim-base.tcz
http://tinycorelinux.net/13.x/x86_64/tcz/gvim-base.tcz.md5.txt
Title: Re: How to create a remastered ISO with extra extensions added?
Post by: boughtonp on November 26, 2022, 02:27:58 PM
Thanks Rich.

I guess I got unlucky with the "simple" package I picked to test with.

After adding those dependencies, it adds Vim to the Apps menu, but selecting it only momentarily flashes up a terminal, starting terminal then entering "vim" has the same error as before.

It also adds GVim to the menu - despite not having added gvim.tcz itself (looks like there's desktop files in gvim-base that should probably be in the vim and gvim extensions), so I'm guessing there may be further dependency mixups causing the failure.

Is there a way to see actual errors, rather than just "not found"?

(Fulfilling gvim dependencies involves gtk3 so I'd rather avoid that rabbit hole.)

I tested with various other extensions and dependencies and they've all worked fine.
Title: Re: How to create a remastered ISO with extra extensions added?
Post by: Rich on November 26, 2022, 06:25:30 PM
Hi boughtonp
A few thoughts come to mind:

Run this:
Code: [Select]
ldd $(which vim)and see if it reports  Not found  for any of the entries.

Try starting  vim  in verbose mode:
Code: [Select]
vim -VMaybe one of the messages it spits out will provide a clue.

Try booting the ISO directly. Maybe  Qemu  is creating the problem.
Title: Re: How to create a remastered ISO with extra extensions added?
Post by: curaga on November 26, 2022, 11:46:58 PM
It could also be that you accidentally downloaded 32-bit vim.tcz, the extensions must match the iso's arch. That "not found" error is also shown for not found dynamic linker.
Title: Re: How to create a remastered ISO with extra extensions added?
Post by: Rich on November 27, 2022, 04:43:15 AM
Hi boughtonp
It could also be that you accidentally downloaded 32-bit vim.tcz, ...
If that's the case, then the  ldd  command I posted should report something similar to this:
Code: [Select]
wrong ELF class: ELFCLASS32
Title: Re: How to create a remastered ISO with extra extensions added?
Post by: boughtonp on November 27, 2022, 10:57:12 AM
Thanks both, ldd confirmed that I had indeed downloaded the 32-bit version. :$

Not sure how I managed that, but I downloaded the correct vim.tcz and it works now.