LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-06-2006, 04:24 PM   #1
mika27
LQ Newbie
 
Registered: Mar 2006
Posts: 7

Rep: Reputation: 0
Mounting swap partition


Hi,

I've just installed Mandrake 10.1, my first linux distro. Being a linux newbie, i installed it with all the default options. I only have 128Mb ram and everything seemed to be really slow. I noticed that the default partitioning options did not create a swap partition so I went ahead and created one myself. It worked perfectly and everything is now running much smoother. However, the swap partition is not mounted at boot time so every time i boot up I have to mount the swap manually. How do i set it so the swap partition gets mounted at boot time?

Thanks
 
Old 03-06-2006, 04:33 PM   #2
ckoniecny
Member
 
Registered: Oct 2005
Posts: 162

Rep: Reputation: 30
You will need to do this in your fstab. Do a "man fstab" and you will see examples of how this can be done with SWAP.
 
Old 03-06-2006, 04:35 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
If you add the following to your /etc/fstab file and substitute the partition that you used for /dev/sda8 you should have your swap mounted at boot time. If it doesn't, try grepping through your startup scripts for references to mount or swap:
Code:
/dev/sda8  swap  swap  defaults  0  0

Last edited by gilead; 03-06-2006 at 05:14 PM.
 
Old 03-06-2006, 04:39 PM   #4
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
put this in your /etc/fstab - but replace /dev/hda4 for where your swap-partition is:
Code:
/dev/hda4 none swap sw 0 0
edit
just saw that gilead was a bit quicker...
should work eighter way...
first is: which partition
second is: where it is mounted to (which directory...) since there is none it says so...
third: type of filesystem - swap in this case
fourth is: the mount-options - sw here
see: man fstab for reference

Last edited by jomen; 03-06-2006 at 04:52 PM.
 
Old 03-06-2006, 05:21 PM   #5
mika27
LQ Newbie
 
Registered: Mar 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by gilead
If you add the following to your /etc/fstab file and substitute the partition that you used for /dev/sda8 you should have your swap mounted at boot time. If it doesn't, try grepping through your startup scripts for references to mount or swap:
Code:
/dev/sda8  swap  swap  defaults  0  0
That worked perfect. Thanks!
 
Old 03-06-2006, 05:31 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
I'm glad it worked Although, jomen is more correct in putting none instead of swap for the second field (according to man fstab).
 
Old 03-06-2006, 05:44 PM   #7
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
...and I was a little late because I was just on the phone with someone (my brother actually...) in...Australia (ACT)
 
Old 03-06-2006, 08:10 PM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
The ACT is a few hours drive from here. I hope you were telling your brother he should be promoting Linux to the hoards of politicians who work there
 
Old 03-06-2006, 08:22 PM   #9
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
I wish it was that near(rather: close...) to me...and:
I didn't - his interests are a little different from mine - it just needs to work...which it does most of the time -you know what I mean...
Good night!
Have a pleasant day!

Last edited by jomen; 03-06-2006 at 08:28 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Partition mounting/KDE errors after creating Fat32 Partition BertBert Linux - General 1 07-07-2004 11:59 AM
swap partition Cheechi Linux - Newbie 11 06-24-2004 11:24 PM
Swap File mounting at boot time sneakerski Arch 2 08-20-2003 10:28 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 09:45 AM
Mounting mounting extended partition and its Logical drives desbyleo Linux - Newbie 10 02-18-2002 04:13 PM


All times are GMT -5. The time now is 10:29 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration