User Tools

Site Tools


linux:linux_boot_order

Linux kernel boot process

During boot process, the system will read the grub config to be able to load the kernel with it associated modules containing into initrd.

Initial RAM disk (initrd or Initramfs) is a RAM filesystem mounted at startup to initialize kernel modules.

Initrd

Rebuild initrd

# dracut -f

Another example to add multipathing

# dracut --force --add multipath

Regenerating the initramfs

  • Adding Drivers Because of Hardware Changes
  • Moving System Directories to a RAID or LVM
  • Adding Disks to an LVM Group or Btrfs RAID Containing the Root File System
  • Changing Kernel Variables (sysctl)
  • Adding or removing swap devices, re-creating swap area, it required also to recreate grub

You can read the content of initrd

# lsinitramfs /boot/initrd.img

Uncompress initrd

# mkdir /tmp/initrd
# cd /tmp/initrd
# cp /boot/initrd.img .
# unmkinitramfs initrd.img .

Grub

Generate a new grub.cfg on BIOS based server

# grub2-mkconfig -o /boot/grub2/grub.cfg

Generate a new grub.cfg on UEFI based server

# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

Check the syntax of grub.cfg

# grub2-script-check /boot/grub2/grub.cfg
linux/linux_boot_order.txt · Last modified: 2024/09/22 21:43 by manu