Table of Contents
This document describes the default boot process. Many variations, large and small, are readily available. Details will be added over time. Last update is for TC 3.8, 2011/08/04.
#The Boot Loader
There are a number of boot loaders in common use with TC. Syslinux is the default if you use the CorePlus installation method. GRUB 0.97 seems most often used,GRUB2 is supported, and there are others.
#General Boot Scripts
/etc/init.d is used with the venerable 'inittab' method. It does not start X. It sets up one Linux virtual console to auto-login to user “tc”, with a respawn.
#Auto-Login
After auto-login, we have the usual shell inits through /etc/profile, and then…
#.xsession
…the file “.xsession” in /home/tc, is called. It starts X, the X desktop, and also autostarts any custom scripts in /home/tc/.X.d.
#SUMMARY: Scripts Sequence
[BootLoader → bzImage → tinycore.gz] → init → inittab → init.d/rcS → tc-config → ( dhcp.sh & tce-setup & restore.sh & bootsync.sh → bootlocal.sh) → init → /root/.profile → /home/tc/.profile →→→ /usr/bin/startx → ( xsetup.sh) → /home/tc/.xsession → ( Xvesa, jwm & wbar & /home/tc/.X.d/*.* )
Bootloader Process (syslinux, lilo, grub)
- Load Linux Kernel within bzImage (vmlinuz)
- Load RootFS from initrd (core.gz)
- Start Kernel with parameters specified in bootloader command string (see TinyCore Config Process).
- Kernel Starts Init Process (/sbin/init → /bin/busybox init)
Init Process (/sbin/init → /bin/busybox init)
- Configuration from INITTAB (/etc/inittab)
- Defines SYSINIT script Location (/etc/init.d/rcS)
- Establishes TTY configuration
- Defines Script locations for restart, shutdown, etc.
- Starts SYSINIT (/etc/init.d/rcS)
- Mount /proc
- Mount /rootfs
- Mount FSTAB devices (/etc/fstab)
- Starts TinyCore Config Process (/etc/init.d/tc-config)
TinyCore Config Process (/etc/init.d/tc-config)
- Loads function library (/etc/init.d/tc-functions)
- Exports PATH Environment Variable
- Builds MODPROBE Blacklist Config (/etc/modeprobe.d/blacklist.conf)
- Adds all modules listed in BLACKLIST boot parameter
- Populates /dev (/sbin/udevd)
- Starts Loop Kernel Module (/sbin/modprobe → /bin/busybox modprobe)
- Creates Compressed Swap in RAM (/sbin/mkswap → /bin/busybox mkswap)
- Unless NOZSWAP specified in boot parameters
- Adds SCSI drives to fstab
- Unless NOFSTAB specified in boot parameters
- Starts SYSLOG (/sbin/syslogd → /bin/busybox syslogd)
- at location specified in RSYSLOG boot parameter
- Exports LANG Environment Variable
- Configures Timezone as specified in TZ boot parameter (/etc/sysconfig/timezone)
- Configures Real-Time Clock (/sbin/hwclock → /bin/busybox hwclock)
- Unless NOUTC boot parameter is specified
- Configures hostname (/etc/hostname)
- Configures Network Loopback (/sbin/ifconfig → /bin/busybox ifconfig)
- Configures ATA over Ethernet
- Create user named in USER boot parameter (/bin/adduser → /bin/busybox adduser)
- default to 'tc'
- Create Base Directories for TCE Applications
- Load Remote Tiny Core Extensions
- TFTP URL defined in TFTPLIST boot parameter
- HTTP URL defined in HTTPLIST boot parameter
- Mount Filesystems
- NFS mount-point defined in NFSMOUNT boot parameter
- Network Block Device mount-point defined in NBD boot parameter
- TC Virtual Hard Drive defined in TCVD boot parameter
- Load LVM/RAID extensions specified in PRETCE boot parameter
- Setup Persistent 'home' folder
- Setup Persistent 'opt' folder
- Enable Laptop functionality if LAPTOP boot parameter defined
- Disable Swap file if NOSWAP boot parameter defined
- Use swap file as defined in SWAPFILE boot parameter
- Attempt Restore from Hibernation from file defined in RESTORE boot parameter
- Configure Icon location or hide icons if NOICONS boot parameter is defined
- Load Local Tiny Core Extensions (/usr/bin/tce-setup)
- process any .gzs files
- process tcz initrd builtins
- process regular tcz extensions
- process CD extensions
- process scm files
- Configure Key Mappings as defined in KEYMAP boot variable
- defaults to 'US'
- Configure root and user passwords
- Enable encryption of user store
- Configure XORG VESA Video Mode as defined in XVESA boot variable
- Start DHCP Process (/etc/init.d/dhcp.sh)
- Set Time via Real-Time Clock (/etc/init.d/settime.sh)
- Start CRON Process (/etc/init.d/services/crond)
- Start Bootsync Process (/opt/bootsync.sh)
- Autologin as $USER if NOAUTOLOGIN boot parameter is NOT defined
- Pause completion of script execution if PAUSE boot parameter is defined