I've tried several times to make a TinyCore bootable cd and failed every time. What I am trying to do is use TinyCorePlus as the base and add custom .tcz s and some additional non-system files to the root file system

On my most recent try I used this bash script: https://gist.github.com/dankrause/2a9ed5ed30fa7f9aaaa2

and I modified the script's config variables like so:

EXTENSIONS=("firefox-ESR.tcz" "ffmpeg4.tcz" "p7zip_gui.tcz" "pulseaudio.tcz" "alsa-oss.tcz" alsa.tcz lame.tcz gnome-terminal.tcz)

I also modified this part of the script

# create our working folders
TMPDIR="$(mktemp -d --tmpdir=$(pwd) 'iso.XXXXXX')"
chmod 755 "${TMPDIR}"
#mkdir -p dist/{iso,tcz,dep} "${TMPDIR}/cde/optional"
mkdir -p "${TMPDIR}/cde/optional"

and manually created the iso,tcz,dep directories in the working directory of the script, so I could reuse them if it failed on the first try and so I could use an already downloaded source ISO file. I put my custom non-system files in the rootfs folder in the script's working directory.

When I booted a Virtual machine from the resulting ISO file (that the script created) to test it, it got as far as the TinyCore Boot options screen where you can select a window manager, but when I select any one of them and try to boot, I get this error:

Decompressing Linux... Parsing ELF... No relocation needed... done.
Booting the kernel.
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
Kernel Offset: disabled
Rebooting in 60 seconds...

I opened the ISO file with Linux Archive manager (read-only) and the boot/core.gz archive. It looks like the "core.cpio" archive inside is just named "core" instead. That missing file extension in core.gz might be the problem, but I really don't know, and if it is the problem I don't know how to fix it.


I fixed the missing .cpio extension with another modification to the script:

    pushd "${ROOTFS}"
        #find | cpio -o -H newc | gzip -2 > "${TMPDIR}/boot/core.gz"
        find . | cpio -H newc -o > "${TMPDIR}/boot/core.cpio"
        gzip -2cvf "${TMPDIR}/boot/core.cpio" > "${TMPDIR}/boot/core.gz"
        rm "${TMPDIR}/boot/core.cpio"

But the error persisted, and then I looked inside core.cpio and realized all the system files and folders were missing, so I copied them from the core.cpio in the source ISO to rootfs and that fixed the "Kernel panic - not syncing" error.

I have a guess that "syncing" in that error message means syncing with some operating system files that are extracted from core.gz

I got my custom ISO to boot as far as the "loading extensions..." step, but I have run into another error, something seems to be wrong with the file permission settings on the system files in the "core" file.

Here is this most recent new error I got. It does this for every single .tcz extension it tries to load:

libXext sudo: /etc/sudoers is mode 0777, should be 0440
sudo: no valid sudoers sources found, quitting
sudo: /etc/sudoers is mode 0777, should be 0440
sudo: no valid sudoers sources found, quitting

Any help would be appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.