日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

fdisk 磁盘分区命令

發(fā)布時間:2025/1/21 编程问答 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 fdisk 磁盘分区命令 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

實例一、查看整塊磁盤分區(qū)狀況

[root@localhost ~]# fdisk -l


Disk /dev/hdc: 40.0 GB, 40020664320 bytes

16 heads, 63 sectors/track, 77545 cylinders

Units = cylinders of 1008 * 512 = 516096 bytes


? ?Device Boot ? ? ?Start ? ? ? ? End ? ? ?Blocks ? Id ?System

/dev/hdc1 ? * ? ? ? ? ? 1 ? ? ? ? 203 ? ? ?102280+ ?83 ?Linux

/dev/hdc2 ? ? ? ? ? ? 204 ? ? ? 77545 ? ?38980368 ? 8e ?Linux LVM


實例二、查看指定分區(qū)使用狀況

[root@localhost ~]# fdisk -l /dev/hdc1


Disk /dev/hdc1: 104 MB, 104735232 bytes

16 heads, 63 sectors/track, 202 cylinders

Units = cylinders of 1008 * 512 = 516096 bytes


Disk /dev/hdc1 doesn't contain a valid partition table


================以下對磁盤進行分區(qū)操作=======================

一、對磁盤/dev/hdc分區(qū)

[root@localhost ~]# fdisk /dev/hdc


The number of cylinders for this disk is set to 77545.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

? ?(e.g., DOS FDISK, OS/2 FDISK)


Command (m for help):

#?Command (m for help): 提示鍵入m獲取幫助菜單

二、fdisk幫助菜單

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 ?# 刪除一個分區(qū)

? ?l ? list known partition types ?# 列出支持的分區(qū)格式

? ?m ? print this menu ?# 幫助菜單

? ?n ? add a new partition ?# 增加一個新的分區(qū)

? ?o ? create a new empty DOS partition table

? ?p ? print the partition table ?# 列出分區(qū)表

? ?q ? quit without saving changes ?# 退出不保存

? ?s ? create a new empty Sun disklabel ?

? ?t ? change a partition's system id ?# 更改分區(qū)ID

? ?u ? change display/entry units

? ?v ? verify the partition table

? ?w ? write table to disk and exit ?# 保存分區(qū)操作

? ?x ? extra functionality (experts only)


三、開始分區(qū)

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

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0x8c86b73c.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won't be recoverable.


Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


WARNING: DOS-compatible mode is deprecated. It's strongly recommended to

? ? ? ? ?switch off the mode (command 'c') and change display units to

? ? ? ? ?sectors (command 'u').


Command (m for help): n

Command action

? ?e ? extended

? ?p ? primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-130, default 1): 1

Last cylinder, +cylinders or +size{K,M,G} (1-130, default 130): +100M


Command (m for help):


四、各選項注釋

? ?e ? extended

擴展分區(qū)

? ?p ? primary partition (1-4)

主分區(qū)

Partition number (1-4):?

分區(qū)號,1-4

First cylinder (1-130, default 1):?

起始柱

Last cylinder, +cylinders or +size{K,M,G} (1-130, default 130):?

分區(qū)大小


五、分區(qū)完成后會返回命令提示符

Command (m for help):

此時鍵入m即進入幫助菜單

鍵入w即保存分區(qū)操作,如不保存分區(qū)操作直接q退出,則視為放棄當(dāng)前分區(qū)操作

轉(zhuǎn)載于:https://blog.51cto.com/hhx012/1726077

總結(jié)

以上是生活随笔為你收集整理的fdisk 磁盘分区命令的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。