LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 02-12-2004, 03:30 AM   #1
codeape
Member
 
Registered: Feb 2004
Distribution: Debian
Posts: 62

Rep: Reputation: 15
swap partition not mounted after Debian installation


During the Debian install I opted to partition a swap.
I noticed however that df-k returned only one partition. In the fstab the swap partition is indeed not mounted.

Can it cause any harm to change the fstab from:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hda1 / ext2 errors=remount-ro 0 1
/dev/hda2 none swap sw 0 0
/dev/hda5 /data ext2 defaults 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0

to:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hda1 / ext2 errors=remount-ro 0 1
/dev/hda2 /tmp swap sw 0 0
/dev/hda5 /data ext2 defaults 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0

The /tmp directory obviously already exists, so I suspect I might be making things worse...

Any ideas?




# fdisk -l

Disk /dev/hda: 255 heads, 63 sectors, 2434 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 498 4000153+ 83 Linux
/dev/hda2 499 514 128520 82 Linux swap
/dev/hda3 515 2434 15422400 5 Extended
/dev/hda5 515 1510 8000338+ 83 Linux
/dev/hda6 1511 2434 7421998+ 83 Linux
 
Old 02-12-2004, 03:47 AM   #2
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
try this:
> /dev/hda2 swap swap pri=42 0 0

did you do a "mkswap" on /dev/hda2 ?
 
Old 02-12-2004, 04:15 AM   #3
codeape
Member
 
Registered: Feb 2004
Distribution: Debian
Posts: 62

Original Poster
Rep: Reputation: 15
Nope, I've left it as I found it. Thought I'd ask around first.

I take it I have to mount it first??
 
Old 02-12-2004, 07:33 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,154

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
swap is not mounted to a mountpoint per se and when mounted its usage is not reported via the command df

/dev/hda2 /tmp swap sw 0 0

should be

/dev/hda2 swap swap defaults 0 0

Once its formated you need to start swap
swapon /dev/hda2

Check the free command, you should see total swap space > 0

The next time you reboot the swap space will be automatically enabled.
 
Old 02-12-2004, 04:11 PM   #5
codeape
Member
 
Registered: Feb 2004
Distribution: Debian
Posts: 62

Original Poster
Rep: Reputation: 15
Thanks for the help, I think I'll leave it as it is. top says swap is being used, which is good enough for me, for now.

Thanks
 
  


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
New installation needs Swap and I can't partition it alxr Suse/Novell 2 11-12-2005 06:19 PM
add swap partition after installation? xfezz Linux - Newbie 4 04-20-2005 07:19 PM
Setting up swap partition for new installation tempyyyst Linux - Newbie 5 09-28-2003 11:22 AM
swap partition not being mounted jclark00001 Linux - Newbie 28 02-15-2003 04:07 AM
installation - partition / swap problem catch Linux - Software 3 03-10-2002 05:51 PM


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