Sunday, February 7, 2010

Using diskpart to delete & merge ubuntu partition in Winsows 7

I have ubuntu 9.0 installed but seldom use it, so I decided to delete this 10 Gb partition to free space.
Initially, I want to make use of some software tools like Norton Partition Magic, but am too lazy to download one, so I make use of the built-in disk part utility, and finish the work successfully just following several simple steps:

Microsoft DiskPart 版本 6.1.7600
Copyright (C) 1999-2008 Microsoft Corporation.
在计算机上: #########

DISKPART> list disk

磁盘 ### 状态 大小 可用 Dyn Gpt
-------- ------------- ------- ------- --- ---
磁盘 0 联机 74 GB 1024 KB

DISKPART> select disk 0

磁盘 0 现在是所选磁盘。

DISKPART> list partition

分区 ### 类型 大小 偏移量
------------- ---------------- ------- -------
分区 1 主要 24 GB 31 KB
分区 0 扩展的 50 GB 24 GB
分区 2 逻辑 39 GB 24 GB
分区 3 逻辑 10 GB 64 GB <--- This is the ubuntu partition

DISKPART> select partition 3

分区 3 现在是所选分区。

DISKPART> delete partition

DiskPart 成功地删除了所选分区

DISKPART> list disk

磁盘 ### 状态 大小 可用 Dyn Gpt
-------- ------------- ------- ------- --- ---
* 磁盘 0 联机 74 GB 10 GB


DISKPART> list volume

卷 ### LTR 标签 FS 类型 大小 状态 信息
---------- --- ----------- ----- ---------- ------- --------- --------
卷 0 E GRMCPRFRER_ UDF DVD-ROM 2483 MB 正常

卷 1 C NTFS 磁盘分区 24 GB 正常 系

卷 2 D NTFS 磁盘分区 39 GB 正常


DISKPART> select volume d

卷 2 是所选卷。

DISKPART> extend

DiskPart 成功地扩展了卷。

DISKPART> list volume

卷 ### LTR 标签 FS 类型 大小 状态 信息
---------- --- ----------- ----- ---------- ------- --------- --------
卷 0 E GRMCPRFRER_ UDF DVD-ROM 2483 MB 正常
卷 1 C NTFS 磁盘分区 24 GB 正常 系统
* 卷 2 D NTFS 磁盘分区 50 GB 正常

DISKPART>

No comments: