Swap off !

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Swap off !

Postby pennylurcher on Sun Jun 15, 2008 2:01 pm

Mint 5 was running perfect on my old hard drive.
My son bought me a new hard drive for fathers day so I copied my mint 5 on to it from my old hard drive using Acronis Backup.
Everything is working great ,but, if I go into Partition Editor swop is off !
I have to go in and turn it on Manually in Partition Editor each time I restart my computer.
How do I fix it please?
pennylurcher
Level 1
Level 1
 
Posts: 22
Joined: Wed Nov 21, 2007 1:59 pm

Linux Mint is funded by ads and donations.
 

Re: Swap off !

Postby 67GTA on Sun Jun 15, 2008 5:41 pm

Look in your file system and post a copy of your /etc/fstab file. Also post the output of
Code: Select all
sudo fdisk -l
from a terminal.
"The only thing necessary for the triumph of evil is for good men to do nothing." Edmund Burke
User avatar
67GTA
Level 6
Level 6
 
Posts: 1301
Joined: Wed Jun 06, 2007 9:49 pm
Location: Kentucky, USA

Re: Swap off !

Postby pennylurcher on Mon Jun 16, 2008 5:30 am

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda5
UUID=e1ed2f0f-22d7-4339-9534-4ed39e9687c2 / ext3 relatime,errors=remount-ro 0 1
# /dev/sda6
UUID=c07ff63a-1b38-4d06-a2b5-432d0ada70aa none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0

========================================================================================
I did the sudo fdisk -1 and got this ?

fdisk: invalid option -- 1

Usage: fdisk [-b SSZ] [-u] DISK Change partition table
fdisk -l [-b SSZ] [-u] DISK List partition table(s)
fdisk -s PARTITION Give partition size(s) in blocks
fdisk -v Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors
=============================================================================
so I did sudo fdisk -l
this is what I got

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd5718b35

Device Boot Start End Blocks Id System
/dev/sda1 * 1 9082 72951133+ 7 HPFS/NTFS
/dev/sda2 9083 30401 171244867+ 5 Extended
/dev/sda5 9083 29966 167750698+ 83 Linux
/dev/sda6 29967 30401 3494106 82 Linux swap / Solaris

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0xf3e7f3e7

Device Boot Start End Blocks Id System
/dev/sdb1 1 155060 78150208+ 7 HPFS/NTFS
pennylurcher
Level 1
Level 1
 
Posts: 22
Joined: Wed Nov 21, 2007 1:59 pm

Re: Swap off !

Postby 67GTA on Mon Jun 16, 2008 9:54 am

That looks normal. I thought maybe the partition numbering had been altered when it was copied to the new HD. You can check to see if it is being used with
Code: Select all
cat /proc/sys/vm/swappiness
Also try turning it on with
Code: Select all
sudo swapon -a
See if these commands give you any relevant errors. Check with the partition manager to see if the swap partition is active, and what flags it has(right click on the partition). If none of that gets you any closer, then probably the easiest thing to to would be to use a live CD and the partition manager to just deleted and recreate the swap partition.
"The only thing necessary for the triumph of evil is for good men to do nothing." Edmund Burke
User avatar
67GTA
Level 6
Level 6
 
Posts: 1301
Joined: Wed Jun 06, 2007 9:49 pm
Location: Kentucky, USA

Re: Swap off !

Postby rbanavara on Mon Jun 16, 2008 2:00 pm

Also its worth verifying the UUID (ubuntu based systems use UUID instead of partition numbers)

from fstab:
# /dev/sda6
UUID=c07ff63a-1b38-4d06-a2b5-432d0ada70aa none swap sw 0 0

Just the swap partition still has the same UUID (run vol_id /dev/sda6, probably as root), If they are not same, update the entry in fstab with correct UUID and try. If not , you can try out 67GTA's suggestions
Don't fix it if it ain't broken, don't break it if you can't fix it -Husse
User avatar
rbanavara
Level 4
Level 4
 
Posts: 233
Joined: Mon Jun 02, 2008 9:07 am

Re: Swap off !

Postby pennylurcher on Tue Jun 17, 2008 9:47 am

cat /proc/sys/vm/swappiness
60
===================================
sudo swapon -a
swapon: cannot canonicalize /dev/disk/by-uuid/c07ff63a-1b38-4d06-a2b5-432d0ada70aa: No such file or directory
swapon: cannot stat /dev/disk/by-uuid/c07ff63a-1b38-4d06-a2b5-432d0ada70aa: No such file or directory

====================================
I restarted the computer with the cd ,deleted the swap file , re installed it.
turned computer off then on again ,went into partition editer the swap file is turned off !!
I have to click on swapon to turn it on.
pennylurcher
Level 1
Level 1
 
Posts: 22
Joined: Wed Nov 21, 2007 1:59 pm

Re: Swap off !

Postby MagnusB on Tue Jun 17, 2008 10:28 am

You might have some UUID issues, edit fstab and change the UUID to /dev/sda6 (assuming that is the swap partition).
Image
You're not drunk if you can lie on the floor without holding on.
--Dean Martin
MagnusB
Level 6
Level 6
 
Posts: 1255
Joined: Sun Nov 18, 2007 12:39 pm
Location: Norway

Re: Swap off !

Postby 67GTA on Tue Jun 17, 2008 10:37 am

I think MagnusB and rbanavara have it right. Open a terminal and run
Code: Select all
sudo blkid
This will show you the UUID of your partitions. Check your UUID for sda6 against the one shown in fstab. MagnusB has the best solution for fixing that.
"The only thing necessary for the triumph of evil is for good men to do nothing." Edmund Burke
User avatar
67GTA
Level 6
Level 6
 
Posts: 1301
Joined: Wed Jun 06, 2007 9:49 pm
Location: Kentucky, USA

Re: Swap off !

Postby pennylurcher on Tue Jun 17, 2008 11:58 am

Thank-you very much for your help ,you've solved my problem :D
the UUID'S were different, edited the fstab one and everything is OK now.
Best wishes
Bernard (g6tet)
pennylurcher
Level 1
Level 1
 
Posts: 22
Joined: Wed Nov 21, 2007 1:59 pm

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: JustJazz and 31 guests

cron