成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

fdisk 中文man頁面

系統(tǒng)
硬盤可以被分成一個(gè)或多個(gè)邏輯磁盤,稱為 分區(qū)。 這些分區(qū)信息都存放在硬盤0扇區(qū)的 分區(qū)表 中。

NAME

fdisk - Linux分區(qū)表操作工具軟件  

總覽

fdisk [-u]設(shè)備名

fdisk -l [-u] [設(shè)備名 ...]

fdisk -s分區(qū) ...

fdisk -v  

描述

硬盤可以被分成一個(gè)或多個(gè)邏輯磁盤,稱為 分區(qū)。 這些分區(qū)信息都存放在硬盤0扇區(qū)的 分區(qū)表 中。

在 BSD 風(fēng)格中,分區(qū)被稱為“磁盤片”和“磁盤標(biāo)簽”

Linux 至少需要一個(gè)分區(qū),即用做它的 root 文件系統(tǒng)。 Linux 可以使用交換文件和/或交換分區(qū),交換分區(qū)更有效。因此,通常用戶會創(chuàng)建第二個(gè) Linux 分區(qū)供交換分區(qū)使用。在 Intel 兼容的硬件上,啟動系統(tǒng)的 BIOS 往往只能訪問 1024 柱面之前的硬盤。因此,使用大硬盤的用戶通常創(chuàng)建第三個(gè)只有幾兆大小的小分區(qū),通常用來裝配在 /boot ,用來存放內(nèi)核映象和一些其它啟動時(shí)需要的附屬文件,所以應(yīng)確保此分區(qū)必須是在BIOS可訪問的部分。出于安全方面的考慮、管理方面的原因、備份的需要或?yàn)榱四承y試,也可以將一個(gè)硬盤分成更多的分區(qū)使用。

fdisk (以第一種形式調(diào)用)是一個(gè)以菜單問答形式出現(xiàn)的用來創(chuàng)建和修改分區(qū)的程序。它可以辯認(rèn) DOS 類型的分區(qū)表和 BSD 或 SUN 類型的磁盤標(biāo)簽。

設(shè)備 通常是下列之一:
 

/dev/hda /dev/hdb /dev/sda /dev/sdb

(/dev/hd[a-h] 指 IDE 硬盤,/dev/sd[a-p] 指 SCSI 硬盤, /dev/ed[a-d] 指 ESDI 硬盤,/dev/xd[ab] 指 XT 硬盤)。設(shè)備名指整個(gè)硬盤設(shè)備。

分區(qū) 是在 設(shè)備名 后跟一個(gè)分區(qū)號。例如: /dev/hda1 是指系統(tǒng)在第一個(gè) IDE 硬盤上的第一個(gè)分區(qū)。 IDE 硬盤可以最多創(chuàng)建 63 個(gè)分區(qū),SCSI 可以創(chuàng)建 15 個(gè)。又見 /usr/src/linux/Documnetation/devices.txt

一個(gè) BSD/SUN 風(fēng)格的磁盤標(biāo)簽可以描述 8 個(gè)分區(qū),其中第三個(gè)應(yīng)該是“整個(gè)磁盤”分區(qū)。不要在零柱面使用那些的確使用其第一扇區(qū)的分區(qū),(比如交換分區(qū))因?yàn)檫@將損壞磁盤標(biāo)簽。

一個(gè) IRIX/SGI 風(fēng)格的磁盤標(biāo)簽可以描述 16 個(gè)分區(qū),其中第十一個(gè)應(yīng)該是完整“卷標(biāo)”分區(qū),而第九個(gè)應(yīng)該被標(biāo)成“卷標(biāo)頭”。卷標(biāo)頭將覆蓋分區(qū)表,即,它從零塊開始并缺省時(shí)延伸 5 個(gè)柱面。卷標(biāo)頭中余下的空間可以用來存放頭部目錄記錄信息。不要有任何分區(qū)與此卷標(biāo)頭重疊。同樣,也不要改變它的類形和在其中創(chuàng)建任何文件系統(tǒng),因?yàn)檫@樣做將丟失分區(qū)表信息。只有當(dāng)將 Linux 安裝在 IRIX/SGI 機(jī)器上或在 Linux 中使用 IRIX/SGI 磁盤時(shí)才會使用這種類形的標(biāo)簽。

