LinuxϵͳÄÚ´æ´ÅÅ̳õʼ»¯¼¼ÊõÏêϸ½âÎö
LinuxÄÚ´æ³õʼ»¯¼¼Êõ£¨initrd£©ÓÃÓÚÖ§³ÖÁ½½×¶ÎµÄϵͳÒýµ¼¹ý³Ì£¬ÊÇÔÚϵͳÆô¶¯¹ý³ÌÖб»¹ÒÔصÄÁÙʱrootÎļþϵͳ£¨ÒëÕß×¢£ºÕâÀïµÄrootÎļþϵͳÊÇÖ¸µÄ¸ùÎļþϵͳ£©¡£initrd°üº¬ºÜ¶à¿ÉÖ´ÐгÌÐòºÍÇý¶¯£¬²¢ÔÊÐíÔÚÁÙʱµÄÄÚ´æ´ÅÅ̸ùÎļþϵͳ±»Ð¶ÔØ£¬ÄÚ´æ±»Êͷźó¹ÒÔØÕæʵµÄrootÎļþϵͳ¡£ÔÚÐí¶àǶÈëʽLinuxÎļþϵͳÖУ¬initrdÊÇ×îÖյĸùÎļþϵͳ¡£ÕâƪÎÄÕÂÖ÷Òª½²½âÁËlinux2.6Äں˵Äinitrd¼¼Êõ£¬°üÀ¨ÔÚÄÚºËÖеĴ´½¨¼°Ê¹Óá£
1 ʲôÊÇÄÚ´æ´ÅÅ̳õʼ»¯£¿
initrd¹ÒÔØÓÅÏȼ¶¸ßÓÚÕæʵ¸ùÎļþϵͳ£¬Ëü±»°î¶¨ÔÚÄÚºËÉÏ£¬×öΪÄÚºËÆô¶¯¹ý³ÌµÄÒ»²¿·Ö±»¼ÓÔØ£¨load£©¡£È»ºó£¬×öΪÁ½½×¶ÎÒýµ¼¹ý³ÌµÄµÚÒ»²¿·Ö£¬Äں˹ÒÔØ£¨mount£©initrd£¬ÓÃÓÚ»ñµÃ²¢¼ÓÔØÕæʵÓÐЧµÄÎļþϵͳ¡£
ΪÁË´ïµ½Õâ¸öÄ¿µÄ£¬initrd°üº¬ÓÐ×îÆðÂëµÄĿ¼Óë³ÌÐò£¬ÀýÈçinsmod£¬À´°²×°ÄÚºËÄ£¿éµ½ÄÚºËÖС£
¶ÔÓÚ×ÀÃæ»ò·þÎñÆ÷linux£¬initrdÊÇÁÙʱÎļþϵͳ£¬ËüµÄÉú´æÖÜÆں̣ܶ¬½ö½öÊÇ×öΪµ½´ïÕæʵ¸ùÎļþϵͳµÄÇÅÁº¡£µ«¶ÔÓÚûÓд洢É豸µÄǶÈëʽϵͳÀ´Ëµ£¬Ëü²ÅÊÇÓÀ¾ÃÐԵĸùÎļþϵͳ¡£±¾ÆªÎÄÕ¶ÔÕâÁ½·½Ãæ¾ùÓÐÉæ¼°¡£
2 ÉîÈë·ÖÎöinitrdL
initrd°üº¬ÓбØÐëµÄ³ÌÐòºÍϵͳÎļþ£¬ÓÃÓÚÖ§³ÖϵͳµÄÆô¶¯µÄµÚ¶þ½×¶Î¹ý³Ì¡£´´½¨³õʼ»¯ÄÚ´æµÄ·½·¨£¬ÊÇËæ×ÅÄãËùʹÓõÄϵͳ°æ±¾¶ø¸Ä±äµÄ¡£´ÓFedora Core3ÒÔºó£¬initrd¾ÍÓÉ»ØËÍÉ豸£¨loop device£©½¨Á¢¡£Ê²Ã´ÊÇ»ØËÍÉ豸£¿ËüÊÇÒ»¸öÉ豸Çý¶¯£¬ÔÊÐíÄ㽫һ¸öÎļþ¹ÒÔØΪ¿éÉ豸£¬²¢¶ÔÆäÎļþϵͳ×ö³öÃèÊö¡£Ò²Ðíloop device²¢²»´æÔÚÓëÄãµÄÄÚºËÖУ¬µ«ÊÇÄãÄܹ»Í¨¹ýÄں˵ÄÅäÖù¤¾ß£¨make menuconfig£©´ò¿ªËü¡£Â·¾¶ÊÇ£ºDevice Drivers-¡·Block Devices-¡·LoopBack Device support¡£ÏÂÃæΪ¼ì²éÃüÁ
# mkdir temp ; cd temp
# cp /boot/initrd.img.gz .
# gunzip initrd.img.gz
# mount -t ext -o loop initrd.img /mnt/initrd
# ls -la /mnt/initrd
#
ÏÖÔÚ£¬Äã¿ÉÒÔͨ¹ý²é¿´/mnt/initrdµÄ×ÓĿ¼À´²é¿´initrdµÄÄÚÈÝ¡£ÐèҪעÒâµÄÊÇ£¬¼´Ê¹ÄãµÄinitrd¾µÏñÎļþ²¢²»ÊÇÒÔ.gz×öΪºó׺Ãû£¬µ«ÊÇÄãͬÑù¿ÉÒÔͨ¹ýÔö¼Ó´Ëºó׺ÃûÀ´ÈÃgunzip´ò¿ªËü¡£
´ÓFedora Core3¿ªÊ¼£¬Ä¬ÈϵÄinitrd¾µÏñ¾ÍÊÇÒ»¸öѹËõµÄgpio¹éµµÎļþ¡£³ýÁËÓùÒÔØÎļþµÄ·½Ê½ÒÔÍ⣬ÄãͬÑù¿ÉÒÔͨ¹ýcpio¹éµµµÄ·½Ê½À´½«Æä¹ÒÔسÉʹÓÃÁË»ØËÍÉ豸µÄѹËõ¾µÏñ¡£Äã¿ÉÒÔͨ¹ýÒÔϵÄÖ¸ÁîÀ´¼ì²éÕâ¸öcpio¹éµµÎļþµÄÄÚÈÝ£º
# mkdir temp ; cd temp
# cp /boot/initrd-2.6.14.2.img initrd-2.6.14.2.img.gz
# gunzip initrd-2.6.14.2.img.gz
# cp
Ïà¹ØÎĵµ£º
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
ϵͳ
# uname -a # ²é¿´ÄÚºË/²Ù×÷ϵͳ/CPUÐÅÏ¢
# head -n 1 /etc/issue # ²é¿´²Ù×÷ϵͳ°æ±¾
# cat /proc/cpuinfo # ²é¿´CPUÐÅÏ¢
# hostname &nbs ......
linux mount and commpress/release
2009-05-23 11:05
mountÃüÁîÏê½â
¹¦ÄÜ£º¼ÓÔØÖ¸¶¨µÄÎļþϵͳ¡£
Óï·¨£ºmount [-afFhnrvVw] [-L<±êÇ©>] [-o<Ñ¡Ïî>] [-t<ÎļþϵͳÀàÐÍ>] [É豸Ãû] [¼ÓÔصã]
Ó÷¨ËµÃ÷£ºmount¿É½«Ö¸¶¨É豸ÖÐÖ¸¶¨µÄÎļþϵͳ¼ÓÔص½LinuxĿ¼Ï£¨Ò²¾ÍÊÇ×°Ôص㣩¡£¿É½«¾³£Ê¹ÓõÄÉ豸дÈëÎ ......