Page 1 of 1

[SOLVED] remounting the SWAP

Posted: Tue May 20, 2014 8:35 am
by TANUJMINTLINUX
[SOLVED]
Hello!
i am presently using linux mint 16 xfce .
accidently i deleted my swap partition . :lol:
So ,i re -created it using "disks" ,but it does not mounts when i boot i have to mount it manually after i log in .
how can i make it mount automatically when i log in :?:

Please reply faster !

Re: remounting the SWAP

Posted: Tue May 20, 2014 8:46 am
by karlchen
Hello, TanujMintLinux.

First of all: A swap device will not be mounted. It will only be activated. The swap mechanism uses the disk device, not a mounted filsystem.
In case you actually mean that swapping is disabled and that you have to re-enable it on every reboot, in this case I could imagine that the UUID of your swap partition has changed, but that the file /etc/fstab still holds the old UUID.
In short words verify and make sure that the details given for "swap" in the file /etc/fstab correspond to the facts.

Sample taken from my /etc/fstab:

Code: Select all

# swap was on /dev/sda5 during installation
UUID=d44a6758-8995-42ed-ac73-e39806848676 none            swap    sw              0       0
Note the word "none" following the UUID. It means "no mountpoint".

HTH,
Karl

Re: remounting the SWAP

Posted: Tue May 20, 2014 10:14 pm
by TANUJMINTLINUX
karlchen wrote:Hello, TanujMintLinux.

First of all: A swap device will not be mounted. It will only be activated. The swap mechanism uses the disk device, not a mounted filsystem.
In case you actually mean that swapping is disabled and that you have to re-enable it on every reboot, in this case I could imagine that the UUID of your swap partition has changed, but that the file /etc/fstab still holds the old UUID.
In short words verify and make sure that the details given for "swap" in the file /etc/fstab correspond to the facts.

Sample taken from my /etc/fstab:

Code: Select all

# swap was on /dev/sda5 during installation
UUID=d44a6758-8995-42ed-ac73-e39806848676 none            swap    sw              0       0
Note the word "none" following the UUID. It means "no mountpoint".

HTH,
Karl

i could not find directory /etc/fstb .. it is actually /etc/fstab.d and is empty

Re: remounting the SWAP

Posted: Wed May 21, 2014 5:59 am
by TANUJMINTLINUX
TANUJMINTLINUX wrote:
karlchen wrote:Hello, TanujMintLinux.

First of all: A swap device will not be mounted. It will only be activated. The swap mechanism uses the disk device, not a mounted filsystem.
In case you actually mean that swapping is disabled and that you have to re-enable it on every reboot, in this case I could imagine that the UUID of your swap partition has changed, but that the file /etc/fstab still holds the old UUID.
In short words verify and make sure that the details given for "swap" in the file /etc/fstab correspond to the facts.

Sample taken from my /etc/fstab:

Code: Select all

# swap was on /dev/sda5 during installation
UUID=d44a6758-8995-42ed-ac73-e39806848676 none            swap    sw              0       0
Note the word "none" following the UUID. It means "no mountpoint".

HTH,
Karl

i could not find directory /etc/fstb .. it is actually /etc/fstab.d and is empty

and yes , something like-
" uuid #@%$^^^& no mount point"
comes written while booting

just clearly tell me what should i do so swap "ACTIVATES" on booting itself and i dont have to mount the swap partition i created after destorying the one at installation
and i just skip it

Re: remounting the SWAP

Posted: Wed May 21, 2014 6:33 am
by altair4
@TANUJMINTLINUX

To do what karlchen suggested in his post:
karlchen wrote:In short words verify and make sure that the details given for "swap" in the file /etc/fstab correspond to the facts.
Run the following command:

Code: Select all

sudo blkid -c /dev/null
In the output of that command should be a line with a "TYPE = swap". The UUID of that swap file is probably different from the one you have in /etc/fstab.

If it is then edit fstab as root:

Code: Select all

gksu gedit /etc/fstab
Change the UUID number of the swap line then save the file.