ubuntu:disk:delete_a_partition
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ubuntu:disk:delete_a_partition [2021/06/04 10:13] – created peter | ubuntu:disk:delete_a_partition [2021/06/04 10:22] (current) – peter | ||
---|---|---|---|
Line 39: | Line 39: | ||
</ | </ | ||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | Common disk names on Linux include: | ||
+ | |||
+ | |Type of disk|Disk names|Commonly used disk names| | ||
+ | |IDE|/ | ||
+ | |SCSI|/ | ||
+ | |ESDI|/ | ||
+ | |XT|/ | ||
+ | |||
+ | |||
+ | The number 1 in /dev/sda1 indicates the partition number. | ||
+ | |||
+ | Make a note of the number of the partition you intend to delete. | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Select the Disk ===== | ||
+ | |||
+ | Select the disk that contains the partition you intend to delete. | ||
+ | |||
+ | <code bash> | ||
+ | sudo fdisk /dev/sdb | ||
+ | </ | ||
+ | |||
+ | 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): | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Delete Partitions ===== | ||
+ | |||
+ | <WRAP alert> | ||
+ | **ALERT: | ||
+ | </ | ||
+ | |||
+ | 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. | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Verify Partition Deletion ===== | ||
+ | |||
+ | Print the partition table to verify that the partition has been deleted. | ||
+ | |||
+ | <code bash> | ||
+ | Command (m for help): p | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Save Changes and Quit ===== | ||
+ | |||
+ | Run the **w** command to write and save changes made to the disk. | ||
+ | |||
+ | <code bash> | ||
+ | Command (m for help): w | ||
+ | </ | ||
ubuntu/disk/delete_a_partition.1622801584.txt.gz · Last modified: 2021/06/04 10:13 by peter