0. boot my frugal Core 14.0 install like I usually do.
1. wget the new version of core.iso in /home/tc/
2. mkdir c15 && mount core.iso c15/
3. mount /dev/sda1 (this is where my /tce/boot/ is)
4. sudo mkdir /mnt/sda1/tce/boot/c15
5. cp /home/tc/c15/boot/core.gz /mnt/sda1/tce/boot/c15/core15.gz
6. cp /home/tc/c15/boot/vmlinuz /mnt/sda1/tce/boot/c15/vmlinuz15
LABEL core15
KERNEL /tce/boot/c15/vmlinuz15
INITRD /tce/boot/c15/core15.gz
APPEND vga=789 base norestore syslog showapps nozswap
Run /init as init process
Failed to execute /init (error -26)
Run /sbin/init as init process
Starting init: /sbin/init exists but couldn't execute it (error -26)
Run /etc/init as init process
Run /bin/init as init process
Run /bin/sh as init process
Starting init: /bin/sh exists but couldn't execute it (error -26)
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
Kernel Offset: disabled
Rebooting in 60 seconds..
LABEL core14
KERNEL /tce/boot/c14/vmlinuz14
INITRD /tce/boot/c14/core14.gz
APPEND vga=789 base norestore syslog showapps nozswap
[code][ 36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[ 36.176536] pcm512x 1-004d: Failed to get supplies: -517
[ 36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]
[ 36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[ 36.176536] pcm512x 1-004d: Failed to get supplies: -517
[ 36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[...]
fb0: VESA VGA frame buffer device
ccp_crypto: Cannot load: there are no available CC
Driver for HIFM 795x crypto accelerator chip has been successfully registered.
hid: raw HID events driver (C) Jiri Kosina
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usb 1-1: new full-speed USB device number 2 using uhci_hcd
ipip: IPv4 amd MPLS over IPv4 tunneling driver
initializing XFRM netlink socket
MET: Registered PF_PACKET protocol family
Key type dns_resolver registered
microcode: sig=0x652, pf=0x2, revision=0x2c
microcode: Microcode Update Driver: v2.2
IPI shorthand broadcast: enabled
registered taskstats version 1
Key type .fscrypt registered
Key type fscrypt-provisioning registered
Key type encrypted registered
Freeing unused kernel image (initmem) memory: 732K
Write protecting kernel text and read-only data: 8500k
Run /init as init process
init started: BusyBox v1.36.0 (2023-01-17 10:14:32 UTC)
[...screen clears out...]
Booting Core 14.0
Running Linux Kernel 6.1.2-tinycore
[...]
Adding 3145724k swap on /dev/sda2. Priority:-2 extents:1 accross:3145724k SS
Possible swap partition(s) enabled.
[...]
MET: Registered PF_PACKET protocol family
Key type dns_resolver registered
microcode: Microcode Update Driver: v2.2
IPI shorthand broadcast: enabled
registered taskstats version 1
Key type .fscrypt registered
Key type fscrypt-provisioning registered
Key type encrypted registered
Freeing unused kernel image (initmem) memory: 772K
Write protecting kernel text and read-only data: 8780k
Run /init as init process
Failed to execute /init (error -26)
Run /sbin/init as init process
Starting init: /sbin/init exists but couldn't execute it (error -26)
Run /etc/init as init process
Run /bin/init as init process
Run /bin/sh as init process
Starting init: /bin/sh exists but couldn't execute it (error -26)
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
Kernel Offset: disabled
Rebooting in 60 seconds..
LABEL vmlinuz15withcore14
KERNEL /tce/boot/c15/vmlinuz15
INITRD /tce/boot/c14/core14.gz
APPEND vga=789 base norestore syslog showapps nozswap
[...]
MET: Registered PF_PACKET protocol family
Key type dns_resolver registered
microcode: Microcode Update Driver: v2.2
IPI shorthand broadcast: enabled
registered taskstats version 1
Key type .fscrypt registered
Key type fscrypt-provisioning registered
Key type encrypted registered
clk: Disabling unused clocks
Freeing unused kernel image (initmem) memory: 772K
Write protecting kernel text and read-only data: 8780k
Run /init as init process
init started: BusyBox v1.36.0 (2023-01-17 10:14:32 UTC)
[...screen clears out...]
Booting Core 14.0
Running Linux Kernel 6.6.8-tinycore
[...]
Adding 3145724k swap on /dev/sda2. Priority:-2 extents:1 accross:3145724k SS
Possible swap partition(s) enabled.
mem=64M
This time I got the same /init (error -26) errors as you did.mem=72M
it no longer got /init errors. It did eventually stop withudev.children-max=1
Found here:mem=64M
caused the /init errors to return.And to the boot codes for tc you have them here:
https://distro.ibiblio.org/tinycorelinux/faq.html#bootcodes (https://distro.ibiblio.org/tinycorelinux/faq.html#bootcodes)
free -m
total used free shared buff/cache available
Mem: 60 10 22 20 27 26
Swap: 7 0 7
47.59M 59.76M 12.17M RAMDISK: [mem 0x02f98000-0x03bc3fff]
Though it won't solve your problem, I did find something interesting.
Even though I allocated 72 Mbytes of RAM, free reports only 60 Mbytes present:Code: [Select]free -m
total used free shared buff/cache available
Mem: 60 10 22 20 27 26
Swap: 7 0 7
Looking through dmesg shows the missing 12 Mbytes used as a RAM disk:Code: [Select]47.59M 59.76M 12.17M RAMDISK: [mem 0x02f98000-0x03bc3fff]
free -m
total used free shared buffers cached
Mem: 76 61 14 0 3 35
-/+ buffers/cache: 22 54
Swap: 101 0 101
dmesg | grep RAMDISK
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
...I suspect DSL probably created 16 devices (/dev/ram0 - /dev/ram15) eachCode: [Select]----- Snip -----
dmesg | grep RAMDISK
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
... But then DSL's dmesg says it's initialised 16! I'm confused. ...
I suspect DSL probably created 16 devices (/dev/ram0 - /dev/ram15) each
capable of addressing 4 Mbytes, but hasn't allocated memory to them yet
because they are not currently in use.
CONFIG_BLK_DEV_RAM_COUNT=8
CONFIG_BLK_DEV_RAM_SIZE=8192
udev.children-max=1
Download rootfs to /tce/boot/c15/.INITRD /tce/boot/c15/rootfs.gz
tc@E310:~$ du -cs TinycoreISOs/Core15/lib/modules/6.6.8-tinycore/kernel/drivers/net
6.1M TinycoreISOs/Core15/lib/modules/6.6.8-tinycore/kernel/drivers/net
6.1M total
tc@E310:~$ du -cs TinycoreISOs/Core15/lib/modules/6.6.8-tinycore/kernel/drivers/platform
820K TinycoreISOs/Core15/lib/modules/6.6.8-tinycore/kernel/drivers/platform
820K total
tc@E310:~$ du -cs TinycoreISOs/Core15/lib/modules/6.6.8-tinycore/kernel/drivers/hid
712K TinycoreISOs/Core15/lib/modules/6.6.8-tinycore/kernel/drivers/hid
712K total
@CNK, you referenced DSL(damnsmalllinux) but which version are you using for this experiment(ing)?
#!/bin/sh
# Fetch a fresh copy of the initrd.
wget http://repo.tinycorelinux.net/15.x/x86/release/distribution_files/core.gz
# Create a temporary workspace.
mkdir tmp
cd tmp
# Unpack the initrd
zcat ../core.gz | sudo cpio -i
# ---------------- Modify this section to match your system ---------------- #
# Find the driver for our NIC.
find lib/modules/6.6.8-tinycore/kernel/ -name sky2.ko*
# The find command returned this:
# lib/modules/6.6.8-tinycore/kernel/drivers/net/ethernet/marvell/sky2.ko.gz
# Save a copy of the directory containing our driver.
sudo mv lib/modules/6.6.8-tinycore/kernel/drivers/net/ethernet/marvell ../
# Remove the net directory (about 6 Mbytes).
sudo rm -rf lib/modules/6.6.8-tinycore/kernel/drivers/net
# Recreate the path for our saved directory.
sudo mkdir -p lib/modules/6.6.8-tinycore/kernel/drivers/net/ethernet
# Move our saved directory back to its original location.
sudo mv ../marvell lib/modules/6.6.8-tinycore/kernel/drivers/net/ethernet/
# ---------------------- End of modification section ----------------------- #
# Recreate modules.alias and modules.dep in lib/modules/6.6.8-tinycore/.
sudo depmod -a -b . 6.6.8-tinycore
# We don't need the symbols file.
sudo rm -f lib/modules/6.6.8-tinycore/*symbols
# Re-pack the initrd.
sudo find . | sudo cpio -o -H newc | gzip > ../core15Stripped.gz
# Back to our starting directory.
cd ..
# Clean up.
sudo rm -rf tmp
rm -f core.gz
echo "Your new initrd is called core15Stripped.gz"
I found my NIC driver, saved its directory, removed the net directory, andmenuentry "*** Core-15-x86" {
search --no-floppy --fs-uuid --set=root 2bd65bbc-d71a-48be-8e35-f72f81453a15
linux /tce/Core15/vmlinuz udev.children-max=1 nodhcp nozswap norestore waitusb=5:UUID="2bd65bbc-d71a-48be-8e35-f72f81453a15" tce=UUID="2bd65bbc-d71a-48be-8e35-f72f81453a15" home=UUID="2bd65bbc-d71a-48be-8e35-f72f81453a15" opt=UUID="2bd65bbc-d71a-48be-8e35-f72f81453a15"
initrd /tce/Core15/core15Stripped.gz
}
This will create a persistent /home and /opt. You need to use a UUID that matches your systemtce-setdrive
> /opt/.filetool.lst
#!/bin/sh
pkill udhcpc
ifconfig eth0 192.168.1.49 netmask 255.255.255.0 broadcast 192.168.1.255 up
route add default gw 192.168.1.1
echo nameserver 68.237.161.12 > /etc/resolv.conf
echo nameserver 71.243.0.12 >> /etc/resolv.conf
#!/bin/sh
# put other system startup commands here
/opt/eth0.sh
tce-load -w Xvesa flwm_topside aterm wbar
tce-load -i Xvesa flwm_topside aterm wbar
Xvesa -listmodes
Pick a mode suitable for your screen./usr/local/bin/Xvesa -mode 0x0165 -br -nolisten tcp &
export XPID=$!
waitforX || ! echo failed in waitforX || exit
"$DESKTOP" 2>/tmp/wm_errors &
export WM_PID=$!
[ -x $HOME/.setbackground ] && $HOME/.setbackground
[ -x $HOME/.mouse_config ] && $HOME/.mouse_config &
[ $(which "$ICONS".sh) ] && ${ICONS}.sh &
[ -d "/usr/local/etc/X.d" ] && find "/usr/local/etc/X.d" -type f -o -type l | sort | while read F; do . "$F"; done
[ -d "$HOME/.X.d" ] && find "$HOME/.X.d" -type f -o -type l | sort | while read F; do . "$F"; done
startx
and I was presented with a desktop.tc@box:~$ sudo cache-clear
tc@box:~$ sync
tc@box:~$ free -m
total used free shared buff/cache available
Mem: 52 29 12 5 11 15
Swap: 999 12 987
tc@box:~$
I also have a swap partition that's supplying some space.printf "Xvesa\nflwm_topside\naterm\nwbar\n" > /etc/sysconfig/tcedir/onboot.lst
Even though I allocated 72 Mbytes of RAM, free reports only 60 Mbytes present:Code: [Select]free -m
total used free shared buff/cache available
Mem: 60 10 22 20 27 26
Swap: 7 0 7
Looking through dmesg shows the missing 12 Mbytes used as a RAM disk:Code: [Select]47.59M 59.76M 12.17M RAMDISK: [mem 0x02f98000-0x03bc3fff]
Memory: 755572K/777656K available (4670K kernel code, 422K rwdata, 1288K rodata, 588K init, 532K bss, 22084K reserved, 0K cma-reserved, 0K highmem)
root@OpenWrt:~# ls /dev/ram*
ls: /dev/ram*: No such file or directory
root@OpenWrt:~# dmesg | grep Memory:
Memory: 22176K/32768K available (7124K kernel code, 641K rwdata, 884K rodata, 1328K init, 221K bss, 10592K reserved, 0K cma-reserved)
root@OpenWrt:~# free
total used free shared buff/cache available
Mem: 23504 16424 3616 80 3464 3772
Swap: 0 0 0
root@OpenWrt:~# dmesg | grep RAM
32MB of RAM installed
root@OpenWrt:~# uname -a
Linux OpenWrt 5.15.137 #0 SMP Tue Nov 14 13:38:11 2023 mips GNU/Linux
... I think RAMDISK was a red herring. ...I think you might be right.
Hi linicThanks Rich!! What you have done is epic!
I was able to boot to a desktop with 64 Mbytes.
First I trimmed down the initrd (core.gz):Code: [Select]#!/bin/sh
I found my NIC driver, saved its directory, removed the net directory, and
# Fetch a fresh copy of the initrd.
wget http://repo.tinycorelinux.net/15.x/x86/release/distribution_files/core.gz
# Create a temporary workspace.
mkdir tmp
cd tmp
# Unpack the initrd
zcat ../core.gz | sudo cpio -i
# ---------------- Modify this section to match your system ---------------- #
# Find the driver for our NIC.
find lib/modules/6.6.8-tinycore/kernel/ -name sky2.ko*
# The find command returned this:
# lib/modules/6.6.8-tinycore/kernel/drivers/net/ethernet/marvell/sky2.ko.gz
# Save a copy of the directory containing our driver.
sudo mv lib/modules/6.6.8-tinycore/kernel/drivers/net/ethernet/marvell ../
# Remove the net directory (about 6 Mbytes).
sudo rm -rf lib/modules/6.6.8-tinycore/kernel/drivers/net
# Recreate the path for our saved directory.
sudo mkdir -p lib/modules/6.6.8-tinycore/kernel/drivers/net/ethernet
# Move our saved directory back to its original location.
sudo mv ../marvell lib/modules/6.6.8-tinycore/kernel/drivers/net/ethernet/
# ---------------------- End of modification section ----------------------- #
# Recreate modules.alias and modules.dep in lib/modules/6.6.8-tinycore/.
sudo depmod -a -b . 6.6.8-tinycore
# We don't need the symbols file.
sudo rm -f lib/modules/6.6.8-tinycore/*symbols
# Re-pack the initrd.
sudo find . | sudo cpio -o -H newc | gzip > ../core15Stripped.gz
# Back to our starting directory.
cd ..
# Clean up.
sudo rm -rf tmp
rm -f core.gz
echo "Your new initrd is called core15Stripped.gz"
then restored the directory I saved and re-packed the initrd.
The new size is about 7.3 Mbytes.
I booted with the modified initrd and these parameters and a new partition:Code: [Select]menuentry "*** Core-15-x86" {
This will create a persistent /home and /opt. You need to use a UUID that matches your system
search --no-floppy --fs-uuid --set=root 2bd65bbc-d71a-48be-8e35-f72f81453a15
linux /tce/Core15/vmlinuz udev.children-max=1 nodhcp nozswap norestore waitusb=5:UUID="2bd65bbc-d71a-48be-8e35-f72f81453a15" tce=UUID="2bd65bbc-d71a-48be-8e35-f72f81453a15" home=UUID="2bd65bbc-d71a-48be-8e35-f72f81453a15" opt=UUID="2bd65bbc-d71a-48be-8e35-f72f81453a15"
initrd /tce/Core15/core15Stripped.gz
}
Now run this to create a tce directory:Code: [Select]tce-setdrive
You'll want to clear out the /opt/.filetool.lst file so /home and /opt
can't get caught up in a backup:Code: [Select]> /opt/.filetool.lst
Create /opt/eth0.sh:Code: [Select]#!/bin/sh
pkill udhcpc
ifconfig eth0 192.168.1.49 netmask 255.255.255.0 broadcast 192.168.1.255 up
route add default gw 192.168.1.1
echo nameserver 68.237.161.12 > /etc/resolv.conf
echo nameserver 71.243.0.12 >> /etc/resolv.conf
Edit /opt/bootlocal.sh:Code: [Select]#!/bin/sh
# put other system startup commands here
/opt/eth0.sh
Reboot and run ifconfig to make sure the network is up.
Then:Code: [Select]tce-load -w Xorg-7.7 flwm_topside aterm wbar
Pick a mode suitable for your screen.
tce-load -i Xorg-7.7 flwm_topside aterm wbar
Xvesa -listmodes
Then edit .xsession:Code: [Select]/usr/local/bin/Xvesa -mode 0x0165 -br -nolisten tcp &
export XPID=$!
waitforX || ! echo failed in waitforX || exit
"$DESKTOP" 2>/tmp/wm_errors &
export WM_PID=$!
[ -x $HOME/.setbackground ] && $HOME/.setbackground
[ -x $HOME/.mouse_config ] && $HOME/.mouse_config &
[ $(which "$ICONS".sh) ] && ${ICONS}.sh &
[ -d "/usr/local/etc/X.d" ] && find "/usr/local/etc/X.d" -type f -o -type l | sort | while read F; do . "$F"; done
[ -d "$HOME/.X.d" ] && find "$HOME/.X.d" -type f -o -type l | sort | while read F; do . "$F"; done
Then:Code: [Select]startx
and I was presented with a desktop.
I opened a terminal and:Code: [Select]tc@box:~$ sudo cache-clear
I also have a swap partition that's supplying some space.
tc@box:~$ sync
tc@box:~$ free -m
total used free shared buff/cache available
Mem: 52 29 12 5 11 15
Swap: 999 12 987
tc@box:~$
Populate onboot.lst:Code: [Select]printf "Xorg-7.7\nflwm_topside\naterm\nwbar\n" > /etc/sysconfig/tcedir/onboot.lst
It now boots right into the desktop.
A copy of the script that modified the initrd is attached.
total used free shared buff/cache available
Mem: 56752 11476 20764 13244 24512 28312
Swap: 3145724 0 3145724
I added a link to your post in this section https://github.com/linic/tcl-core-560z?tab=readme-ov-file#summary. It will be useful for people who don't want to build their own kernel.... I hadn't attempted to boot in the graphical desktop because I thought that would use too much RAM. ...
... Here's what the memory usage looked like with my TCZs loaded: ...Just for kicks, I exited from the GUI to a prompt and ran free -m:
total used free shared buff/cache available
Mem: 52 20 25 5 8 25
Swap: 999 10 989
... It will be useful for people who don't want to build their own kernel. ...When it comes to ease of modification, time invested, and predicting
When it comes to ease of modification, time invested, and predicting
memory savings, I feel modifying core.gz wins hands down.
tce-load -wi Xorg-7.7 flwm_topside aterm wbar
tce-load -wi Xvesa
Xvesa -listmodes
Xvesa -mode 0x0115 -br -2button -mouse /dev/input/mice,5 -nolisten tcp -I >/dev/null 2>&1 &
export XPID=$!
waitforX || ! echo failed in waitforX || exit
"$DESKTOP" 2>/tmp/wm_errors &
export WM_PID=$!
[ -x $HOME/.setbackground ] && $HOME/.setbackground
[ -x $HOME/.mouse_config ] && $HOME/.mouse_config &
[ $(which "$ICONS".sh) ] && ${ICONS}.sh &
[ -d "/usr/local/etc/X.d" ] && find "/usr/local/etc/X.d" -type f -o -type l | sort | while read F; do . "$F"; done
[ -d "$HOME/.X.d" ] && find "$HOME/.X.d" -type f -o -type l | sort | while read F; do . "$F"; done
... At one point, I disabled too many things using make menuconfig, ...Which is why I wrote this comment the way I did:
... Then navigating through the menus disabling anything you think you don't want. ...I've done that too. You look at an option and think "nah, I don't need that", not
... About the desktop, I ran this:Remove Xorg-7.7 from your /etc/sysconfig/tcedir/onboot.lst file.Code: [Select]tce-load -wi Xorg-7.7 flwm_topside aterm wbar
...
tce-load -wi Xvesa
Xvesa -listmodes
... and got to the desktop too (see screenshot in attachments). I'm blown away by this! Thanks again!You are quite welcome. Glad it worked out for you.
Remove Xorg-7.7 from your /etc/sysconfig/tcedir/onboot.lst file.
total used free shared buff/cache available
Mem: 55656 30428 4988 7792 20240 13500
Swap: 3145724 5616 3140108