And Firmware Boot Process

And Firmware Boot Process

ÇÚÖÚÛ Ì ¿ ÓÓØ ÔÖÓ ×× ¯ ÇÚÖÚÛ ¯ ÞÁÑ ÚÓÐÙØÓÒ ¯ ÐÓÔÔÝ ÓÓØ × ØÓÖ¸ ËÓ Ð ¯ ÄÁÄǸ ÊÍ#¸ Ø º ¯ ÁÒØÐ Ê%Å '×( ´ÒØÖ'µ ¯ +ÒÒ Ø ÖÓ ÓØ ¬Ð ×Ý×ØÑ ¯ ÄÒÙÜ Ó ÓØ× ÄÒÙÜ ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ½ Ó ÓØ ÔÖÓ ×× Load kernel Load additional data Hardware/Firmware Pass parameters Boot loader Run init Initialize hardware Mount root file system etc. Load & run boot loader User space Ready driver(s) Find root file system Mount it ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ¾ ÄÓÒ ÞÁÑ End bzImage 1MB Setup 0x90000 2nd stage Boot sector Parameters 0x7c00 e.g. LILO on MBR Started by BIOS 0 ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ¿ ËØÖØÒ ÞÁÑ End High Kernel text+data (gzip) Kernel Kernel extractor 1MB Setup 0x90000 Low 8kB Mover 4kB 0 ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ÐÐÒ× New hard− and firmware Boot process Linux system More complex architecture configurations advances ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ÚÓÐÙØÓÒ Ì ÙÑÐ ÒÒÒ× ÐÓÔÔÝ ÓÓØ × ØÓÖ ¯ #Ó ÓØ× .ÖÓÑ ­ÓÔÔÝ '×(× ¯ ÇÒ (ÖÒÐ ÔÖ ­ÓÔÔÝ ¯ ÃÖÒÐ ÔÖÑØÖ Ò× Ú ÖÚ ËÓ Ð ¯ #Ó ÓØ× .ÖÓÑ Á1 '×(× ¯ ÊÕÙÖ× ÅÒÜ ¬Ð ×Ý×ØÑ ¯ ÃÖÒÐ ÔÖÑØÖ Ò× Ú ÖÚ ¯ Æ'× ¿Ö' ÔÖØÝ ÓÓØ ×Ð ØÓÖ ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ Ð ×Ý×ØÑ ×ØÓÖÝ Limited Unix Minix extfs Big Minix Xiafs Fully featured "modern" Unix ext2 ext3Reiser XFS JFS Journaling ? ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ÈÖÓÐÑ ÆÓÒ¹ÅÒÜ ÖÓ ÓØ ËÓ Ð ÖÕÙÖ' ÅÒÜ Ë Ò'' ÜØÖ ÔÖØØÓÒ ÛØ ÅÒÜ Ë ËÓÐÙØÓÒ4 Ø ÓÓØ ÐÓ'Ö ØÓ ÐÓ' .ÖÓÑ ÓØÖ Ë ÈÖÓÐÑ4 ØÖ Ö ×Ó ÑÒÝ Ó. ØÑ ËÓÐÙØÓÒ4 ÐØ Ø (ÖÒÐ 'Ó Ø ÑÔÔÒ ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ! ÄÁÄÇ ³&¾ Ð× Ö 6ÑÔÔ '7 #Ó ÓØ× .ÖÓÑ ´ÐÑÓ×ص ÖØÖÖÝ ¬Ð ×Ý×ØÑ #Ó ÓØ× .ÖÓÑ ­ÓÔÔÝ ÓÖ ÒÝ Ö' '×( (ÒÓÛÒ ØÓ #ÁÇË #Ó ÓØ ÓÑÑÒ' ÐÒ ÁÒ ÐÙ'× ÓÓØ ×Ð ØÓÖ ÆÓÛ ÑÒØÒ' Ý ÂÓÒ +Ó«ÑÒº ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ " Ð ×Ý×ØÑ ÛÖ¸ ºº *ÊÍ Kernel image Boot loader ext2(ro) Kernel ext2 Disk Meta data Kernel image data ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ½¼ Ð ×Ý×ØÑ ÙÒÛÖ Kernel image Map Boot loader read list Kernel ext2 Disk Meta data Meta data (map file) Kernel image data ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ½½ ÏØ³× ØØÖ . ÅÓ×Ø Ô ÓÔÐ 'ÓÒ³Ø ÒÓØ +ÓÒ××ØÒ Ý ( ¯ ÀÖ'ÛÖ ÐÑØØÓÒ× ´ºº Ê%Å '×(¸ Æ˵ ¯ +ÓÒ¬ÙÖØÓÒ ¬Ð ´ºº .ÓÖ ÓÑÑÒ' ÐÒµ %ÙØÓÒÓÑÝ ¯ È ( ÒÝ (ÖÒÐ ¯ Ð ×Ý×ØÑ ÒÚØÓÒ ¯ 'ØÓÖ¸ Ï ÖÓÛ×Ö¸ = ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ½¾ /Ò 0ØÙÖ× Etherboot Floppy boot Alpha GRUB LILO ARM LOADLIN i386,ia64 nuni m68k Netboot Linux User SysLinux MIPS(64) kernel space ... PPC S390 Narrow, stable SuperH interface (Ultra)SPARC ... ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ½¿ ÈÖÓÐÑ 1ÖÚÖ ÓÒ­ Ø× ÀÖ'ÛÖ ÙØÓ¹'Ø ØÓÒ × ÙÒÖÐÐ4 ¯ ÀÖ'ÛÖ ? ÑÝ ÐÓ ( ÙÔ ÛÒ ÔÖÓÒ .ÓÖ Ö'ÛÖ @ ¯ 1ÖÚÖ ÑÝ Ñ×¹'Ø Ø Ö'ÛÖ ? × @¸ Ò' Ö× 6ÒÖ (ÖÒÐ7 × ÒÓØ ÔÓ××Ð ËÓÐÙØÓÒ4 ÐÓ' 'ÖÚÖ ÑÓ 'ÙÐ× ÛÒ Ò'' ÈÖÓÐÑ4 ÛØ . 'ÖÚÖ .ÓÖ ÖÓ ÓØ ¬Ð ×Ý×ØÑ Ò'× ØÓ ÐÓ'' = ËÓÐÙØÓÒ4 ÓÓØ ÐÓ'Ö ÐÓ'× Ê%Å '×( × ØÑÔ ÓÖÖÝ ÖÓ ÓØ ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ½ ÁÒØÐ Ê/Å ×3 ´½º¿º7¿ ¿»&9µ 1×Ò' Ò Ó ÓÔ ÖØÓÒ ÛØ ÀÒ× ÄÖÑÒ May be made available as /dev/initrd initrd Copied by RAM disk driver (may de−compress) RAM disk Loaded by boot loader Run /linuxrc Mount real root Data Kernel ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ½ Ò ÖÓÓØ ´½º¿º7¿¸ ÅÖ ³&9µ / Root and cwd of process 1 change_root new_root /initrd umount root_dev ÌØÐÝ ÒØÖØ' ´Ù×× ÐÓØ× Ó. 6Ñ 7µ ÇÒÐÝ ÛÓÖ(× .ÓÖ ÖÙÐÖ ÐÓ ( 'Ú × ´×Ô Ð ×4 Æ˵ # (ÖÓÙÒ' ÔÖÓ ××× ÑÝ (Ô ÓÐ' ÖÓ ÓØ Ù×Ý +Ò ÓÒÐÝ Ù×' ÓÒ ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ½ Ô ÚÓØ ÖÓÓØ ´¾º¿º;½¸ ÂÒ ³¼¼µ / Root and cwd of all processes pivot_root new_root (usually cwd of the old_root current process) mount umount ÏÓÖ(× ÛØ ÒÝ ¬Ð ×Ý×ØÑ +Ò ÖÔ Ø' ÎÖÝ ÙÐÝ ×ÓÐÙØÓÒ .ÓÖ 'ÑÓÒ× ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ½ ÍÒÓÒ ÑÓÙÒØ× ´0ÙØÙÖµ Root and cwd of all processes mount / umount remount new_root old_root 1×Ò' Ý ÎË ÙÖÙ %ÐÜÒ'Ö ÎÖÓ %× ÒÖ × ÔÚÓØ ÖÓÓØ +ÐÒ ×ÓÐÙØÓÒ .ÓÖ 'ÑÓÒ× ÏÐÐ ÔÖÓÐÝ ÛÓÖ( ÛØ Ü×ØÒ ×Ý×ØÑ ÐÐ× Ò' ØÓ ÓÐ× ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ½! ÈÖÓÐÑ ÜÓØ 3ÖÒÐ ×ÓÙÖ ÆÛ ÓÑÔÐÜ ¬Ð ×Ý×ØÑ×4 ¯ ÆÓ ÐÓ (×4 ÌÐ× ´ºº Ò Ê×Ö˵¸ 1Ø×¹ÓÖÒØ' ¯ #ÐÓ (× ÑÓÚ4 ÂÓÙÖÒÐÒ ¯ ÆÓ 'Ö Ø ÑÔÔÒ4 Ê%Á1 ÃÖÒÐ× ×ØÓÖ' Ø ÙÒÙ×ÙÐ ÔÐ ×4 ¯ ÌÌȸ Æ˸ ÀÌÌȸ ÀÌÌÈ˸ ¯ +Ö ØÖ 'Ú BÙ×Ø ÐÓ'Ò Ø (ÖÒÐ Ø× Ö'Ö ËÓÐÙØÓÒ4 ÐØ Ø ÄÒÙÜ ×Ý×ØÑ 'Ó Ø ÐÓ'Ò ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ½" ÄÒÙÜ Ó ÓØ× ÄÒÙÜ ´½µ ËÑÔÐ ÓÓØ ÐÓ'Ö ÐÓ'× ÓÓØ (ÖÒÐ 1ÖÚÖ ×ØÙÔ Ù×Ò ÒØÖ' ÅÝ Ù×Ö ÒØÖ ØÓÒ ´ºº ÓÓØ ×Ðе ÄÓ'× ÖÐ (ÖÒÐ ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ¾¼ ÄÒÙÜ Ó ÓØ× ÄÒÙÜ ´¾µ Kernel memory initrd Move pages Disk Load kernel and initrd Set up parameters Param Enter right CPU and Run mover Mover MMU mode Jump to new kernel ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ¾½ ÄÒÙÜ Ó ÓØ× ÄÒÙÜ ´¿µ Ì ØÑ × ÖÔ 4 ¯ ÄÇ#ÇË ´ÊÓÒ ÅÒÒ µ ¯ Ó ÓØÑ ´ÏÖÒÖ %ÐÑ× ÖÖµ ¯ ÌÛÓ ÃÖÒÐ ÅÓÒØ ´Ö( ÀÒ'Ö(×µ ÅÓÖ .ÙÒ ÛØ ÓÓØÒ4 ¯ À¹×Ô ' Ö Ó ÓØ ´ º ½D × µ ¯ ÄÒÙÜ#ÁÇË ¯ +Ö× 1ÙÑÔ ÈÖÓÐÑ4 Æ #ÁÇË ÐÖ× ÑÑÓÖÝ ÓÒ Ö Ó ÓØ Æ +ÒÒÓØ Ù× ÙÖÖÒØ 'ÖÚÖ× ´ÓÖ #ÁÇ˵ ËÓÐÙØÓÒ4 Æ ÃÔ ×ÑÐÐ ×Ý×ØÑ Ò×' ÙÖÖÒØ ×Ý×ØÑ Æ Ê×Ø 'ÖÚÖ× Ò' ÛÖØ 'ÙÑÔ ÓÒ Ö× ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ¾¾ Ì ÛÓÐ ØÖÙØ Hardware startup Firmware (BIOS) Boot selector Legacy OS Linux−capable boot loader Linux loader Linux kernel Mount initrd /linuxrc Mount root file system /sbin/init System runs ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ¾¿ ÙØÙÖ ÍÒÓÒ ÖÓ ÓØ ÑÓÙÒØ ÖÐÝ .ÖÒ Ó. ÒØÖ' Ô× ¯ Ê'Ù Ô( ÑÑÓÖÝ Ù× ÄÒÙÜ Ó ÓØ× ÄÒÙÜ ¯ ËÑÐÐ + ÐÖÖÝ ÓÖ ÓÓØ ×ÐÐ ¯ ÈÖÑØÖ Ô××Ò #ØØÖ ×ÙÔÔ ÓÖØ .ÓÖ Ê%Á1¸ Ø º ¯ ËÔ ÐÞ' ÐÓ'Ö× ¯ ÈÖØÐ ÓÒÚÖÒ .ÓÖ ×ÑÔÐ ÐÓ'Ö× ¯ ÜØÒ'' 'Ø ÐÓ ØÓÒ Ò.ÓÖÑØÓÒ .ÖÓÑ (ÖÒÐ ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ¾ ÄÒ3× 1Ö ØÓÖÝ4 ØÔ »» ØÔºÔ Ðº »ÔÙ»ÔÓÔл ÐÑ×Ö»ÓÓØÒ» Ì× ÔÖ×ÒØØÓÒ4 ÓÐ×¹ ÓÓØÒ¹ ×Ð׺Ô×ºÞ ÓÐ×¹ ÓÓØÒ¹ ×Ð×ºØ ÖºÞ ÈÔ Ö 6#Ó ÓØÒ ÄÒÙÜ4 Ì À×ØÓÖÝ Ò' Ø ÙØÙÖ74 ÓÓØÒÐÒÙܹ ÙÖÖÒغÔ×ºÞ ÓÓØÒÐÒÙܹ ÙÖÖÒØºØ ÖºÞ ÏÖÒÖ ÐÑ× Ö Ö Ó ÓØÒ ÄÒÙÜ Ì À×ØÓÖÝ Ò Ø ÙØÙÖ ¾.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    26 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us