Suchen

Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

13.3. Removing a Partition

download PDF

Warning

Do not attempt to remove a partition on a device that is in use.

Procedure 13.3. Remove a Partition

  1. Before removing a partition, do one of the following:
    • Boot into rescue mode, or
    • Unmount any partitions on the device and turn off any swap space on the device.
  2. Start the parted utility:
    # parted device
    Replace device with the device on which to remove the partition: for example, /dev/sda.
  3. View the current partition table to determine the minor number of the partition to remove:
    (parted) print
  4. Remove the partition with the command rm. For example, to remove the partition with minor number 3:
    (parted) rm 3
    The changes start taking place as soon as you press Enter, so review the command before committing to it.
  5. After removing the partition, use the print command to confirm that it is removed from the partition table:
    (parted) print
  6. Exit from the parted shell:
    (parted) quit
  7. Examine the content of the /proc/partitions file to make sure the kernel knows the partition is removed:
    # cat /proc/partitions
  8. Remove the partition from the /etc/fstab file. Find the line that declares the removed partition, and remove it from the file.
  9. Regenerate mount units so that your system registers the new /etc/fstab configuration:
    # systemctl daemon-reload
Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.