This part covers the steps involved in getting a Linux system booted, and the various customisations possible.
grub
boot manager is installed by Linux as O/S entry point
/boot/grub/grub.cfg
or
/boot/grub/menu.lst
(Ubuntu and most sytems)
/etc/grub2.cfg
(Fedora)
init
(many older Linux's),
the upstart
process (Ubuntu 11.10 - 14.04) or systemd (Fedora 16+).
Note:
Debian is moving to systemd and Ubuntu will drop upstart
in favour of systemd. Very contentious!
init
/etc/inittab
# Startup the system
::sysinit:/bin/mount /proc
::sysinit:/bin/mount -a
::sysinit:/bin/mount -o remount,rw,noatime /
::sysinit:/bin/ln -s /proc/mounts /etc/mtab
::sysinit:/sbin/swapon -a
::sysinit:/usr/sbin/sshd
# Run any rc scripts
::sysinit:/etc/init.d/rcS
/etc/init.d/rcS
This is the replacement method used by Ubuntu upto 14.04 http://upstart.ubuntu.com/)
init
boot method was developed for static computer systems.
Now with plug-n-play, devices and services need to be handled dynamically
upstart
system is an event based system
and responds to events in /etc/init
/etc/init/rc.conf
/etc/init.d/rc[0-6]
for the appropriate runlevel
ifup -a
to start the network devices
This is the method now used by Fedora 15+ (see http://fedoraproject.org/wiki/Systemd) and future versions of Debian and Ubuntu
systemctl enable foo.service
systemctl stop foo.service
exec hostname -b -F /etc/hostname
while /etc/hostname in VirtualBox contains "newmarch-VirtualBox"
[ -f /etc/sysconfig/network ] || exit 0 . /etc/init.d/functions . /etc/sysconfig/network
if [ -d /etc/profile.d ]; then for i in /etc/profile.d/*.sh; do if [ -r $i ]; then . $i fi done unset i fi if [ "$PS1" ]; then if [ "$BASH" ]; then PS1='\u@\h:\w\$ ' if [ -f /etc/bash.bashrc ]; then . /etc/bash.bashrc fi else if [ "`id -u`" -eq 0 ]; then PS1='# ' else PS1='$ ' fi fi fi umask 022
# Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH unset USERNAME
alias dir="ls -l"
alias dir="ls -l"
export JAVA_HOME=/usr/jdk
export JAVA_HOME=/usr/jdk
cleanup() { rm *~ }
cleanup() { rm *~ }
who -r
to show the current runlevel
telinit 3
to change to runlevel three, etc
Booting up a Linux system requires starting hardware and software to manage this hardware. Logging in a user requires setting various parameters both from system files and from user overrides. Fedora, Debian and other systems accomplish the same results but have minor variations in how they do it.