1. arch引导过程
2. SYSLINUX
3. Windows引导加载程序
4. See Also

1. arch引导过程

https://wiki.archlinux.org/index.php/Arch_boot_process#Boot_loader
https://en.wikipedia.org/wiki/Linux_startup_process
https://developer.ibm.com/articles/l-linuxboot/
参考以上页面整理启动过程表格如下:

power on 可能的选择 本机 呈现给用户的界面 用户操作 备注
固件: POST自检;
初始化硬件;
BIOS(COMS), UEFI BIOS POST自检过程, (可选) 进入COMS设置;
(可选) 选择启动媒介
Firmware 固件存储在主板本身的闪存中
主引导记录 MBR, GPT MBR     存储在硬盘(光盘,U盘)上
引导加载程序 GRUB,LILO,SYSLINUX,Loadlin GRUB 引导界面 (可选) 选择启动OS 多系统引导
内核加载,启动 Linux, BSD Kernel 非常多的快速加载的条目...
也有些系统配置为隐藏部分或全部...
   
早期用户空间, initrd, initramfs initramfs   initramfs也被称为早期用户空间
启动脚本 初始化 sysv, bsd, runit; systemd, upstart systemd   系统总管 systemd
getty       如果系统上存在“ getty”,则可以启动显示管理器。
Display manager lightdm(xfce); gdm(gnome)… lightdm 登陆窗口 (必须) 输入密码 可以将显示管理器配置为替换tty上的getty登录提示。
Login         验证/etc/passwd; 设置环境变量...
etc/motd     消息   显示/etc/motd的内容(当天的消息)
Login shell bash, sh, fish, zsh… bash     Ctl: /etc/profile; ~/.bash_profile\.bash_login\.profile
GUI: 启动用户会话; /etc/profile, ~/.profile
WM > GUI xfce, gnome, mate, cinnamon… xfwm>xfce Linux 桌面 可以开始使用了 xinit or wayland, 启动窗口管理器
non-login shell bash, sh, fish, zsh… fish 桌面终端 桌面终端中使用命令操作 通常会运行配置文件,例如bashrc。


linux系统在grub1中的启动菜单:

title Install mint20 root
root (hd0,2)
kernel /mint20/vmlinuz boot=casper iso-scan/filename=/mint20/linuxmint-20-xfce-64bit.iso ro quiet splash locale=zh_CN.UTF-8
initrd /mint20/initrd.lz
title Install mint20 find
find --set-root --ignore-floppies --ignore-cd /mint20/initrd.lz
kernel /mint20/vmlinuz boot=casper iso-scan/filename=/mint20/linuxmint-20-xfce-64bit.iso ro quiet splash locale=zh_CN.UTF-8
initrd /mint20/initrd.lz
itle Install Arch2020-05 label
root (hd0,2)
kernel /arch/vmlinuz archisolabel=ARCH_202005
initrd /arch/archiso.img
title Install Gentoo 0520
root (hd0,2)
kernel /gentoo/g520/boot/gentoo root=/dev/ram0 init=/linuxrc dokeymap looptype=squashfs loop=/gentoo/g520/image.squashfs cdroot
initrd /boot/gentoo.igz
title install manjaro.20 root
root (hd0,2)
kernel /manjaro20/vmlinuz-x86_64 misolabel=MANJARO_XFCE_2003 boot=casper iso-scan/filename=/manjaro20/manjaro-xfce-20.0.3-200606-linux56.iso locale=zh_CN.UTF-8
initrd /manjaro20/initramfs-x86_64.img
title install manjaro.20 find
find --set-root --ignore-floppies --ignore-cd /manjaro20/initramfs-x86_64.img
kernel /manjaro20/vmlinuz-x86_64 misolabel=MANJARO_XFCE_2003 boot=casper iso-scan/filename=/manjaro20/manjaro-xfce-20.0.3-200606-linux56.iso locale=zh_CN.UTF-8
initrd /manjaro20/initramfs-x86_64.img
title Install Ubuntu18 (rm)
root (hd0,2)
kernel /ubuntu18/vmlinuz boot=casper iso-scan/filename=/ubuntu18/ubuntu-18.iso ro quiet splash locale=zh_CN.UTF-8
initrd /ubuntu18/initrd
title install fedora3 OK (rm)
root (hd0,2)
kernel /vmlinuz root=live:/dev/sda3 rootfstype=auto ro rd.live.image quiet
initrd /initrd.img
Boot

注意事项:

Mintlinux, ununtu等安装时不能分区?
$ lsblk -f
$ sudo -i
# umount -l /isodevice
Arch, manjaro, 提相关示没有找到label?
# blkid
# mkdir sa3
# mkdir iso
# mount /dev/sda3 /sa3
# mount /sa3/linux/*.iso /iso
# exit

2. SYSLINUX

https://en.wikipedia.org/wiki/SYSLINUX
SYSLINUX项目是一套轻量级的主引导记录(MBR),引导装载程序用于启动IBM PC兼容 的计算机与Linux内核。
由多个用于不同目的的独立系统组成:

  • SYSLINUX: 用于从FAT和NTFS文件系统(例如软盘和USB驱动器)引导。
  • ISOLINUX: 用于从CD-ROM ISO 9660文件系统启动。
  • PXELINUX: 用于使用预引导执行环境(PXE)系统从网络服务器引导。

grub1中的CD启动菜单

title CD/DVD 1
cdrom --init
map --hook
chainloader (cd0)
boot
title Myiso.iso
map --mem /ghos/myiso.iso (hd32)
map --hook
chainloader (hd32)
boot

3. Windows引导加载程序

https://en.wikipedia.org/wiki/Windows_startup_process
https://en.wikipedia.org/wiki/Windows_NT_startup_process
https://en.wikipedia.org/wiki/Windows_NT_6_startup_process

  • Win9x: io.sys (Win98/ME)
  • WinNT: NTLDR (WinXP/2000/2003)
  • WinNT6: BOOTMGR (Vista+)

Windows在grub1中的启动菜单:

title Win98/95/ME/DOS
find --set-root /io.sys
chainloader /io.sys
title WinXP/2000/2003
find --set-root /ntldr
chainloader /ntldr
title Win7/Win8/Win10
find --set-root /bootmgr
chainloader /bootmgr
title windows2008 ok
root (hd0,0)
makeactive
chainloader +1

4. See Also

https://en.wikipedia.org/wiki/Comparison_of_boot_loaders

初始虚拟磁盘
https://en.wikipedia.org/wiki/Initial_ramdisk
在计算中(特别是在Linux计算方面),initrd(初始ramdisk)是一种用于将临时根文件系统加载到内存中的方案,可以将其用作Linux启动过程的一部分。initrd并initramfs参考实现此目的的两种不同方法。两者都通常用于在挂载真实的根文件系统之前进行准备。

https://en.wikipedia.org/wiki/List_of_Linux_distributions_that_run_from_RAM
https://en.wikipedia.org/wiki/List_of_tools_to_create_Live_USB_systems
https://en.wikipedia.org/wiki/List_of_web_browsers_for_Unix_and_Unix-like_operating_systems
https://wiki.gentoo.org/wiki/Dual-boot_Gentoo_and_Windows_7_with_BIOS-powered_software_raid
https://wiki.gentoo.org/wiki/Complete_AMD64_Handbook/Configuring_the_boot_process