LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-20-2007, 09:34 AM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
Can't mount my swap partition


Why can't I mount my swap partition on gutsy?

I noticed I had no active swap yesterday. It was working normally some days ago (on gutsy, I updated... and keep doing it... about two months ago).

Code:
$ LANG=en sudo swapon -a
swapon: /dev/sda6: Invalid argument
From fstab:
Code:
$ cat /etc/fstab | grep sda6
/dev/sda6 none            swap    sw              0       0
And from fdisk
Code:
$ sudo fdisk -lu

Disk /dev/sda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders, total 160086528 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x28d028cf

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    26624063    13312000+   7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2        26624064    40965749     7170843   8e  Linux LVM
Partition 2 does not end on cylinder boundary.
/dev/sda3        40965750   134897804    46966027+   7  HPFS/NTFS

/dev/sda4       134897805   160071659    12586927+   5  Extended
Partition 4 does not end on cylinder boundary.
/dev/sda5       134897868   145388249     5245191   83  Linux
/dev/sda6       145388313   146962619      787153+  82  Linux swap / Solaris
/dev/sda7       146962683   147492764      265041    b  W95 FAT32
/dev/sda8       147492828   160071659     6289416   83  Linux
I don't like the "Partition # does not end on cylinder boundary.) but what do you think? Shouldn't it mount?
 
Old 09-20-2007, 09:54 AM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Maybe it is not formatted as a swap partition. So be very careful and see if there is actually data there which you might want! Using it as swap space will permanently delete anything on the partition.

If you are 100% sure the partition contains nothing that you want, you can run mkswap on it to prepare it for use as swap space.
 
Old 09-20-2007, 10:14 AM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
You solved it man. mkswap and swapon did the trick. But I wonder why the partition blew up. Amyway.. thanks.
 
Old 09-20-2007, 10:24 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Maybe it's worth running mkswap with the -c option to check for bad blocks. It could be your partition became un-identifiable as swap space because your HDD is failing.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Swap partition won't mount Duron Linux - Hardware 2 08-31-2006 08:03 PM
Old PC forgets about it's own swap partition & mount it. Need help to write a script Old_Fogie Slackware 10 07-08-2006 05:19 AM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
SWAP partition /dev/hdb2 fails to detect/mount after memory upgrade. Sgaileach1 Linux - Hardware 2 02-06-2004 03:29 PM
how to mount swap partition Xiangbuilder Linux - Newbie 5 10-30-2003 06:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration