Linux¡¡Æô¶¯Ïê½â
»úÆ÷¼ÓµçÆô¶¯ºó,BIOS¿ªÊ¼¼ì²â²ÎÊý,ÈçÄÚ´æµÄ´óС,ÈÕÆÚºÍʱ¼ä,´ÅÅÌ
É豸ÒÔ¼°ÕâЩ´ÅÅÌÉ豸ÓÃÀ´Òýµ¼µÄ˳Ðò,ͨ³£Çé¿öÏ£¬BIOS¶¼ÊDZ»ÅäÖóÉÊ×Ïȼì²é
ÈíÇý»òÕß¹âÇý£¨»òÁ½Õ߶¼¼ì²é£©£¬È»ºóÔÙ³¢ÊÔ´ÓÓ²ÅÌÒýµ¼¡£Èç¹ûÔÚÕâЩ¿ÉÒƶ¯µÄÉè
±¸ÖУ¬Ã»ÓÐÕÒµ½¿ÉÒýµ¼µÄ½éÖÊ£¬ÄÇôBIOSͨ³£ÊÇתÏòµÚÒ»¿éÓ²ÅÌ×î³õµÄ¼¸¸öÉÈÇø£¬
Ñ°ÕÒÓÃÓÚ×°ÔزÙ×÷ϵͳµÄÖ¸Áî¡£×°ÔزÙ×÷ϵͳµÄÕâ¸ö³ÌÐò¾ÍÊÇboot loader.
ÀïÃæµÄboot loaderͨ³£ÊÇlilo»òÕßgrub,´ÓRedHatLinux 7.2Æð£¬GRUB(
GRand Unified Bootloader)È¡´úLILO³ÉΪÁËĬÈϵÄÆô¶¯×°ÔسÌÐò¡£ÄÇôÆô¶¯µÄʱºò
grubÊÇÈçºÎ±»ÔØÈëµÄÄØ
grubÓм¸¸öÖØÒªµÄÎļþ,stage1,stage2,ÓеÄʱºòÐèÒªstage1.5.ÕâЩÎļþÒ»°ã¶¼
ÔÚ/boot/grubÎļþ¼ÐÏÂÃæ.grub±»ÔØÈëͨ³£°üÀ¨ÒÔϼ¸¸ö²½Öè:
1. ×°ÔØ»ù±¾µÄÒýµ¼×°ÔسÌÐò(stage1),stage1ºÜС,ÍøÉÏ˵ÊÇ512×Ö½Ú,µ«ÊÇÔÚÎÒµÄϵͳÉÏ
Óà du -b /boot/grub/stage1 ÏÔʾµÄÊÇ1024¸ö×Ö½Ú,²»ÖªµÀÊDz»ÊÇgrub°æ±¾²»Í¬µÄ
Ôµ¹Ê»¹ÊÇÎÒÀí½âÓÐÎó.stage1ͨ³£Î»ÓÚÖ÷Òýµ¼ÉÈÇøÀïÃæ,¶ÔÓÚÓ²Å̾ÍÊÇMBRÁË,stage1µÄ
Ö÷Òª¹¦ÄܾÍÊÇ×°ÔصڶþÒýµ¼³ÌÐò(stage2).ÕâÖ÷ÒªÊǹé½áÓÚÔÚÖ÷Òýµ¼ÉÈÇøÖÐûÓÐ×ã¹»µÄ
¿Õ¼äÓÃÓÚÆäËû¶«Î÷ÁË,ÎÒÓõÄÊÇgrub 0.93,stage2ÎļþµÄ´óСÊÇ 107520 bit.
2. ×°ÔصڶþÒýµ¼×°ÔسÌÐò(stage2),ÕâµÚ¶þÒýµ¼×°ÔسÌÐòʵ¼ÊÉÏÊÇÒý³ö¸ü¸ß¼¶µÄ¹¦ÄÜ,¡¡
ÒÔÔÊÐíÓû§×°ÔØÈëÒ»¸öÌض¨µÄ²Ù×÷ϵͳ¡£ÔÚGRUBÖУ¬Õâ²½ÊÇÈÃÓû§ÏÔʾһ¸ö²Ëµ¥»ò
ÊÇÊäÈë¡£ÓÉÓÚstage2ºÜ´ó,ËùÒÔËüÒ»°ãλÓÚÎļþϵͳ֮ÖÐ(ͨ³£ÊÇbootËùÔڵĸù
·ÖÇø).
ÉÏÃ滹Ìáµ½ÁËstage1.5Õâ¸öÎļþ,ËüµÄ×÷ÓÃÊÇʲôÄØ Äãµ½/boot/grubĿ¼Ï¿´¿´,
fat_stage_1.5 e2fs_stage_1.5 xfs_stage_1.5µÈµÈ,ºÜÈÝÒײÂÏëstage1.5ºÍÎļþϵͳ
ÓйØϵ.ÓÐʱºò»ù±¾Òýµ¼×°ÔسÌÐò(stage1)²»ÄÜʶ±ðstage2ËùÔÚµÄÎļþϵͳ·ÖÇø,ÄÇôÕâ
ʱºò¾ÍÐèÒªstage1.5À´Á¬½Óstage1ºÍstage2ÁË.Òò´Ë¶ÔÓÚ²»Í¬µÄÎļþϵͳ¾Í»áÓв»Í¬µÄ
stage1.5.µ«ÊǶÔÓÚgrub 0.93ºÃÏñstage1.5²¢²»ÊǺÜÖØÒª,ÒòΪÎÒÊÔ¹ýÁË,ÔÚûÓÐstage1.5
µÄÇé¿öÏÂ, ÎÒ°Ñstage1°²×°ÔÚÈíÅ̵ÄÒýµ¼ÉÈÇøÄÚ,È»ºó°Ñstage2·ÅÔÚ¸ñʽ»¯³Éext2»òÕß
fat¸ñʽµÄÈíÅÌÄÚ,Æô¶¯µÄʱºòÕÕ³£Òýµ¼,²¢²»ÐèÒªe2fs_stage_1.5»òÕßfat_stage_1.5.
ÏÂÃæÊÇÎÒµÄÊÔÑé:
#mkfs.ext2 /dev/fd0
#mount -t ext
Ïà¹ØÎĵµ£º
×ÜÀÀ
ÓÃiptables -ADC À´Ö¸¶¨Á´µÄ¹æ
Ôò
£¬-AÌí¼Ó -Dɾ³ý -C ÐÞ¸Ä
iptables - [RI] chain rule num rule-specification[option]
ÓÃiptables - RI ͨ¹ý¹æÔòµÄ˳ÐòÖ¸¶¨
iptables -D chain rule num[option]
ɾ³ýÖ¸¶¨¹æÔò
iptables -[LFZ] [chain][option]
ÓÃiptables -LFZ Á´Ãû [Ñ¡Ïî]
iptables -[NX] chain
ÓÃ -NX ......
1¡¢È¨Ï޵IJ鿴
ls -l ÎļþÃû³Æ
2¡¢È¨ÏÞÐÞ¸Ä
chmod abc file
ÆäÖÐa,b,c¸÷Ϊһ¸öÊý×Ö£¬·Ö±ð±íʾUser¡¢Group¡¢¼°OtherµÄȨÏÞ¡£
r=4£¬w=2£¬x=1£¬x±êʾִÐÐȨÏÞ¡£ÈôÒªrwxÊôÐÔÔò4+2+1=7£»ÈôÒ ......
È·ÇеÄ˵,ÎÒÊÇ´Ó»ªÇåÔ¶¼ûµÄ¹ÙÍøÉϵÃÖªÓиö½ÐǶÈëʽlinux¾ÍÒµÅàѵ°àµÄ¶«Î÷²Å¶ÔlinuxÓÐЩÈÏʶµÄ,¼ÓÖ®×Ô¼ººÍµ¥Æ¬»ú´òÁË2¸ö¶àÔµĽ»µÀÖ®ºó,Ò²²»ÖªÔõôµØ,ÇÞÊҵļ¸¸ö¼Ò»ï·¢·èËƵĿªÊ¼ÍæFPGA,SOPC,MATLABÖ®ÀàµÄ¶«Î÷,ÎÒ×ÔÈ»²»Ó¦¸ÃÏÐ×Å,»¨ÁËÒ»¶Îʱ¼äÁ˽âDSP,¾õµÃÒªÏÈѧºÃÊý×ÖÐźŴ¦Àí,ÂýÂýÓнӴ¥ARM,È»ºó¶ÔS3C2410µÄ¿ª·¢°åºÜÓÐÐËȤ, ......
¹²ÏíÄÚ´æ:
ʹÓù²ÏíÄÚ´æºÍʹÓÃmalloc()À´·ÖÅäÄÚ´æÇøÓòºÜÏàËÆ¡£Ê¹Óù²ÏíÄÚ´æµÄ·½·¨ÊÇ£º
1 ¶ÔÒ»¸ö½ø³Ì/Ïß³ÌʹÓÃshmget()·ÖÅäÄÚ´æÇøÓò¡£
2 ʹÓÃshmat()·ÅÖÃÒ»¸ö»ò¶à¸ö½ø³Ì/Ïß³ÌÔÚ¹²ÏíÄÚ´æÖУ¬Ò²¿ÉÒÔÓÃshmctl()À´»ñÈ¡ÐÅÏ¢»òÕß¿ØÖƹ²ÏíÇøÓò¡£
3 ʹÓÃshmdt()´Ó¹²Ïí ......
¾³£ÐèÒªKill¶à¸ö½ø³Ì£¬ÕâЩ½ø³Ì°üº¬¹²Í¬µÄ¹Ø¼ü×Ö£¬¿ÉÒÔÓÃÒ»ÌõÃüÁîKillµôËüÃÇ¡£ ps aux | grep "common" | cut –c 9-15 | xargs kill –9 ¹ÜµÀ·û¡°|¡±ÓÃÀ´¸ô¿ªÁ½¸öÃüÁ¹ÜµÀ·û×ó±ßÃüÁîµÄÊä³ö»á×÷Ϊ¹ÜµÀ·ûÓÒ±ßÃüÁîµÄÊäÈë¡£ÏÂÃæ˵˵ÓùܵÀ·ûÁª½ÓÆðÀ´µÄ¼¸¸öÃüÁ "ps aux" ²é¿´ËùÓнø³ÌµÄÃüÁî¡£Õâʱ¼ìË÷³öµÄ ......