You are not logged in.
Pages: 1
Topic closed
I have been rebooting alot recently when I noticed that on boot up it was failing to initialize swap!
I used the command free and it returned that swap had zero space! what is going on?
here is my fstab for reference.
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
none /dev/pts devpts defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0
/dev/sda1 /boot ext3 defaults 0 1
/dev/sda2 / ext3 defaults 0 1
/dev/sda3 /home ext3 defaults 0 1
/dev/sda5 swap swap defaults 0 0did it not get formatted properly in the install or something?
Last edited by semperfiguy (2007-12-28 14:52:28)
Offline
Just run mkswap /dev/sda5, if you have verified it's really the right partition.
I hate sigs. This one only exists to remind myself to get an avatar.
Offline
mkswap /dev/sda5 and a reboot worked. Thank You
Offline
Since this is coming up in the Google results concerning this message, I thought I'd mention a solution to a related problem. In my case, Linux seemed to be renumbering the drives at some point before initializing swap so the swap partition was renamed from /dev/sda2 to /dev/sdc2 and /dev/sda2 became an NTFS partition on another drive. Since /etc/fstab listed /dev/sda2 as swap, and /dev/sda2 now pointed to a partition on another drive, the OS failed to initialize swap.
What seemed to work for me was to change the line in /etc/fstab
/dev/sda2 none swap defaults 0 0
to
UUID=50e1a18a-d1d5-452b-99cb-69408befc029 none swap defaults 0 0
You'll need to figure out the UUID of your swap partition (it may be listed in /etc/fstab). These are randomly generated when you do mkswap. Just make sure you don't mkswap on the wrong drive because of this renumbering!
Offline
Don't necrobump old threads, Gezbarb. Your "solution" is unrelated to this thread; swap was not working for the OP because a swap partition did not exist.
Linux does not change drive order/priority, the motherboard firmware does. Avoiding this is what UUIDs and disk labels are for, as you've discovered.
Offline
Closing. https://wiki.archlinux.org/index.php/Fo … Bumping.22
The exception in the third bullet does not apply here.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
One difference between the two OSs though is that Linux progresses. The other decays.. --Trilby
----
How to Ask Questions the Smart Way
Online
Pages: 1
Topic closed