User Tools

Site Tools


ubuntu:disk:delete_a_partition

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
ubuntu:disk:delete_a_partition [2021/06/04 10:13] – created peterubuntu:disk:delete_a_partition [2021/06/04 10:22] (current) peter
Line 39: Line 39:
 </code> </code>
  
 +<WRAP info>
 +**NOTE:**  The /dev/sda or /dev/sda represent physical disks.
 +
 +Common disk names on Linux include:
 +
 +|Type of disk|Disk names|Commonly used disk names|
 +|IDE|/dev/hd[a-h]|/dev/hda, /dev/hdb|
 +|SCSI|/dev/sd[a-p]|/dev/sda, /dev/sdb|
 +|ESDI|/dev/ed[a-d]|/dev/eda|
 +|XT|/dev/xd[ab]|/dev/xda|
 +
 +
 +The number 1 in /dev/sda1 indicates the partition number.  
 +
 +Make a note of the number of the partition you intend to delete.
 +</WRAP>
 +
 +----
 +
 +===== Select the Disk =====
 +
 +Select the disk that contains the partition you intend to delete.
 +
 +<code bash>
 +sudo fdisk /dev/sdb
 +</code>
 +
 +returns:
 +
 +<code bash>
 +Welcome to fdisk (util-linux 2.34).
 +Changes will remain in memory only, until you decide to write them.
 +Be careful before using the write command.
 +
 +The old ext4 signature will be removed by a write command.
 +
 +Device does not contain a recognised partition table.
 +The size of this disk is 14.6 TiB (16000900661248 bytes). DOS partition table format cannot be used on drives for volumes larger than 2199023255040 bytes for 512-byte sectors. Use GUID partition table format (GPT).
 +
 +Created a new DOS disklabel with disk identifier 0xe8d6d674.
 +
 +Command (m for help): 
 +</code>
 +
 +----
 +
 +===== Delete Partitions =====
 +
 +<WRAP alert>
 +**ALERT:**  Before deleting a partition, back up your data.  All data is automatically deleted when a partition is deleted.
 +</WRAP>
 +
 +To delete partition, run the d command in the fdisk command-line utility.
 +
 +The partition is automatically selected if there are no other partitions on the disk. If the disk contains multiple partitions, select a partition by typing its number.
 +
 +<code bash>
 +Command (m for help): d
 +Selected partition 1
 +Partition 1 has been deleted.
 +</code>
 +
 +----
 +
 +===== Verify Partition Deletion =====
 +
 +Print the partition table to verify that the partition has been deleted. 
 +
 +<code bash>
 +Command (m for help): p
 +</code>
 +
 +----
 +
 +===== Save Changes and Quit =====
 +
 +Run the **w** command to write and save changes made to the disk.
 +
 +<code bash>
 +Command (m for help): w
 +</code>
  
ubuntu/disk/delete_a_partition.1622801584.txt.gz · Last modified: 2021/06/04 10:13 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki