To remove a swap partition:
Chapter 9 Basic System Recovery for instructions on booting into rescue mode. When prompted to mount the file system, select Skip.
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):
swapoff /dev/hdb2 |
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 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.
![]() | 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):
swapoff /swapfile |
Remove its entry from /etc/fstab.
Remove the actual file:
rm /swapfile |
| Главная |