📄 实例解说 fdisk 使用方法 linuxsir_org.htm
字号:
/dev/sda: 1035 MB, 1035730944 bytes<BR>256 heads, 63 sectors/track, 125
cylinders<BR>Units = cylinders of 16128 * 512 = 8257536
bytes<BR> Device Boot Start End Blocks Id
System<BR>Command (m for help): n 注:添加分区;<BR>Command
action<BR> e extended<BR> p primary
partition (1-4)<BR>p 注:添加主分区;<BR>Partition number (1-4): 1
注:添加主分区1;<BR>First cylinder (1-125, default 1):
注:直接回车,主分区1的起始位置;默认为1,默认就好;<BR>Using default value 1<BR>Last cylinder or
+size or +sizeM or +sizeK (1-125, default 125): +200M
注:指定分区大小,用+200M来指定大小为200M<BR>Command (m for help): n 注:添加新分区;<BR>Command
action<BR> e extended<BR> p primary
partition (1-4)<BR>p 注:添加主分区<BR>Partition number (1-4): 2
注:添加主分区2;<BR>First cylinder (26-125, default 26):<BR>Using default value
26<BR>Last cylinder or +size or +sizeM or +sizeK (26-125, default 125):
+200M 注:指定分区大小,用+200M来指定大小为200M<BR>Command (m for help): n<BR>Command
action<BR> e extended<BR> p primary
partition (1-4)<BR>e 注:添加扩展分区;<BR>Partition number (1-4): 3 注:指定为3
,因为主分区已经分了两个了,这个也算主分区,从3开始;<BR>First cylinder (51-125, default 51):
注:直接回车;<BR>Using default value 51<BR>Last cylinder or +size or +sizeM or
+sizeK (51-125, default 125): 注:直接回车,把其余的所有空间都给扩展分区;<BR>Using default
value 125<BR>Command (m for help): p<BR>Disk /dev/sda: 1035 MB, 1035730944
bytes<BR>256 heads, 63 sectors/track, 125 cylinders<BR>Units = cylinders
of 16128 * 512 = 8257536 bytes<BR> Device Boot Start End
Blocks Id System<BR>/dev/sda1 1 25 201568+ 83 Linux<BR>/dev/sda2 26 50
201600 83 Linux<BR>/dev/sda3 51 125 604800 5 Extended<BR>Command (m for
help): n<BR>Command action<BR> l logical (5 or
over)<BR> p primary partition (1-4)<BR>l
注:添加逻辑分区;<BR>First cylinder (51-125, default 51):<BR>Using default value
51<BR>Last cylinder or +size or +sizeM or +sizeK (51-125, default 125):
+200M 注:添加一个大小为200M大小的分区;<BR>Command (m for help): n<BR>Command
action<BR> l logical (5 or over)<BR> p
primary partition (1-4)<BR>l 注:添加一个逻辑分区;<BR>First cylinder (76-125,
default 76):<BR>Using default value 76<BR>Last cylinder or +size or +sizeM
or +sizeK (76-125, default 125): +200M 注:添加一个大小为200M大小的分区;<BR>Command (m
for help): p 列出分区表;<BR>Disk /dev/sda: 1035 MB, 1035730944 bytes<BR>256
heads, 63 sectors/track, 125 cylinders<BR>Units = cylinders of 16128 * 512
= 8257536 bytes<BR> Device Boot Start End Blocks Id
System<BR>/dev/sda1 1 25 201568+ 83 Linux<BR>/dev/sda2 26 50 201600 83
Linux<BR>/dev/sda3 51 125 604800 5 Extended<BR>/dev/sda5 51 75 201568+ 83
Linux<BR>/dev/sda6 76 100 201568+ 83 Linux</CODE></DIV>
<P></P>
<P>然后我们根据前面所说通过t指令来改变分区类型;</P>
<P>最后不要忘记w保存退出;</P>
<P><FONT size=4><B><BR>五、对分区进行格式化,以及加载;<BR></B></FONT></P>
<P>先提示一下;用 mkfs.bfs mkfs.ext2 mkfs.jfs mkfs.msdos mkfs.vfatmkfs.cramfs
mkfs.ext3 mkfs.minix mkfs.reiserfs mkfs.xfs 等命令来格式化分区,比如我想格式化
sda6为ext3文件系统,则输入;</P>
<P>
<DIV class=codeblock><CODE>[root@localhost beinan]# mkfs.ext3
/dev/sda6</CODE></DIV>
<P></P>
<P>如果我想加载 sda6到目前系统来存取文件,应该有mount 命令,但首先您得建一个挂载目录;比如 /mnt/sda6 ;</P>
<P>
<DIV class=codeblock><CODE>[root@localhost beinan]# mkdir
/mnt/sda6<BR>[root@localhost beinan]# mount /dev/sda6
/mnt/sda6<BR>[root@localhost beinan]# df -lh<BR>Filesystem 容量 已用 可用 已用%
挂载点<BR>/dev/hda8 11G 8.4G 2.0G 81% /<BR>/dev/shm 236M 0 236M 0%
/dev/shm<BR>/dev/hda10 16G 6.9G 8.3G 46% /mnt/hda10<BR>/dev/sda6 191M 5.6M
176M 4% /mnt/sda6</CODE></DIV>
<P></P>
<P>这样我们就能进入 /mnt/sda6目录,然后存取文件了;</P>
<P>具体的权限方法,以及mount 更详细的用法,在以后我会专门写一个帖子;在一帖中放下所有的内容实在有点为难;</P>
<P><FONT size=4><B>后记:</B></FONT></P>
<P>在本文写完后,我还要写另一个分区工具parted;在 Fedora 4.0 中cfdisk 被去掉了;所以不想介绍这个工具;</P>
<P><A href="http://www.linuxsir.org/main/?q=node/41">《Linux
查看磁盘分区、文件系统、使用情况的命令和相关工具介绍》</A><BR><A
href="http://www.linuxsir.org/main/?q=node/81">《实例解说 fdisk 使用方法》</A><BR><A
href="http://www.linuxsir.org/main/?q=node/23">《在Fedora core 4.0
加载NTFS和FAT32分区详述》</A><BR><A
href="http://www.linuxsir.org/main/?q=node/80">《合理规划您的硬盘分区》</A><BR><A
href="http://www.linuxsir.org/main/?q=node/82">《系统引导过程及硬盘分区结构论述》</A><BR><A
href="http://www.linuxsir.org/main/?q=node/40">《Fedora Core 4.0
HAL配置即插即用移动存储(USB及1394)的实践》</A><BR><A
href="http://www.linuxsir.org/main/?q=node/127">《在Linux系统中存储设备的两种表示方法》</A></P></DIV>
<DIV class=links>By 北南南北 at 2005/09/11 - 16:59 | <A
href="http://www.linuxsir.org/main/?q=taxonomy/term/1">Linux</A> | <A
href="http://www.linuxsir.org/main/?q=taxonomy/term/25">基础知识</A> | <A
href="http://www.linuxsir.org/main/?q=taxonomy/term/22">硬件解决</A> | <A
title=共享你有关本文的思想和意见。
href="http://www.linuxsir.org/main/?q=comment/reply/81#comment">参与评论</A> |
11032 阅读</DIV></DIV><A id=comment></A>
<FORM action=?q=comment method=post>
<DIV><INPUT type=hidden value=81 name=edit[nid]> </DIV></FORM><!-- end content -->
<DIV id=footer>
<CENTER><A href="http://www.linuxsir.org/"><IMG
src="实例解说 fdisk 使用方法 LinuxSir_Org.files/logo.jpg"></A> <BR><A
href="http://www.miibeian.gov.cn/"><FONT color=blue
size=3><B>闽ICP备06025536号</B></FONT></A><BR>
<SCRIPT language=JavaScript
src="实例解说 fdisk 使用方法 LinuxSir_Org.files/cyberpolice.htm"></SCRIPT>
<BR><A href="http://www.linuxsir.org/main/?q=node/78"><FONT color=blue
size=3><B>© 2002-2006 LinuxSir.Org</B></FONT></A><BR></CENTER></DIV></TD>
<TD id=sidebar-right>
<DIV class="block block-block" id=block-block-2>
<H2 class=title>基础知识</H2>
<DIV class=content>
<UL>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/23">安装配置</A>
<LI><A
href="http://www.linuxsir.org/main/?q=taxonomy/term/1/25/">基础入门</A>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/22/">硬件解决</A>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/21">软件管理</A>
<LI><A
href="http://www.linuxsir.org/main/?q=taxonomy/term/35/48/">重要资源</A>
</LI></UL></DIV></DIV>
<DIV class="block block-block" id=block-block-4>
<H2 class=title>软件应用</H2>
<DIV class=content>
<UL>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/30">网络工具</A>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/32">图形图像</A>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/31">音乐视频</A>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/49">字体中文</A>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/33">软件其它</A>
</LI></UL></DIV></DIV>
<DIV class="block block-block" id=block-block-5>
<H2 class=title>网络服务器</H2>
<DIV class=content>
<UL>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/27">文件服务器<A>
<LI><A
href="http://www.linuxsir.org/main/?q=taxonomy/term/28">Web服务器</A>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/29">邮件服务器</A>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/37">数据库应用</A>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/50">服务器其它</A>
</LI></UL></DIV></DIV>
<DIV class="block block-comment" id=block-comment-0>
<H2 class=title>最新评论</H2>
<DIV class=content>
<DIV class=item-list>
<UL>
<LI><A
href="http://www.linuxsir.org/main/?q=node/222#comment-624">错了</A><BR>15
min 39 sec 前
<LI><A
href="http://www.linuxsir.org/main/?q=node/222#comment-623">q</A><BR>35
min 16 sec 前
<LI><A
href="http://www.linuxsir.org/main/?q=node/222#comment-622">有些道理</A><BR>56
min 45 sec 前
<LI><A
href="http://www.linuxsir.org/main/?q=node/219#comment-621">"内置的摄像头也能用这个吗?"</A><BR>14
hours 1 min 前
<LI><A
href="http://www.linuxsir.org/main/?q=node/80#comment-620">终于知道了...</A><BR>23
hours 16 min 前
<LI><A
href="http://www.linuxsir.org/main/?q=node/106#comment-619">okok</A><BR>2
days 14 hours 前
<LI><A
href="http://www.linuxsir.org/main/?q=node/93#comment-618">那要除去阴影呢?</A><BR>3
days 19 hours 前
<LI><A
href="http://www.linuxsir.org/main/?q=node/227#comment-617">不错的机会</A><BR>4
days 6 hours 前
<LI><A
href="http://www.linuxsir.org/main/?q=node/221#comment-616">配置可执行程序的路径</A><BR>4
days 12 hours 前
<LI><A
href="http://www.linuxsir.org/main/?q=node/222#comment-615">修改hostname出现的问题</A><BR>5
days 2 hours
前</LI></UL></DIV></DIV></DIV></TD></TR></TBODY></TABLE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -