LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-23-2006, 12:55 PM   #1
sharapchi
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: slackware
Posts: 119

Rep: Reputation: 15
can swap not mount?


I have installed slacware 11. Then i notice that swap partition is not mounted. Can a thing like this happen? How can i make mounted my swap on boot?

Thanks.
 
Old 10-23-2006, 01:07 PM   #2
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
Swap partitions are not mounted as they don't contain a proper filesystem.
Issue this command as root to see how your swap partitions are doing
Code:
swapon -s
 
Old 10-23-2006, 01:19 PM   #3
sharapchi
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: slackware
Posts: 119

Original Poster
Rep: Reputation: 15
when i use "swapon -s" command i cant see anything about swap.
Code:
root@sarapci:/home/sarapci# swapon -s
Filename                        Type            Size    Used    Priority
root@sarapci:/home/sarapci#
 
Old 10-23-2006, 01:24 PM   #4
sharapchi
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: slackware
Posts: 119

Original Poster
Rep: Reputation: 15
and also i want to say that i cant see anything about "swap" on fstab.
 
Old 10-23-2006, 01:27 PM   #5
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
ok
Let's go on a troubleshooting crash course. Likely all the commands that I shall mention from now on would require execution as root, as we will be doing some basic but easy system mainteinance stuff.
First type
Code:
fdisk -l | grep -i swap
to check if you have any swap partition(s) available. If you don't you might need to create one (or more as you please) with cfdisk or with fdisk itself if you feel confident with it
Please post back that output
 
Old 10-23-2006, 01:39 PM   #6
sharapchi
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: slackware
Posts: 119

Original Poster
Rep: Reputation: 15
Yes, i have a swap partition. And i think that on installation setup program did not write on fstab. Here is my fdisk -l and fstab.

Code:
bash-3.1$ su
Password:
bash-3.1# fdisk -l | grep "swap"
/dev/sda5            4867        5110     1959898+  82  Linux swap
bash-3.1# cat /etc/fstab | grep "swap"
bash-3.1# cat /etc/fstab
/dev/sda1        /                reiserfs    defaults         1   1
/dev/sda2        /home            reiserfs    defaults         1   2
/dev/sda6        /nilay           reiserfs    defaults         1   2
/dev/sda7        /musti           reiserfs    defaults         1   2
/dev/sdb1        /mnt/windows/c   ntfs        ro               1   0
/dev/sdb2        /mnt/windows/d   ntfs        ro               1   0
/dev/sdb3        /mnt/windows/e   ntfs        ro               1   0
/dec/sdc1        /mnt/memory      vfat        user,noauto
/dev/cdrom       /mnt/cdrom       auto        noauto,user,ro   0   0
/dev/dvd         /mnt/dvd         auto        noauto,user,ro   0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
bash-3.1#
 
Old 10-23-2006, 01:47 PM   #7
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
cool!
You have passed the most difficult part already.
Add this line to your /etc/fstab file. Put it at the beginning of the file, before your /dev/sda1 entry:
Code:
/dev/sda5        swap                swap        defaults                  0   0
/dev/sda1 ...
/dev/sda2 ...
Save and exit.
Now let's make sure that you can use your /dev/sda5 partition as a swap space. Let's format it:
Code:
mkswap /dev/sda5
And finally, tell the system that you want to use all your swap partitions found in your /etc/fstab file:
Code:
swapon -a
Let's check that you have a working swap with the command that I gave you before
Code:
swapon -s
Just to be sure, you must see some swap here too:
Code:
free
And that's it. Hope it works without any hassle

Last edited by raska; 10-23-2006 at 01:48 PM.
 
  


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
cannot mount swap Murdock1979 Slackware 2 12-26-2005 01:51 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
how to mount swap partition Xiangbuilder Linux - Newbie 5 10-30-2003 06:59 PM
what is mount point for swap sadiboyz Solaris / OpenSolaris 7 09-10-2003 06:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:47 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