歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux教程

Ubuntu - 硬盤分區、格式化、自動掛載配置

Ubuntu - 硬盤分區、格式化、自動掛載配置 | Hard disk add new partition, format, auto mount in ubuntu

Ubuntu系統的硬盤空間不夠用了,需要增加新的硬盤擴容。將硬盤分區、格式化、自動掛載配置的整個過程記下來,備忘。

運行環境 | Enviroment

Ubuntu 10.10

一、硬盤分區 | Hard disk add new partition

1、顯示硬盤及所屬分區情況。在終端窗口中輸入如下命令:

sudo fdisk -lu


顯示當前的硬盤及所屬分區的情況。如下圖所示:
系統提示:DIsk /dev/sdb doesn't contain a valid partition table。

 

、對硬盤進行分區。在終端窗口中輸入如下命令:

sudo fdisk /dev/sdb


如下圖所示:
在Command (m for help)提示符後面輸入m顯示一個幫助菜單。


 在Command (m for help)提示符後面輸入n,執行 add a new partition 指令給硬盤增加一個新分區。
 出現Command action時,輸入e,指定分區為擴展分區(extended)。
 出現Partition number(1-4)時,輸入1表示只分一個區。
 後續指定起啟柱面(cylinder)號完成分區。

 

在Command (m for help)提示符後面輸入p,顯示分區表。
系統提示如下:
Device Boot                 Start                End                   Blocks          Id             System
/dev/sdb1                           1            26108           209712478+           5          Extended

 

在Command (m for help)提示符後面輸入w,保存分區表。
系統提示:The partition table has been altered!

 


在終端窗口中輸如下命令:
sudo fdisk -lu

如下圖所示:
系統已經識別了硬盤 /dev/sdb 的分區。
Copyright © Linux教程網 All Rights Reserved