Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-15-2005, 12:49 AM   #1
Registered: Feb 2005
Location: Mexico
Distribution: Gentoo - kernel 4.1.5
Posts: 186

Rep: Reputation: 30
Question how do i access my swap partition?, slackware 10.0

I remember i formatted with cfdisk and i created a primary partition with has the boot and everything, about 2.6 gigs. and the rest 1.4 gigs are missing!

i have hd1 as root
and hd5 as swap.

but, i have not the least clue of how to access all that free space.

do i run cfdisk and let hd1 become 1 with hd5, or what the heck?

im really lost, and that amount of disk space is very needed, i only got a 4 gig drive.

please help.
Old 02-15-2005, 01:20 AM   #2
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
if I understand u correct ur primary partition includes the filesystem ~ 2.6GB
ur swap-partition (extended) is 1.4GB ??

..if u use a swap-partition u canīt access/"use" it from ur system!...itīs for swapping
Old 02-15-2005, 01:35 AM   #3
Registered: Feb 2005
Location: Mexico
Distribution: Gentoo - kernel 4.1.5
Posts: 186

Original Poster
Rep: Reputation: 30
errrrrrrrrrrrr. i feel kinda dumb. i really didn't know what a swap was for. it just sounded kinda "linux" in my newbie state of mind

what should i do? i want my 1.4 gigs
Old 02-15-2005, 01:56 AM   #4
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
remove the swap-partition. if u have enough ram there should be no prob.
otherwise ur sys-performance slows down and ur hdd access increases
Old 02-15-2005, 01:58 AM   #5
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,953

Rep: Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084
Such a small disk implies a small system - how much memory do you have ?.
I'm sure you could reduce the swap size and use the excess space as you wish.

Linux will run without a swap. Don't take this as an invitation to do so.
But you can for a short while to resize the swap partition from a rescue disk.

Pretty easy to do, but as I've never used Slack, others more knowledgable will have to explain how in your case.
Old 02-15-2005, 07:50 AM   #6
LQ Newbie
Registered: Nov 2003
Posts: 5

Rep: Reputation: 0
The easiest way to fix your swap problem is to become root and use you favorite editor to comment out the swap line in your /etc/fstab file with a # mark this will ensure when you reboot that swap dose'nt mount.

#/dev/hda5 none swap sw

After you reboot use cfdisk to delete the old swap partition. You will probably want to create a new but smaller swap partition. Usually a good rule of thumb is to keep swap space double the amount of ram you have. 128mb ram = 256mb swap space. Use whatever space is left over to create your new partition don't worry about mounting the partitions yet. Save changes and exit cfdisk. It is a good idea to reboot after creating new partitions.

After you reboot issue the command cat /etc/fstab output example below.

# /etc/fstab: static file system information.
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdb /media/cdrom0 udf,iso9660 ro,user,noauto 0 0

And issue the command fdisk -l make sure you are root.

Device Boot Start End Blocks Id System
/dev/hda1 * 1 115287 58104616+ 83 Linux
/dev/hda2 115288 116280 500472 f W95 Ext'd (LBA)
/dev/hda5 115288 116280 500440+ 82 Linux swap

The reason you need the output from the command is to compare the two. Any entries that are not in /etc/fstab that show up after fdisk -l command will need to be added to etc fstab. Your swap space will be easy just uncomment your swap line and insert the new /dev/name that applies.

The next decision will be to decide where you want to mount your freed up partition it will be the only device name not present in /etc/fstab. Create a new folder wherever you want you want to mount your new partition.

Example mkdir /storage

Then add a line to /etc/fstab to match.

/dev/? /storage ext3 defaults 0 0

After this is complete you must format the partitions

Swap partition
mkswap /dev/?

Storage partition
mke2fs -j /dev/?

Activate partitions.
mount /storage

Or just reboot and partitons will activate automatically.


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
Create swap partition AFTER installing slackware? dx0r515t Slackware 4 05-21-2005 11:29 PM
swap partition simple Linux - Newbie 6 05-07-2005 06:07 PM
Swap partition Mojojo Linux - Hardware 10 01-20-2005 05:12 PM
Swap Partition Terra Niux Slackware 2 12-29-2004 04:48 AM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 08:45 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:28 PM.

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