3

More explicitly:

If it safe to shut down a system, boot from a live CD, delete all disk swap partitions, and boot the system?

This is in follow up to How to safely turn off swap permanently and reclaim the space? (on Debian Jessie).

I thought not Debian, or at least Ubuntu (and descendants) will automatically find all swap partitions on all mounted-at-boot disks and allocate swap correctly by default.

The post asking how to turn off swap has many answer posts that have involved, multi-step processes to turn off swap.

Is simply removing the swap partitions not recommended?

ThorSummoner
  • 4,422
  • Why shutdown? swap off, then edit /etc/fstab and remove swap partition. You may need the live CD to resize other partition into where swap was. – ctrl-alt-delor Aug 25 '15 at 21:26

1 Answers1

5

If you remove the swap partitions the system will fail to find them when it next boots. This is a non-fatal error, but you would be better also commenting out (or removing) the corresponding swap lines in /etc/fstab.

Chris Davies
  • 116,213
  • 16
  • 160
  • 287
  • 1
    So the system installer take's care of detecting and setting up swap partitions. Implying installing on a system that does not have swap partitions will not setup swap. Correct? – ThorSummoner Aug 25 '15 at 21:01
  • @ThorSummoner if you don't have a swap partition then you won't have swap. I don't understand what you're getting at, though – Chris Davies Aug 25 '15 at 21:09
  • 2
    Since you mentioned Debian, I believe I saw in the install notes that performing the install on a system with less than 256MB of RAM required swap. So you will be required to dedicate some space for a swap partition at the partitioning step. You don't have to define one if you have more memory though. During a new install the text installer will give you a warning if you don't have a swap part defined, but you can safely ignore/skip it. – Zoredache Aug 25 '15 at 23:11