亚洲欧美精品沙发,日韩在线精品视频,亚洲Av每日更新在线观看,亚洲国产另类一区在线5

<pre id="hdphd"></pre>

  • <div id="hdphd"><small id="hdphd"></small></div>
      學(xué)習(xí)啦>學(xué)習(xí)電腦>操作系統(tǒng)>Linux教程>

      linux下磁盤怎么分區(qū)

      時間: 春健736 分享

        linux分區(qū)不同于windows,linux下硬盤設(shè)備名為(IDE硬盤為hdx(x為從a—d)因?yàn)镮DE硬盤最多四個,SCSI,SATA,USB硬盤為sdx(x為a—z)),硬盤主分區(qū)最多為4個,不用說大家也知道,那么linux下磁盤怎么分區(qū)?小編為大家分享了linux下磁盤分區(qū)的方法,下面大家跟著學(xué)習(xí)啦小編一起來了解一下吧。

        linux下磁盤分區(qū)方法

        先用fdisk分區(qū),分區(qū)完成后再用mkfs格式化并創(chuàng)建文件系統(tǒng),掛載,磁盤就能使用啦。

        分區(qū)的原理:

        MBR:主引導(dǎo)扇區(qū)

        主分區(qū)表:64bytes,最多只能分四個主分區(qū),每個主分區(qū)的記錄(相關(guān)信息,比如分區(qū)大小,位置)在主分區(qū)表里占14bytes。

        如果要建多于四個的分區(qū),就要拿出一個主分區(qū)做為擴(kuò)展分區(qū),再在擴(kuò)展分區(qū)里面進(jìn)行其它的分區(qū)操作。在 建擴(kuò)展分區(qū)的時候會建立一張對應(yīng)的擴(kuò)展分區(qū)表,它記錄了在這個擴(kuò)展分區(qū)里的分區(qū)的相關(guān)信息;理論上它沒有分區(qū)數(shù)量的限制,在擴(kuò)展分區(qū)內(nèi)部的分區(qū)叫做邏輯分區(qū),如上圖中的 /dev/hda5,/dev/hda6/,/dev/hda7

        格式化原理:

        在分好區(qū)后,分區(qū)里面是空的,沒有任何東西。為了能讓OS識別,就必須要向分區(qū)里寫入相應(yīng)格式的數(shù)據(jù)。比如windows的FAT32,NTFS;Linux的ext2,ext3,ext4(目前ext3格式的用的比較多,ext4還在實(shí)驗(yàn)之中,在新的Fedora上使用的就是ext4的文件系統(tǒng))。

        Windows/dos常用的分區(qū)工具:fdisk/partition magic/diskpart

        Linux下常用的分區(qū)工具:

        fdisk/sfdisk:命令行工具,各種版本和環(huán)境都能使用,包含在軟件包util-linux中

        diskdruid:圖形化分區(qū)工具,只能在安裝REDHAT系統(tǒng)時使用。

        下面我們開始實(shí)驗(yàn):

        環(huán)境/工具:Fedora 14/256M內(nèi)存卡;fdisk

        第一步:fdisk

        [root@novice ~]# fdisk -l /dev/sdb

        Disk /dev/sdb: 254 MB, 254017536 bytes

        8 heads, 61 sectors/track, 1016 cylinders, total 496128 sectors

        Units = sectors of 1 * 512 = 512 bytes

        Sector size (logical/physical): 512 bytes / 512 bytes

        I/O size (minimum/optimal): 512 bytes / 512 bytes

        Disk identifier: 0x00000000

        Device Boot Start End Blocks Id System

        [root@novice ~]# fdisk /dev/sdb

        Command (m for help): #在輸入上面的命令后會出現(xiàn)左邊的提示,輸入m就會得到一個幫助菜單,如下:

        Command (m for help): m

        Command action

        a toggle a bootable flag

        b edit bsd disklabel

        c toggle the dos compatibility flag

        d delete a partition

        l list known partition types

        m print this menu

        n add a new partition

        o create a new empty DOS partition table

        p print the partition table

        q quit without saving changes

        s create a new empty Sun disklabel

        t change a partition's system id

        u change display/entry units

        v verify the partition table

        w write table to disk and exit

        x extra functionality (experts only)

        #help雖然是英文的,可都很簡單,在這里不再解釋。

        #現(xiàn)在,我們正式開始分區(qū)的操作:

        Command (m for help): n #新建分區(qū)

        Command action

        e extended

        p primary partition (1-4)

        #e/p分別對應(yīng)擴(kuò)展分區(qū) /主分區(qū);我們先分四個主分區(qū),每個50M;然后再來增加主分區(qū)或擴(kuò)展分區(qū),看會出現(xiàn)怎樣的狀況,嘿嘿。

      749264