一個(gè) DOS 風(fēng)格的分區(qū)表可以描述無限的分區(qū)。零扇區(qū)用來存放 4 個(gè)分區(qū)(稱為主分區(qū))的描述信息。其中可以有一個(gè)分區(qū)是擴(kuò)展分區(qū);此擴(kuò)展分區(qū)也就是存儲各邏輯分區(qū)地方,是一個(gè)在組成鏈表的扇區(qū)里存放的描述符,每個(gè)描述符都是一個(gè)對應(yīng)分區(qū)的開頭.四個(gè)主分區(qū),不管是否存在,都用數(shù)字 1-4 編號,而邏輯分區(qū)以 5 開始。

在 DOS 風(fēng)格的分區(qū)表中,開始地址偏移量和每個(gè)分區(qū)的大小是以兩種不同的方式來存放的:以扇區(qū)數(shù)的絕對值來描述(占 32 位)和以柱面、磁頭、扇區(qū)三個(gè)一組的形式(占 10+8+6 個(gè)位)來描述。前一種描述很好 - 如果每扇區(qū) 512 個(gè)字節(jié)的情況,這種方式可描述到 2TB 的大小。后一種方式有兩個(gè)不同的問題。第一個(gè)是這種 C/H/S 方式必須是在磁頭數(shù)和每磁道扇區(qū)數(shù)都已知的情況下才能使用。第二個(gè)是就算我們已經(jīng)知道了這些數(shù)字,而只用 24 位來描述這些信息也是不夠的。 DOS 只使用這種 C/H/S 的方式,Windows 則兩個(gè)都用,Linux 則不使用 C/H/S 的方式。

如果可能, fdisk 會自動獲得磁盤的幾何結(jié)構(gòu)。這不一定是磁盤的物理結(jié)構(gòu)(當(dāng)然,現(xiàn)在的磁盤沒有真正的物理結(jié)構(gòu),同樣也不能以簡單的柱面/磁頭/扇區(qū)的形式來描述),而是 MS-DOS 用來供分區(qū)表使用的幾何結(jié)構(gòu)。

通常,缺省時(shí)這些都將工作得很好,而且,如果磁盤上只有一個(gè) Linux 操作系統(tǒng)時(shí)也不會有任何問題。然而,如果磁盤上還有其它操作系統(tǒng),那么,用其它操作系統(tǒng)的 fdisk 來生成其自身使用的至少一個(gè)分區(qū)是比較好的選擇。當(dāng)Linux啟動的時(shí)侯,它會掃描分區(qū)表,并由此推出和其它共存操作系統(tǒng)友好合作所需的(偽)幾何結(jié)構(gòu)。

當(dāng)打印一個(gè)分區(qū)表時(shí),系統(tǒng)會對分區(qū)表進(jìn)行一次一至性檢查。這些檢查會驗(yàn)證磁盤幾何結(jié)構(gòu)和物理地址的開始、結(jié)束、指向和標(biāo)識,同時(shí)在柱面的邊界檢查分區(qū)的開始和結(jié)束。(除了第一個(gè)分區(qū))

一些版本的 MS-DOS 在創(chuàng)建第一個(gè)分區(qū)時(shí)并不是從柱面邊界的開始處,而是從第一柱面的第 2 扇區(qū)處開始。從柱面 1 開始的分區(qū)不能直接從柱面邊界開始,但這未必會造成困難,除非你在你的機(jī)器上安裝了 OS/2 操作系統(tǒng)。

