spacewalk-blackDebugging through the steps of an RHN Satellite or Spacewalk PXE boot and Kickstart is a pretty complicated task. This article shows the steps that are involved in such a boot process. Hopefully, this will clear up a little bit and help debugging the process:

Phase 1 – Installation from RHN Satellite / Spacewalk

POST

The first step in a typical x86 boot is the Power On Self Test. This should be invisible, unless there is some hardware problem. In that case, the motherboard will probably emit some sort of beep.

BIOS / UEFI

The next step in a typical x86 boot process is the BIOS or the UEFI. this is the menu that will allow you to tweak a.o. the list and order of devices to boot.

NIC –(DHCP broadcast)–> DHCP Server

The next thing that will happen, provided that the BIOS or UEFI is configured to boot through the network interface, is that the firmware of the NIC card will emit a DHCP broadcast to get an IP address.

DHCP Server –(Network info, next-server, PXE filename)–> NIC BIOS

The DHCP server should respond with the following parameters:

  • Network configuration information (IP address, netmask, etc.)
  • A next-server setting, which is the IP address of the TFTP server (should be that of the Satellite / Spacewalk server)
  • A filename, which is the name of the file to retrieve on the TFTP server
NIC BIOS –(TFTP request for pxelinux.0)–> TFTP / PXE Server

The NIC will then issue a TFTP packet to the the TFTP server, requesting the file.

TFTP / PXE Server –(pxelinux.0)–> NIC BIOS

The TFTP server (which is provided by Cobbler on the Satellite / Spacewalk server) responds with the pxelinux.0 file.

pxelinux.0 –(PXE request for kernel & boot params)–> TFTP / PXE server

The pxelinux.0 binary file executes and sends a request to Cobbler to retrieve the kernel and boot parameters.

TFTP / PXE Server –(kernel & boot params & kickstart config file location)–> pxelinux.0

Cobbler responds with the kernel, the boot parameters and the location of the Kickstart file.

Kernel –(Request for kickstart config file)–> HTTP Server

The kernel is executed and, as one of its command line parameters is the URL of the Kickstart file, it sends out a request to the Satellite / Spacewalk server for the Kickstart file.

HTTP Server –(Kickstart config)–> Kernel

The RHN Satellite server responds with the Kickstart configuration file.

Anaconda –(Request for RPMs)–> HTTP Server

Anaconda, the Red Hat installer, proceeds with the installation of the system, according to the answers found in the Kickstart configuration file, requesting RPMs from the Satellite server.

HTTP Server –(RPMs)–> Anaconda

The Satellite hosted RPM repository sends all the RPM packages to Anaconda.

Anaconda –(Request for post-install scripts)–> HTTP Server

Anaconda sends out a request for the post-installation scripts.

HTTP Server –(Post-install scripts)–> Anaconda

The Satellite server responds with the post-installation scripts.

Post-install scripts –(rhnreg_ks with activation keys)–> Satellite

The post-installation scripts are executed and a.o. launch rhnreg_ks with the list of activation keys linked to the Kickstart profile selected in the PXE boot menu.

rhn_check –(request for actions)–> Satellite

The post-installation scripts execute an rhn_check.

Satellite –(configuration file deployment)–> rhn_check

Depending on the configuration of the activation keys, additional packages are installed or configuration files are deployed.

Reboot

The client reboots.

Phase 2 – First boot

POST

The first step in a typical x86 boot is the Power On Self Test. This should be invisible, unless there is some hardware problem. In that case, the motherboard will probably emit some sort of beep.

BIOS / UEFI

The next step in a typical x86 boot process is the BIOS or the UEFI. this is the menu that will allow you to tweak a.o. the list and order of devices to boot. In theory, the PXE boot menu should display and then swithc to booting the first disk.

Grub stage1 (MBR)

The first boot sector of the first disk, the Master Boot Record, is executed.

Grub stage1.5

Depending on the filesystem used for the /boot partition, the corresponding Grub stage1.5 is executed.

Grub stage2

Grub stage2 is found on the /boot partition.

Kernel load (partition boot sector)

Execution is handed over to the first sector (boot sector) of the partition on which the root filesystem is located and the Linux kernel is loaded.

Hardware detection

Linux proceeds to detecting hardware.

Initrd load into /sysroot

The initial RAM disk that contains a.o. hardware drivers needed to access the root partition is loaded in memory.

Remount /

The device that contains the root partition is remounted on / and the initial RAM disk is mounted in /sysroot.

/sbin/init execution

Init, the father of all processes, is executed.

/etc/rc.d/rc.sysinit

The /etc/rc.d/rc.sysinit script is executed.

/etc/event.d/

The scripts in /etc/event.d/ are executed.

/etc/rc.d/init.d/functions

The functions in /etc/rc.d/init.d/functions are sourced.

/etc/rc.d/rc[3,5].d/K* stop

Depending on the default runlevel specified in /etc/inittab, the scripts in /etc/rc.d/rcx.d/K* are executed with the stop parameter, with x being the runlevel.

/etc/rc.d/rc[3,5].d/S* start

Depending on the default runlevel specified in /etc/inittab, the scripts in /etc/rc.d/rcx.d/S* are executed with the start parameter, with x being the runlevel.

/etc/rc.local

The /etc/rc.local script is executed.

/sbin/mingetty -> 6 virtual consoles

The 6 virtual consoles available through the Alt-Fx keys are started.

/etc/X11/prefdm

The /etc/X11/prefdm script is executed. This will in turn launch gdm, if the chosen graphical environment is Gnome.

0 réponses

Laisser un commentaire

Participez-vous à la discussion?
N'hésitez pas à contribuer!

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.