Olimex CS-E9302: Documentation: Linux Boot Overview

Linux Boot Process Overview

A good overview of how a typical Linux desktop starts up is here:

http://www.linux.com/article.pl?sid=04/06/23/1734235

"This article is excerpted from the newly published book How Linux Works.

As it turns out, there isn’t much to the boot process:

1.A boot loader finds the kernel image on the disk, loads it into memory, and starts it.

2.The kernel initializes the devices and its drivers.

3.The kernel mounts the root filesystem.

4.The kernel starts a program called init.

5.init sets the rest of the processes in motion.

6.The last processes that init starts as part of the boot sequence allow you to log in."

In particular, for our CS-9302 board:

After Redboot initializes the chip, it will load image files called ramdisk.gz and zImage from the Flash Image System and execute the Linux Kernel (see RedBoot notes).

The ramdisk.gz image contains all the files used by the system compressed into a nice small image file. This image file is decompressed and stored into RAM. NOTE: on reboot, all the RAM is overwritten, so if you want to save a file, you have to include it in this image (or store it in flash memory somewhere else).

After the file system is installed, it will decompress the zImage file and store its contents in RAM. Then it will execute the program installed by zImage – the Linux Kernel.

This entire process is specified in the RedBoot startup script which is shown here:

RedBoot> fconfig -l

Run script at boot: true

Boot script:

… fis load ramdisk.gz

… fis load zImage

… exec -r 0x800000 -s 0x800000 -c “console=ttyAM root=/dev/ram”

Once Redboot “jumps” into the zImage executables, it is no longer available, you must reboot the syetem to access RedBoot again.

The linux kernel starts up various drivers for the file system, USB and network devices (probably some other stuff too).

Once the linux Kernel is started, the startup process includes the following:

file: /etc/inittab gets interpreted and starts stuff (a little like a config.sys file)

file: /etc/rc.sysinit (like an autoexec.bat)

sets path, usually: PATH=/usr/bin:/bin:/usr/sbin:/sbin

mounts devices

starts syslogd (keeps a log file, view with “logread”)

configures the network

starts up some network stuff

sets up the serial port speed

sets up the console “shell” on the serial port (you get a prompt)

If the serial port is connected to a terminal and someone presses “enter” a command line prompt is displayed. Note, this may not be useful if you need the serial port for something else, or you want to secure your system in an unsecure embedded environment.

==========

Not sure what type of Linux distribution this is based on - netbsd? debian?

Also, are there other files involved in the boot process?

Thanks.