Challenges to creating and using SWAP files in Ubuntu 18.04

it couldn’t continue because the partition was mounted. my suggestion would be to run fsck from a live usb since the partition you want to check won’t be mounted. if you want to understand which disk is which when you are running a live session, you can run lsblk -f to see a list of disks (well, block devices), partitions and (most helpful in this instance) mountpoints. / would indicate the partition of the disk you are booted into. you would want to run fsck on the second partition of the other disk (probably, but not always sdb2).

i don’t understand your use of the -n option here. the man page says:

-n
For some filesystem-specific checkers, the -n option will cause the fs-specific fsck to avoid attempting to repair any problems, but simply report such problems to stdout.

possibly? but being off by one block doesn’t seem like it would be that big of an issue. probably the best way to tell would be:

i would try running fsck without the -n option from a usb.

thanks. i appreciate you letting me know.

from your first photo, it definitely looks like you have swap and it is being used. from your second photo, i don’t even see the mkswap command so my feeling is that this is not about swap.

Yes, the swapon --show shows I have a swapfile. I will try again fsck from the usb and let you know.

as the main question of this thread (creating and using swap) seems to have been resolved, it may benefit you to open a new thread if you want to get other views to help you try and resolve your system’s inability to boot.

1 Like