當(dāng)執(zhí)行了對分區(qū)表的更新后退出時(shí),程序會運(yùn)行一次 sync() 和 BLKRRPART ioct1() (從磁盤上重讀分區(qū)表信息)。以前,在使用完 fdisk 后需要重啟系統(tǒng)。我認(rèn)為現(xiàn)在不需要這樣了 -- 太快的重起可能導(dǎo)致未寫入磁盤的數(shù)據(jù)丟失。注意,內(nèi)核和磁盤硬件都可能緩存數(shù)據(jù)。

DOS6.x WARNING

DOS6.x 的 FORMAT 命令會在分區(qū)的第一扇區(qū)的數(shù)據(jù)區(qū)查找一些信息,并認(rèn)為這些信息比分區(qū)表中的信息更可靠。 DOS 的 FORMAT 命令認(rèn)為 DOS 的 FDISK 命令會在分區(qū)變化時(shí)自動清除分區(qū)數(shù)據(jù)區(qū)的前 512 字節(jié)區(qū)域。 DOS 的 FORMAT 將查看這些額外的信息,甚至在給出了 /U 這個(gè)參數(shù)后也是如此。我們認(rèn)為這是 DOS FORMAT 和 DOS FDISK 的臭蟲。

如果你使用 cfdisk 或 fdisk 更改了 DOS 分區(qū)表的條目,你必須同時(shí)使用 dd 命令將該分區(qū)的前512個(gè)字節(jié)清零,之后,你才能使用 DOS 的 FORMAT 命令對這個(gè)分區(qū)進(jìn)行格式化。例如:如果你使用 cfdisk 去創(chuàng)建一個(gè) DOS 分區(qū)表項(xiàng)目,即分區(qū) /dev/hda1,然后(在退出 fdisk 或 cfdisk 后重啟 Linux 使分區(qū)表合法化)你就有必要使用如下命令 “dd if=/dev/ero of=/dev/hda1 bs=512 count=1” 來將分區(qū)的前 512 個(gè)字節(jié)清零。

當(dāng)你使用 dd 命令時(shí)請 務(wù)必萬分小心 , 由于任何小的打印錯(cuò)誤都將造成磁盤數(shù)據(jù)的失效。

最好你還是使用由操作系統(tǒng)指定的分區(qū)工具軟件。例如,當(dāng)你創(chuàng)建 DOS 分區(qū)時(shí)應(yīng)使用 DOS FDISK,而創(chuàng)建 Linux 分區(qū)時(shí)則使用 Linux 的 fdisk 或 cfdisk。

選項(xiàng)

-v
打印 fdisk 的版本信息并退出.
-l
列出指定設(shè)備的分區(qū)表信息并退出。如果沒有給出設(shè)備,那么使用那些在 /proc/partitions (如果存在)提到的.
-u
以扇區(qū)數(shù)而不是以柱面數(shù)的形式顯示分區(qū)表中各分區(qū)的信息. -s 分區(qū) 將分區(qū)的 大小 (單位為塊)信息輸出到標(biāo)準(zhǔn)輸出

#p#

NAME

fdisk - Partition table manipulator for Linux  

SYNOPSIS

fdisk [-u] [-b sectorsize] [-C cyls] [-H heads] [-S sects] device

fdisk -l [-u] [device ...]

fdisk -s partition ...

fdisk -v  

DESCRIPTION

Hard disks can be divided into one or more logical disks called partitions. This division is described in the partition table found in sector 0 of the disk.

In the BSD world one talks about `disk slices' and a `disklabel'.

Linux needs at least one partition, namely for its root file system. It can use swap files and/or swap partitions, but the latter are more efficient. So, usually one will want a second Linux partition dedicated as swap partition. On Intel compatible hardware, the BIOS that boots the system can often only access the first 1024 cylinders of the disk. For this reason people with large disks often create a third partition, just a few MB large, typically mounted on /boot, to store the kernel image and a few auxiliary files needed at boot time, so as to make sure that this stuff is accessible to the BIOS. There may be reasons of security, ease of administration and backup, or testing, to use more than the minimum number of partitions.

