Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dcore:system_start_and_boot-codes [2016/05/08 05:48] – [Synopsis] nitramdcore:system_start_and_boot-codes [2017/09/25 06:49] (current) – [Check boot-parameters] sm8ps
Line 1: Line 1:
-======Boot-Process and -codes====== +====== dCore Boot Process and Boot Codes ====== 
-Let's study the boot process more in-depth! We shall dissect some of the relevant scripts and isolate the role of most of the boot-codes.+An indepth review of the boot process, including relevant scripts and a boot code summary. The version used for this review was dCore-trusty, release version 20150429, and the 'vmlinuz-trusty' kernel, version 3.16.6. Although there are many similarities between dCore and Tiny Core, this review focuses solely on dCore. 
 +===== Suggested Readings ===== 
 +Although primarily related to Tiny Core, The following resources contain excellent material to help understand the boot process: 
 +  * Detailed overview of the [[wiki:the_boot_process|Tiny Core boot process]] 
 +  * The [[http://tinycorelinux.net/book.html|Into the Core book]] is a thorough introduction to Tiny Core 
 +  * Tiny Core's [[wiki:boot_codes_explained|boot codes explained]] 
 +  * Tiny Core's [[wiki:boot_options|boot codes]] 
 +===== Early Boot =====
  
-The version chosen here is dCore-trusty with initrd 'ub-dCore-trusty' (of 20150429, cf. the full [[dcore:boot-scripts_source_20150429|source]]; as of 20150702, the prefix "ub-" has been [[http://forum.tinycorelinux.net/index.php/topic,18530.0.html|dropped]]) associated with kernel 'vmlinuz-trusty' version 3.16.6 (of 20150314). Although there is much common ground between dCore and TinyCore, this exposition focuses on dCore alone.+The [[https://en.wikipedia.org/wiki/Boot_loader|boot loader]] dumps the chosen kernel into RAM and let's it do its thingAmong many other things, it unpacks the specified initial RAM disk and hands control over to the init script on the initrdThis is where we shall begin with our study.
  
-===== Suggested readings ===== +The boot codes are available in the full boot stanza from '/proc/cmdline'.
-The following sources contain excellent material; they are, however, coined towards TinyCore but can help complete the information presented here below. +
-  * A detailed over-view of the [[wiki:the_boot_process|boot process]] of TinyCore +
-  * [[http://distro.ibiblio.org/tinycorelinux/corebook.pdf|The CoreBook (PDF)]] is a very thorough introduction for TinyCore +
-  * An explanation of the most common [[wiki:boot_codes_explained|boot-codes by example]] (for TinyCore) +
-  * For comparison: a list of TinyCore-[[wiki:boot_options|boot-codes]] +
-=====Early booting===== +
- +
-The boot-loader dumps the chosen kernel into RAM and let's it do its thing. Among many other things, it unpacks the specified initial RAM disk and hands control over to the init script on the initrd. This is where we shall begin with our study. +
- +
-The boot-codes are available in the full boot stanza from '/proc/cmdline'.+
  
 ===='init' (on initrd)==== ===='init' (on initrd)====
Line 109: Line 106:
   *Standard procedures, after which control is passed to '/etc/init.d/tc-config' which will do the bulk of work.   *Standard procedures, after which control is passed to '/etc/init.d/tc-config' which will do the bulk of work.
  
-=====dCore taking over: '/etc/init.d/tc-config'=====+=====dCore Takes Over: '/etc/init.d/tc-config'=====
  
 This script stretches out over several hunderd lines of code. We shall dissect it in smaller chunks. This script stretches out over several hunderd lines of code. We shall dissect it in smaller chunks.
Line 146: Line 143:
  
  
-====Check boot parameters====+====Check boot-parameters====
  
-  - check the boot stanza for boot-codes with values and store them as variables, with the appropriate value, if applicable. +  - check the boot-stanza for boot-codes with values and store them as variables, with the appropriate value, if applicable. 
-  - check the boot stanza for boot-codes without values and store them as variables of value 1.+  - check the boot-stanza for boot-codes without values and store them as variables of value 1.
  
 Thus we have the following list of boot-codes and variables with values: Thus we have the following list of boot-codes and variables with values:
Line 189: Line 186:
  
   * **multivt** and **noembed** in 'init' (on initrd) as seen above   * **multivt** and **noembed** in 'init' (on initrd) as seen above
-  * **lst** (TARGETLIST, defaults to 'onboot.lst') and cde (CDE) in '/usr/bin/tce-setup'+  * **lst** (TARGETLIST, defaults to 'onboot.lst') and **cde** (CDE) in '/usr/bin/tce-setup'
  
 +=== Kernel boot-parameters ===
 +Additional boot-codes have been treated by the kernel at boot-time already. One [[http://forum.tinycorelinux.net/index.php/topic,21401.0.html|notable case]] is //resume// which, although similar in syntax to //home//, //opt// and //tce// does not accept disk LABELs.
 ==== Starting the work ==== ==== Starting the work ====
  
Line 501: Line 500:
  
  
-=====Shell inits=====+=====Shell Inits=====
  
 A login shell first reads commands from the files '/etc/profile' and '.profile' if they exist. If ENV is set on entry to a shell, or is set in the .profile of a login shell, the shell next reads commands from the file named in ENV. (Cf. [[http://linux.about.com/library/cmd/blcmdl1_ash.htm|source]].) ENV is indeed set to '~/.ashrc' in '~/.profile' (see below). A login shell first reads commands from the files '/etc/profile' and '.profile' if they exist. If ENV is set on entry to a shell, or is set in the .profile of a login shell, the shell next reads commands from the file named in ENV. (Cf. [[http://linux.about.com/library/cmd/blcmdl1_ash.htm|source]].) ENV is indeed set to '~/.ashrc' in '~/.profile' (see below).
Line 593: Line 592:
   - (commented out) start an Xterm as a background process.   - (commented out) start an Xterm as a background process.
  
 +=== Auto-start files === 
 +Note that files under '~/.X.d/' must contain backgrounded commands, i.e. with trailing "&".
 ====Log-console==== ====Log-console====
  
Line 605: Line 605:
   *acts as a log console   *acts as a log console
  
-**[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore wiki welcome page]]**+**[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]**
Print/export
QR Code
QR Code dcore:system_start_and_boot-codes (generated for current page)