Boot Issues – Deleted Swap, Now Boot Takes Forever

bootgpartedpartitioningswap

Running Ubuntu 15.04. I was receiving messages about my root / partition running out of space, and so I looked up how to allocate more space to it. I followed the answer to this question: How to extend my root (/) partition?

After turning swapoff, deleting the swap parition, and hitting Apply all operations, I executed the command sudo resize2fs /dev/sda10 (in my case, I used sda8, as it is my root partition) and it said: The filesystem is already 2441472 (4k) blocks long. Nothing to do!
. I restarted the machine, and once it reached the Ubuntu screen with the loading dots it stayed there for about 2 minutes before proceeding to the login screen.

I figured I messed something up with the boot process, so I thought I'd recreate the swap space. I opened up GParted and created a new parition in the unallocated space, allocated it as swap, hit swapon, Apply all operations, and restarted. Same thing happens. Every time I restart or do a fresh boot, it hangs on the loading screen for a good 2-3 minutes and then proceeds to the login screen.

I don't see why deleting the swap partition would have messed with the boot, as I understand it is only really used for hibernation.

Best Answer

If you want to remove the swap partition, you should first try by commenting its entry in /etc/fstab, then reboot.

As for the long boot time, it may be that one of your filesystems has been damaged. As soon as your system is up, run the appropriate fsck.* command for each of the file systems. If it reports errors, it will usually recommend how to fix them.

(Btw, running a system without swap is perfectly normal. I'm doing this since several years – these days, common machines have enough RAM.)