C++ CSS HTML Java JavaScript MySQL Oracle PERL PHP SQL Unix VBScript XHTML XML Сети
Removing Swap Space
 

2.3. Removing Swap Space

To remove a swap partition:

  1. Chapter 9 Basic System Recovery for instructions on booting into rescue mode. When prompted to mount the file system, select Skip.

    swapoff command.

  2. At a shell prompt as root, execute the following command to make sure the swap partition is disabled (where /dev/hdb2 is the swap partition):

    swapoff /dev/hdb2
  3. Remove its entry from /etc/fstab.

  4. Remove the partition using parted or fdisk. Only parted will be discussed. To remove the partition with parted:

    • At a shell prompt as root, type the command parted /dev/hdb, where /dev/hdb is the device name for the hard drive with the swap space to be removed.

    • At the (parted) prompt, type print

    • At the (parted) prompt, type rm MINOR, where MINOR is the minor number of the partition you want to remove.

      WarningWarning
       

      Changes take effect immediately; you must type the correct minor number.

    • Type quit to exit parted.

To remove a swap file:

  1. At a shell prompt as root, execute the following command to disable the swap file (where /swapfile is the swap file):

    swapoff /swapfile
  2. Remove its entry from /etc/fstab.

  3. Remove the actual file:

    rm /swapfile
Главная