kernel 's command-line parameters

 

 

 


查看執行中的 Kernel boot opts

 

cat /proc/cmdline

ro root=LABEL=/ rhgb quiet

 


boot screen

 

quiet = 表示在啟動過程中只有重要信息顯示

rhgb = redhat graphical boot

This is a GUI mode booting screen with most of the information hidden

while the user sees a rotating activity icon spining and brief information as to what the computer is doing.

splash = The picture that's gets displayed in the background while booting the Linux operating system.

Grub

GRUB v2

File format: *.jpg *.JPG *.jpeg *.JPEG *.png *.PNG *.tga *.TGA

Pixels: 640×480, 1024×768

Colors: 24 / 32 bits

GRUB v1

File format: xpm (X PixMap image)

Pixels: 640×480

Compression: gzip

Colors: 14

Step To Create Image

By ImageMagick

convert -depth 8 -colors 14 -resize 640x480 MySplash.jpg MySplash.xpm    # For GRUB v1

gzip MySplash.xpm

cp MySplash.xpm.gzip /boot/grub/

/boot/grub/grub.conf

splashimage=(hd0,0)/grub/MySplash.xpm.gz

Kernel

pngtopnm company_logo.png | ppmquant -fs 223 | pnmtoplainpnm > logo_linux_clut224.ppm

 


vga

 

Select a particular video mode

This is actually a boot loader parameter; the value is passed to the kernel using a special protocol.

vga=792 相當於 vga=0x318

Options

  • vga=0x31b --> 1280x1024x32 # Colour depth
  • vga=0x34d --> 1600x900x32
  • vga=0x31e --> 1600x1200x32

 

 


Update boot setting

 

Grub2

Centos 7/8 改用了 Grub2,

如果修改了 /etc/default/grub

就要執行

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

否則 /proc/cmdline 不會有更新