View source for Tiny Core Linux

{{anchor href="top"}}
Hits :  **{{hits}}**

~TinyCore Linux - Remaster

Version : 4.5.5

=== Preparation ===

a. Download ((http://distro.ibiblio.org/tinycorelinux/ TinyCore)) Linux

%%(bash)
wget -c http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/TinyCore-current.iso
%%

b. Create local folders & mount ~TinyCore

%%(bash)
mkdir -pv tinymount tinylocal tinycde

mount -o loop TinyCore-current.iso tinymount
%%

c. Copy & extract Core cpio image

%%(bash)
cp tinymount/boot/core.gz tinylocal/

cd tinylocal

gunzip core.gz

cpio -i < core

rm core
%%

d. At this point you can chroot the new environment for testing it: 

%%(bash)
chroot ./ /bin/sh
%%

Be aware that you need to mount sys,dev & proc with bind option to work properly.

=== Install packages === 

a. Download your packages (and their dependencies) from: 

http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz/

%%(bash)
cd ../tinycde
wget packages ...
%%

b. Install packages to your tiny core environment 

you 'll need ((http://squashfs.sourceforge.net/ squashfs-tools))

%%(bash)
cd ../tinylocal

for i in `ls -1 ../tinycde/*tcz` ; do unsquashfs -f -d . $i ; done
for i in `ls -1 ../tinymount/cde/optional/*tcz` ; do unsquashfs -f -d . $i ; done
%%

=== Customize your tinycore ===

Use chroot and customize your new tinycore environment.

If you want your tc user to auto-whatever you need-start something (like X):

a. 
%%(bash)
vim etc/skel/.profile
%%

(after clear command)

b. 
%%(bash)
for i in `ls -1 /usr/local/tce.installed`; do sudo /usr/local/tce.installed/$i  ; done
%%

=== Archive your tinycore environment ===

first exit from chroot env
You 'll need ((http://advancemame.sourceforge.net/ AdvanceCOMP))

a. 

%%(bash)
find | cpio -o -H newc > ../core
cd ..
gzip core
advdef -z4 core.gz
%%

=== PXE BOOT ===

If you need to pxe boot your new tinycore, you are done !

below is the configuration to default (pxelinux.cfg/default):

%%
LABEL TinyCoreLinux
	MENU LABEL TinyCoreLinux
	LINUX vmlinuz
	INITRD core.gz
%%

The vmlinuz image is here: tinymount/boot/vmlinuz

=== ISO ===

If you need an iso 

a. Create the file structure

%%(bash)
cd ../
mkdir -pv tinyiso
cd tinyiso
cp -rav ../tinymount/boot/* .
mv ../core.gz core.gz
%%

b. Edit isolinux.cfg

%%(bash)
# vi isolinux/isolinux.cfg
%%

%%
DEFAULT menu.c32
PROMPT 0
TIMEOUT 10

MENU TITLE TinyCore
MENU MARGIN 6
MENU VSHIFT 1
MENU ROWS 13

LABEL TinyCore
MENU DEFAULT
MENU LABEL TinyCore 
KERNEL /vmlinuz
APPEND initrd=/core.gz 
%%

c. Create the iso file:

%%(bash)
mkisofs -l -J -R -V TinyCore -no-emul-boot -boot-load-size 4 -boot-info-table -b isolinux/isolinux.bin -c isolinux/boot.cat -o ../my.iso .
%%