| |
|
Home
|
| Red Hat Linux 8.0: The Official Red Hat Linux Customization Guide |
|---|
| Prev | Chapter 2. Swap Space | Next |
Removing Swap Space To remove a swap partition:
The hard drive can not be in use (partitions can not be mounted,
and swap space can not be enabled). The easiest way to achieve this it
to boot your system in rescue mode. Refer to Chapter 8 for instructions on booting into rescue
mode. When prompted to mount the filesystem, select
Skip. Alternately, if the drive does not contain any partitions in
use, you can unmount them and turn off all the swap space on the hard
drive with the swapoff command. 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): Remove its entry from /etc/fstab. 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 free space. At the (parted) prompt, type
print to view the existing partitions and
determine the minor number of the swap partition you wish to
delete. At the (parted) prompt, type rm
MINOR, where
MINOR is the minor number of the
partition you want to remove.  | Warning |
|---|
| | Changes take effect immediately; you must type the
correct minor number. |
Type quit to exit
parted.
To remove a swap file:
At a shell prompt as root, execute the following command to
disable the swap file (where /swapfile is the
swap file): Remove its entry from /etc/fstab. Remove the actual file:
|
|
|
|
|
|
|
|
Disclaimer: For authoritative source or latest update to this
documentation, please refer to http://www.redhat.com/docs/manuals/linux/ |
|
 |
|
|
|
Quotes: Wisdom is knowing what to do next; virtue is doing it.
|
|
|
|
|
|
|