Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Swap working




Hi Antony,

After making the swap partition using fdisk, use the following command to
make the swap file system
	mkswap /dev/hda4
then update ur /etc/fstab file so that the command swapon -a command can
pickup the name at the boot time and do the swapping in that partition.

Archan 
icq 61737056

ps. by the way I am from India and I am very new to this list. Weeks back,
I visited Tokyo LinuxWorld Conf on invitation from Laser5 and got
interested in Linux activity in Japan

On Wed, 22 Nov 2000, Antony Stace wrote:

>  Hi Folks
> 
> I noticed that I do not have any swap space being used by the kernal
> when Linux is running.  When I list my partitions with fdisk there is a
> swap area listed,  I added an entry to the /etc/fstab to try and make
> the kernal recognise this but to no avail.  At the end of this email is
> the output from fdisk, free and the contents of my /etc/fstab. Can
> someone please tell me what I need to do so I can use this space as swap
> memory.
> 
> Cheers
> 
> Antony
> 
> [root@example.com /root]# fdisk /dev/hda
> 
> The number of cylinders for this disk is set to 1222.
> There is nothing wrong with that, but this is larger than 1024,
> and could in certain setups cause problems with:
> 1) software that runs at boot time (e.g., LILO)
> 2) booting and partitioning software from other OSs
>    (e.g., DOS FDISK, OS/2 FDISK)
> 
> Command (m for help): p
> 
> Disk /dev/hda: 255 heads, 63 sectors, 1222 cylinders
> Units = cylinders of 16065 * 512 bytes
> 
>    Device Boot    Start       End    Blocks   Id  System
> /dev/hda1             1        26    208813+  a0  IBM Thinkpad
> hibernation
> /dev/hda2            27       536   4096575    b  Win95 FAT32
> /dev/hda3   *       537       543     56227+  83  Linux
> /dev/hda4           544      1222   5454067+   5  Extended
> /dev/hda5           544      1200   5277321   83  Linux
> /dev/hda6          1201      1222    176683+  82  Linux swap
> 
> Command (m for help): q
> 
> [root@example.com /root]# cat /etc/fstab 
> /dev/hda5               /                       ext2    defaults       
> 1 1
> /dev/hda3               /boot                   ext2    defaults       
> 1 1
> /dev/hda2               /mnt/win                vfat    defaults       
> 1 1
> /dev/cdrom              /mnt/cdrom              iso9660 noauto,owner,ro
> 0 0
> /dev/hda6               swap                    swap    defaults       
> 0 0
> /dev/fd0                /mnt/floppy             ext2    noauto,owner   
> 0 0
> none                    /proc                   proc    defaults       
> 0 0
> none                    /dev/pts                devpts  gid=5,mode=620 
> 0 0
> [root@example.com /root]# free
>              total       used       free     shared    buffers    
> cached
> Mem:        127976     120532       7444      84048       5192     
> 62044
> -/+ buffers/cache:      53296      74680
> Swap:            0          0          0
> [root@example.com /root]#
> 
> -----------------------------------------------------------------------
> Next Nomikai (and Bonenkai!): December 15 (Fri)
> Next Technical Meeting: January, 2001
> -----------------------------------------------------------------------
> more info: http://www.tlug.gr.jp           Sponsor: Global Online Japan
> 

-- 
--------------------------------------
Archan Paul (enlightened by GNU/Linux)
www.bigfoot.com/~archanp
icq - 61737056
--------------------------------------



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links