linux Æô¶¯ÐÒé·ÖÎö ÓÉboot.txt·Òë¶øÀ´
ÔÚx86ƽ̨ÉÏ£¬linuxÄÚºËÓÃÁËÒ»¸ö±È½Ï¸´ÔÓµÄÆô¶¯ÐÒé¹æ·¶£¬Ö÷ÒªÓÉÓÚÀúÊ·ÔÒò£¬ÔçÆÚÏë°ÑÄÚºË×ö³É¿ÉÆô¶¯Ó³Ïñ£¬¸´ÔӵļÆËã»úÄÚ´æÄ£ÐͺÍÓÉÓÚʵģʽDOS³ÉΪÖ÷Á÷²Ù×÷ϵͳ¶øÓ°ÏìµÄ.
ÏÖÔÚÓÐÏÂÁÐÆô¶¯ÐÒé´æÔÚ£º
¾É°æÄںˣºÖ»Ö§³ÖzImageºÍImage.
2.00£ºÔö¼ÓbzImageºÍinitrdÖ§³Ö£¬Ò²ÓµÓÐÁËÒ»ÖÖÕý¹æ»¯µÄ·½·¨À´ÊµÏÖÆô¶¯×°ÔØÆ÷£¨* boot
loader£©ºÍÄں˼äµÄͨÐÅ¡£setup.S½¨ÔìÁËÒ»¿é¿ÉÒƶ¯£¬µ«ÊÇÈԾɿÉдµÄ´«Í³µÄ°²×°³ÌÐò¼ÓÔØÇøÓò¡£
2.01£ºÔö¼ÓÁËһЩÒç³ö¾¯¸æ
2.02£ºÕâÊÇеÄÃüÁîÐÐÐÒé¡£Ëü½µµÍÁ˳£¹æµÄÄÚ´æʹÓÃÉÏÏÞ£¨* ¼ûÒÔÏÂMEMORY
LAYOUTÄÚ´æ²¼¾Ö½éÉÜ£©¡£Ã»Óи²¸Ç´«Í³µÄ°²×°³ÌÐòÇøÓò£¬Òò´Ë¶ÔÓÚÄÇЩʹÓÃÁËÀ´×ÔSMM»òÕß32λBIOSÈë¿ÚµØÖ·µÄEBDA£¨* Extended BIOS
Data Area£¬ÍØÕ¹BIOSÊý¾ÝÓò£©µÄϵͳ£¬ÕâÑù×ö¿ÉÒÔʹµÃÆô¶¯¸ü¼Ó°²È«¡£
2.03£ºÃ÷È·Á˸߶˵ÄinitrdµØÖ·¿É±» bootloader ʹÓÃ.
2.04£ºÀ©Õ¹syssize
Óòµ½Ëĸö×Ö½Ú
2.05£ºÊ¹µÃ±£»¤Ä£Ê½Ï嵀 Äں˿ɱ»Öض¨Î»£¬Ôö¼Ó relocatable_kernel
ºÍkernel_alignment
Óò.
2.06£ºÔö¼ÓÒ»¸öÓò´æ·Å boot command line µÄ´óС.
2.07£ºÔö¼Ó°ëÐéÄ⻯Æô¶¯ÐÒ飬ÔÚload_flags
ÖÐ Ôö¼Ó hardware_subarch
ºÍ hardware_subarch_data
ºÍ KEEP_SEGMENTS
±êÖ¾.
2.08£ºÔö¼ÓCRC32УÑéºÍELF¸ñʽµÄÓÐЧÔغɡ£Ôö¼Ó
payload_offset ºÍpayload_length Óò ÓÃÓÚ¶¨Î»ÓÐЧÔغɣ¨payload£©
2.09£ºÔö¼ÓÒ»¸ö64λµÄÎïÀíÖ¸ÕëÖ¸Ïòsetup_data½á¹¹ÌåµÄµ¥Á´±í.
2.10£ºÔö¼ÓÁËinit_size ºÍ pref_address Óò.
´«Í³µÄÓÃÓÚÔçÆÚµÄImageºÍbImageµÄMemoryµÄÓ³Éäͼ£º
100000
ͼÐνӿڿ¨ÐÅÏ¢ºÍBIOS×ÔÉí
0A0000 +------------------------+ ´ÓÕâһϵÄ640K³ÆΪ»ù±¾ÄÚ´æ
| Reserved for
BIOS | δʹÓ㬱»BIOS EBDA±£Áô
09A000 +------------------------+
|
Command line |
| Stack/heap |
±»ÊµÄ£Ê½ÏµÄÄں˴úÂëËùʹÓÃ
098000 +------------------------+
| kernel
setup &nb
Ïà¹ØÎĵµ£º
http://linux.chinaitlab.com/safe/794893.html
Ðí¶à¸Õ½Ó´¥LinuxµÄÍøÂç¹ÜÀíÔ±·¢ÏÖ£¬ËûÃǺÜÄÑÓÉÖ¸Ïòµã»÷ʽµÄ°²È«
ÅäÖýçÃæת»»µ½ÁíÒ»ÖÖ»ùÓڱ༸´ÔÓ¶øÄÑÒÔ×½ÃþµÄÎı¾ÎļþµÄ½çÃæ¡£±¾ÎÄÁгöÆßÌõ¹ÜÀíÔ±Äܹ»Ò²Ó¦¸Ã¿ÉÒÔ×öµ½µÄ²½Ö裬´Ó¶ø°ïÖúËûÃǽ¨Á¢¸ü¼Ó°²È«
µÄLinux·þÎñÆ÷
£¬²¢ÏÔÖø½µµÍËûÃÇËùÃæÁٵķçÏÕ¡£
&nbs ......
ÒÔDebianµÄ·½Ê½ÏµÁÐ(IN THE DEBIAN WAY):
LinuxÍøÂç»ù´¡
etony C.F.AN etony@tom.com
v0.0.1, 2006-7-23
--------------------------------------------------------------------------------
±¾ÎĵµÖ÷Òª½éÉܽ²ÊöÔÚ DebianϵͳÏÂÓйØÍøÂçµÄһЩ»ù±¾ÐÅÏ¢.
------------------------------------------------------- ......
Ŀ¼Ë÷Òý
Ò»¡¢ÓëÓû§¹ÜÀíÏà¹ØµÄ
ÅäÖÃÎļþ£»
1¡¢/etc
/passwd ºÍ/etc/groups
2¡¢³¬¼¶È¨
ÏÞ¿ØÖÆ sudo µÄÅäÖÃÎļþ/etc/sudoers £»
3¡¢Ìí¼ÓÓÃ
»§¹æÔòÎļþ /etc/login.defs ºÍ /etc/default/useradd
¶þ¡¢Ìí¼ÓÓû§¹¤¾ßºÍ·½
·¨£»
1¡¢useradd
¹¤¾ß£»
1.1¡¢
useraadd ÃüÁîÖÐµÄ -DÔËÓÃ
1.2¡¢
useradd Ìí¼ÓÓû§£»
......
ÎÞÂÛʲô±à³ÌÓïÑÔ¶¼Àë²»¿ªÌõ¼þÅжϡ£SHELLÒ²²»ÀýÍâ¡£
if list then
do something here
elif list then
do another thing here
......
ÎÒÃǽâÊÍFilesystem Hierarchy Standard(FHS)Ëù¶¨ÒåµÄ×éÖ¯½á¹¹¡£ Êý¾ÝÀàÐÍ ÎļþϵͳÊÇÓÃÀ´±£´æÊý¾ÝµÄ£¬²»Í¬ÀàÐ͵ÄÊý¾ÝÓ¦¸Ã·ÅÔÚÎļþϵͳÉϵIJ»Í¬Î»Öá£Òò´Ë£¬µÚÒ»²½±ØÐëÏÈÀíÇåÈçºÎ·ÖÀàÊý¾Ý¡£FHS½«Êý¾ÝµÄÊôÐÔ·ÖΪÁ½À࣬¸÷ÀàÊôÐÔ¸÷ÓÐÁ½ÖÖ½ØÈ»Ïà·´µÄÐÔÖÊ¡£ ¹²ÏíÐÔ£¨Êý¾ÝÓÃÓÚÍøÂç»·¾³ÖеÄÓ¦Ó÷¶Î§£© 1.¹²Ïí£º¿É¹©ÍøÂçÉϵĶภ......