磁碟分割槽的刪除

2021-06-05 12:44:58 字數 3220 閱讀 6528

使用fdisk  裝置名  進入fdisk 介面。

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

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): p

disk /dev/sdb: 8589 mb, 8589934592 bytes

255 heads, 63 sectors/track, 1044 cylinders

units = cylinders of 16065 * 512 = 8225280 bytes

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

i/o size (minimum/optimal): 512 bytes / 512 bytes

disk identifier: 0xd7ea6b16

device boot      start         end      blocks   id  system

/dev/sdb1               1        1044     8385898+   5  extended

/dev/sdb5               1        1044     8385867   83  linux

//有兩個分割槽,乙個擴充套件分割槽/dev/sdb1,還有乙個邏輯分割槽/dev/sda5。

使用d 來刪除分割槽.

command (m for help): d 

partition number (1-5): 5  //輸入要刪除的分割槽好5即代表/dev/sdb5.

command (m for help): p

disk /dev/sdb: 8589 mb, 8589934592 bytes

255 heads, 63 sectors/track, 1044 cylinders

units = cylinders of 16065 * 512 = 8225280 bytes

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

i/o size (minimum/optimal): 512 bytes / 512 bytes

disk identifier: 0xd7ea6b16

device boot      start         end      blocks   id  system

// /dev/sdb1               1        1044     8385898+   5  extended

邏輯分割槽/dev/sdb5 已經被刪除了,現在我們再來把擴充套件分割槽也給刪除掉.

command (m for help): d

selected partition 1

因為只剩下最後乙個分割槽,所以fdisk 自動的選中該分割槽.

command (m for help): p

disk /dev/sdb: 8589 mb, 8589934592 bytes

255 heads, 63 sectors/track, 1044 cylinders

units = cylinders of 16065 * 512 = 8225280 bytes

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

i/o size (minimum/optimal): 512 bytes / 512 bytes

disk identifier: 0xd7ea6b16

device boot      start         end      blocks   id  system

command (m for help): w

the partition table

has been altered!

calling ioctl() to re-read partition table.

warning: re-reading the partition table failed with error 16: device or resource busy.

the kernel still uses the old table. the new table will be used at

the next reboot or after you run partprobe(8) or kpartx(8)

syncing disks

在執行分割槽刪除的時候出現了乙個錯誤,說的是系統無法載入資訊的分割槽表,因為裝置在忙。因為

我粗心大意在刪除分割槽前,沒有把該分割槽解除安裝掉。下面來補做這個工作。

[root@zeng ~]# umount /dev/sdb5

檢視下裝置的分割槽表,ok 沒問題.

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

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): p

disk /dev/sdb: 8589 mb, 8589934592 bytes

255 heads, 63 sectors/track, 1044 cylinders

units = cylinders of 16065 * 512 = 8225280 bytes

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

i/o size (minimum/optimal): 512 bytes / 512 bytes

disk identifier: 0xd7ea6b16

device boot      start         end      blocks   id  system

command (m for help): q

windows磁碟分割槽及刪除 擴充套件磁碟分割槽

1 開啟磁碟管理面板 1.在開始選單 搜尋框 搜尋 磁碟 或者硬碟 點選控制面板下的選項 建立並格式化硬碟分割槽 2.開啟控制面板 搜尋 磁碟 或者硬碟 點選 管理工具下的選項 建立並格式化硬碟分割槽 3.選中計算機圖示 右鍵 管理 雙擊 儲存下的選項 磁碟管理 2 磁碟分割槽步驟 1 選中要分割槽...

刪除磁碟分割槽 刪除OEM分割槽

其實可以用windows自帶的工具 diskpart來實現,而且不會破壞其他分割槽的資料,具體操作如下 首先開啟cmd,輸入 diskpart.exe 回車 提示轉入diskpart 然後輸入 rescan 回車 掃瞄硬碟 接著輸入 list disk 回車 硬碟列表,可以看到連線到該主機的硬碟列表...

刪除磁碟分割槽 刪除OEM分割槽

其實可以用windows自帶的工具 diskpart來實現,而且不會破壞其他分割槽的資料,具體操作如下 首先開啟cmd,輸入 diskpart.exe 回車 提示轉入diskpart 然後輸入 rescan 回車 掃瞄硬碟 接著輸入 list disk 回車 硬碟列表,可以看到連線到該主機的硬碟列表...