fdisk (in the first form of invocation) is a menu driven program for creation and manipulation of partition tables. It understands DOS type partition tables and BSD or SUN type disklabels.

The device is usually one of the following:
 

/dev/hda /dev/hdb /dev/sda /dev/sdb

(/dev/hd[a-h] for IDE disks, /dev/sd[a-p] for SCSI disks, /dev/ed[a-d] for ESDI disks, /dev/xd[ab] for XT disks). A device name refers to the entire disk.

The partition is a device name followed by a partition number. For example, /dev/hda1 is the first partition on the first IDE hard disk in the system. Disks can have up to 15 partitions. See also /usr/src/linux/Documentation/devices.txt.

A BSD/SUN type disklabel can describe 8 partitions, the third of which should be a `whole disk' partition. Do not start a partition that actually uses its first sector (like a swap partition) at cylinder 0, since that will destroy the disklabel.

An IRIX/SGI type disklabel can describe 16 partitions, the eleventh of which should be an entire `volume' partition, while the ninth should be labeled `volume header'. The volume header will also cover the partition table, i.e., it starts at block zero and extends by default over five cylinders. The remaining space in the volume header may be used by header directory entries. No partitions may overlap with the volume header. Also do not change its type and make some file system on it, since you will lose the partition table. Use this type of label only when working with Linux on IRIX/SGI machines or IRIX/SGI disks under Linux.

