Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

£¨×ªÔØ£©linuxÏÂloop deviceµÄʹÓÃ

http://en.wikipedia.org/wiki/Loop_device
In Unix-like operating systems, a loop device, vnd (vnode disk), or lofi (loopback file interface) is a pseudo-device that makes a file accessible as a block device.
Ëùνloop deviceÖ¸µÄ¾ÍÊÇÄÃÎļþÀ´Ä£Äâ¿éÉ豸¡£
Albert WoodhullÓ"The Linux loop device can be used to handle this - it makes a file look like a filesystem, and the file can be defined as a byte offset from the beginning of a primary partition"¡£
losetup Óà À´ ½« loop device Óë µµ °¸ »ò block device Áª½á ¡¢ ·Ö Àë . ÒÔ ¼° ²é ѯ loop device Ä¿ ǰ µÄ ×´ ¿ö , Èç Ö»¸ø ¶¨ loop_device µÄ ²Î Êý . Ôò Ðã ³ö loop device Ä¿ ǰ µÄ×´ ¿ö . 
×î½üÔÚ¿´<> ( ¼ûhttp://www.oldlinux.org/index_cn.html)£¬¶ÔLinuxÏÂloopbackÉ豸µÄʹÓÃ×ÁÄ¥ÁËÒ»¶Îʱ¼ä¡£
¼Ç¼ÈçÏ£º
Ò»¡¢imag ÎļþµÄÉú³É
1. ¿ÉÒÔͨ¹ýbochsÌṩµÄbximage.exeÉú³É¡£
2. ÔÚFC3ÏÂͨ¹ýÃüÁîdd if=/dev/zero of=test.img bs=512 count=524160 ÃüÁîÉú³É¡£
¶þ¡¢¶ÔÉú³ÉµÄÎļþ½øÐзÖÇø
     1¡¢¿ÉÒÔ½«Éú³ÉµÄimageÎļþ¹ÒÔØÔÚbochsÏ£¬µ±×÷´ÓÊôÓ²ÅÌ
          fdisk /dev/hdb ÃüÁî¶ÔÓ²ÅÌ·ÖÇø
     2¡¢ÔÚFC3ÏÂ
          losetup /dev/loop0 test.img
          fdisk /dev/loop0 ²»¹ý·¢ÏÖÔÚÕâÖÖ·½Ê½ÏµÄfdiskÔÚ±£´æµÄʱºò»áÌáʾ²ÎÊý´íÎó¡£
Èý¡¢´´½¨Îļþϵͳ
¾­²âÊÔÖ»ÄÜÔÚbochsÏ´´½¨Îļþϵͳ£¬ÎÞ·¨ÔÚloopbackÉ豸ÉÏ´´½¨Îļþϵͳ¡£
Èç  mkfs /dev/hdb1  64000
ËÄ¡¢Fdisk·ÖÇø±íÏÔʾ²ÎÊý(±¾Îľ«»ª£©
ÔÚnormalģʽϰ´pÏÔʾ·ÖÇø±í£¬ÁÐÃû˵Ã÷
           start       end          blocks                                   id              s


Ïà¹ØÎĵµ£º

Linux(Ubuntu) ÖеÄÂÒÂë½â¾ö´óÈ«(´ýÐø)

   ÓÉÓÚLinux²»ÊÇÖйúÈË¿ª·¢µÄ£¬¿ª·¢¹ý³ÌÖÐÒ²²»ÊÇÒÔÖÐÎÄΪĸÓËäÓÐÖÐÎÄÓïÑÔ°ü£¬ÔÚÈí¼þ¼æÈÝÐÔÉϳöÏÖÖÐÎÄÂÒÂëÒ²ÔÚËùÄÑÃâ¡£ÎÒ³éÈ¡ÍøÂçÉÏǰÈ˵ľ­Ñ飬½áºÏ×Ô¼ºµÄÀí½â£¬½«ËûÃǼÓÒÔ×ܽᣬϣÍû¶ÔºóÀ´ÕßÓÐËù°ïÖú¡£
     1¡¢htmlÎļþÂÒÂ룻
        &nbs ......

linux϶¯Ì¬¿âÓ뾲̬¿â

ÌåÑéÒ»ÏÂlinuxϱàдºÍʹÓö¯Ì¬¿âÓ뾲̬¿â£¬·¶Àý£ºhelloworld³ÌÐò¡£
Ê×Ïȱàд¾²Ì¬¿â£º
hellos.h
 #ifndef _HELLO_S_H
#define _HELLO_S_H
void prints(char *str);
#endif
 
hellos.c
#include "hellos.h"
#include <stdio.h>
void prints(char *str)
{
printf("print in sta ......

linux³£ÓÃÃüÁî¼°¼¼ÇÉ


<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......

linuxÏ¿ª·¢Óöµ½µÄÎÊÌ⼯ºÏ

 ¼Ç¼ÔÚlinuxÏ¿ª·¢Óöµ½µÄ¸÷ÖÖÎÊÌ⣬·½±ãÒÔºó²éÕÒ¡£
 
1.¹ØÓÚshellÖнű¾µÄÖ´Ðз½Ê½£ºÔÚµ±Ç°½Å±¾Ö´Ðл¹ÊÇÆô¶¯Ò»¸öеÄshell½ø³ÌÀ´Ö´Ðнű¾¡£
¼ÙÉ赱ǰĿ¼ÏÂÓнű¾script.sh¡£
Æô¶¯Ò»¸öеÄshell½ø³ÌÀ´Ö´ÐУº
ÕâÊÇshellÖÐĬÈϵÄÖ´Ðз½Ê½ÊÇÆô¶¯Ò»¸öеÄshell½ø³Ì£¨×Ó½ø³Ì£©À´Ö´Ðнű¾£¬¼´sh script.sh»òÕ߸³Ó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