A DOS type partition table can describe an unlimited number of partitions. In sector 0 there is room for the description of 4 partitions (called `primary'). One of these may be an extended partition; this is a box holding logical partitions, with descriptors found in a linked list of sectors, each preceding the corresponding logical partitions. The four primary partitions, present or not, get numbers 1-4. Logical partitions start numbering from 5.

In a DOS type partition table the starting offset and the size of each partition is stored in two ways: as an absolute number of sectors (given in 32 bits) and as a Cylinders/Heads/Sectors triple (given in 10+8+6 bits). The former is OK - with 512-byte sectors this will work up to 2 TB. The latter has two different problems. First of all, these C/H/S fields can be filled only when the number of heads and the number of sectors per track are known. Secondly, even if we know what these numbers should be, the 24 bits that are available do not suffice. DOS uses C/H/S only, Windows uses both, Linux never uses C/H/S.

If possible, fdisk will obtain the disk geometry automatically. This is not necessarily the physical disk geometry (indeed, modern disks do not really have anything like a physical geometry, certainly not something that can be described in simplistic Cylinders/Heads/Sectors form), but is the disk geometry that MS-DOS uses for the partition table.

Usually all goes well by default, and there are no problems if Linux is the only system on the disk. However, if the disk has to be shared with other operating systems, it is often a good idea to let an fdisk from another operating system make at least one partition. When Linux boots it looks at the partition table, and tries to deduce what (fake) geometry is required for good cooperation with other systems.

Whenever a partition table is printed out, a consistency check is performed on the partition table entries. This check verifies that the physical and logical start and end points are identical, and that the partition starts and ends on a cylinder boundary (except for the first partition).

Some versions of MS-DOS create a first partition which does not begin on a cylinder boundary, but on sector 2 of the first cylinder. Partitions beginning in cylinder 1 cannot begin on a cylinder boundary, but this is unlikely to cause difficulty unless you have OS/2 on your machine.

A sync() and a BLKRRPART ioctl() (reread partition table from disk) are performed before exiting when the partition table has been updated. Long ago it used to be necessary to reboot after the use of fdisk. I do not think this is the case anymore - indeed, rebooting too quickly might cause loss of not-yet-written data. Note that both the kernel and the disk hardware may buffer data.

DOS 6.x WARNING

The DOS 6.x FORMAT command looks for some information in the first sector of the data area of the partition, and treats this information as more reliable than the information in the partition table. DOS FORMAT expects DOS FDISK to clear the first 512 bytes of the data area of a partition whenever a size change occurs. DOS FORMAT will look at this extra information even if the /U flag is given -- we consider this a bug in DOS FORMAT and DOS FDISK.

The bottom line is that if you use fdisk to change the size of a DOS partition table entry, then you must also use dd to zero the first 512 bytes of that partition before using DOS FORMAT to format the partition. For example, if you were using disk to make a DOS partition table entry for /dev/hda1, then (after exiting fdisk and rebooting Linux so that the partition table information is valid) you would use the command "dd if=/dev/zero of=/dev/hda1 bs=512 count=1" to zero the first 512 bytes of the partition.

BE EXTREMELY CAREFUL if you use the dd command, since a small typo can make all of the data on your disk useless.

For best results, you should always use an OS-specific partition table program. For example, you should make DOS partitions with the DOS FDISK program and Linux partitions with the Linux fdisk program.

OPTIONS

-b sectorsize
Specify the sector size of the disk. Valid values are 512, 1024, or 2048. (Recent kernels know the sector size. Use this only on old kernels or to override the kernel's ideas.)
-C cyls
Specify the number of cylinders of the disk. I have no idea why anybody would want to do so.
-H heads
Specify the number of heads of the disk. (Not the physical number, of course, but the number used for partition tables.) Reasonable values are 255 and 16.
-S sects
Specify the number of sectors per track of the disk. (Not the physical number, of course, but the number used for partition tables.) A reasonable value is 63.
-l
List the partition tables for the specified devices and then exit. If no devices are given, those mentioned in /proc/partitions (if that exists) are used.
-u
When listing partition tables, give sizes in sectors instead of cylinders.
-s partition
The size of the partition (in blocks) is printed on the standard output.
-v
Print version number of fdisk program and exit.
責(zé)任編輯:韓亞珊 來源: CMPP.net
相關(guān)推薦

2011-08-15 10:21:09

man中文man

2011-08-24 16:48:36

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-11 15:03:21

ACCESS中文man

2011-08-11 15:28:43

ali中文man

2011-08-11 16:31:49

biff中文man

2011-08-11 17:16:43

cce中文man

2011-08-11 18:05:04

chvt中文man

2011-08-11 18:13:07

clear中文man

2011-08-12 09:13:02

df中文man

2011-08-12 09:38:06

dircolors中文man

2011-08-12 09:44:37

dirname中文man

2011-08-12 10:20:02

echo中文man

2011-08-12 10:25:55

eject中文man

2011-08-12 11:07:19

git中文man

2011-08-12 13:18:19

head中文man

2011-08-12 13:49:23

hostid中文man

2011-08-12 13:54:46

hostname中文man

2011-08-12 14:53:56

kill中文man
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號

主站蜘蛛池模板: 久久久久亚洲精品 | 亚洲美女av网站 | 久久精品天堂 | 涩涩视频在线看 | 手机在线观看av | 日韩中文在线视频 | 亚洲一区二区三区免费在线观看 | 一级黄色网页 | 亚洲综合天堂 | 一级a性色生活片久久毛片波多野 | 成人精品一区二区三区 | 国产美女视频黄a视频免费 国产精品福利视频 | 欧美一区二区三区大片 | 韩日一区二区 | 91色视频在线观看 | 国产农村妇女毛片精品久久麻豆 | 亚洲综合五月天婷婷 | 羞羞网站在线观看 | 天天躁日日躁狠狠很躁 | 91国产在线播放 | 亚洲一区在线日韩在线深爱 | 日韩一区二区在线视频 | 欧美精品久久 | 成人久久| hsck成人网| 欧美一级片免费看 | 中文二区 | 久久久久免费精品国产小说色大师 | 91久久久久久久久久久久久 | 超碰97av| 日本一区二区三区在线观看 | 九九九久久国产免费 | 91久久精品国产免费一区 | 毛片一级片 | 91久久精品一区二区三区 | 亚洲一区有码 | 日韩av免费在线电影 | 中文字幕免费中文 | av大全在线观看 | 久草视频观看 | 国产成人99久久亚洲综合精品 |