<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: changing the swap partition size in linux in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/changing-the-swap-partition-size-in-linux/m-p/3957128#M27313</link>
    <description>Hi Laalitha,&lt;BR /&gt;Please find the necessary below:&lt;BR /&gt;Use fdisk to create the swap partition( command t will ask for swap-id, give 82 for linux swap )and then do &lt;BR /&gt;mkswap /dev/hda*&lt;BR /&gt;swapon /dev/hda*&lt;BR /&gt;&lt;BR /&gt;The above answer is correct only if there left some free space (i don't think it is!). If your harddisk is fully partitioned you need to find some way to resize(or simply delete) some partition. More easier way is to create swap file:&lt;BR /&gt;dd if=/dev/zero of=/swapfile bs=1K count=&lt;DESIRED size="" in="" kb=""&gt;&lt;BR /&gt;mkswap /swapfile&lt;BR /&gt;swapon /swapfile&lt;BR /&gt;if you don't wish to tell "swapon /swapfile" every time you boot modify your /etc/fstab file and add record similar to created by your setup program (in case of automatic partitioning it usually exists)&lt;BR /&gt;&lt;BR /&gt;Also,I tried creating a swapfile on my machine. I had a swap partition on /dev/hda2. I deleted this partition and added the swapfile entry inside /etc/fstab. I rebooted the machine and I saw this error message on the terminal.&lt;BR /&gt;Enabling swap partitions: could not create swap partition /swapfile [ERROR]&lt;BR /&gt;In the shell prompt I gave &lt;BR /&gt;mkswap /swapfile&lt;BR /&gt;swapon /swapfile&lt;BR /&gt;and then rebooted again. Then I got &lt;BR /&gt;Enabling swap paritions: [OK]&lt;BR /&gt;This worked fine for me.&lt;BR /&gt;So, I can use my /dev/hda2 partition for other purposes. This will be helpful if there is not enough space to create a swap partition on the disk &lt;BR /&gt;&lt;BR /&gt;Try the above(using the best options) and let me know!!&lt;/DESIRED&gt;</description>
    <pubDate>Wed, 07 Mar 2007 04:33:56 GMT</pubDate>
    <dc:creator>Sandeepk_1</dc:creator>
    <dc:date>2007-03-07T04:33:56Z</dc:date>
    <item>
      <title>changing the swap partition size in linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-swap-partition-size-in-linux/m-p/3957126#M27311</link>
      <description>I installed new memory (RAM) to a machine had  RH LINUX OS.In red hat Linux how to change (increase ) the swap partition size or Add a NEW swap partion.What are the commands and steps ?</description>
      <pubDate>Wed, 07 Mar 2007 03:08:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-swap-partition-size-in-linux/m-p/3957126#M27311</guid>
      <dc:creator>laaalitha</dc:creator>
      <dc:date>2007-03-07T03:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: changing the swap partition size in linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-swap-partition-size-in-linux/m-p/3957127#M27312</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Make a new partition of Swap type by using fdisk command, and then add an entry into /etc/fstab .&lt;BR /&gt;&lt;BR /&gt;You may get more info from following link:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1091537" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1091537&lt;/A&gt;</description>
      <pubDate>Wed, 07 Mar 2007 03:45:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-swap-partition-size-in-linux/m-p/3957127#M27312</guid>
      <dc:creator>kcpant</dc:creator>
      <dc:date>2007-03-07T03:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: changing the swap partition size in linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-swap-partition-size-in-linux/m-p/3957128#M27313</link>
      <description>Hi Laalitha,&lt;BR /&gt;Please find the necessary below:&lt;BR /&gt;Use fdisk to create the swap partition( command t will ask for swap-id, give 82 for linux swap )and then do &lt;BR /&gt;mkswap /dev/hda*&lt;BR /&gt;swapon /dev/hda*&lt;BR /&gt;&lt;BR /&gt;The above answer is correct only if there left some free space (i don't think it is!). If your harddisk is fully partitioned you need to find some way to resize(or simply delete) some partition. More easier way is to create swap file:&lt;BR /&gt;dd if=/dev/zero of=/swapfile bs=1K count=&lt;DESIRED size="" in="" kb=""&gt;&lt;BR /&gt;mkswap /swapfile&lt;BR /&gt;swapon /swapfile&lt;BR /&gt;if you don't wish to tell "swapon /swapfile" every time you boot modify your /etc/fstab file and add record similar to created by your setup program (in case of automatic partitioning it usually exists)&lt;BR /&gt;&lt;BR /&gt;Also,I tried creating a swapfile on my machine. I had a swap partition on /dev/hda2. I deleted this partition and added the swapfile entry inside /etc/fstab. I rebooted the machine and I saw this error message on the terminal.&lt;BR /&gt;Enabling swap partitions: could not create swap partition /swapfile [ERROR]&lt;BR /&gt;In the shell prompt I gave &lt;BR /&gt;mkswap /swapfile&lt;BR /&gt;swapon /swapfile&lt;BR /&gt;and then rebooted again. Then I got &lt;BR /&gt;Enabling swap paritions: [OK]&lt;BR /&gt;This worked fine for me.&lt;BR /&gt;So, I can use my /dev/hda2 partition for other purposes. This will be helpful if there is not enough space to create a swap partition on the disk &lt;BR /&gt;&lt;BR /&gt;Try the above(using the best options) and let me know!!&lt;/DESIRED&gt;</description>
      <pubDate>Wed, 07 Mar 2007 04:33:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-swap-partition-size-in-linux/m-p/3957128#M27313</guid>
      <dc:creator>Sandeepk_1</dc:creator>
      <dc:date>2007-03-07T04:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: changing the swap partition size in linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-swap-partition-size-in-linux/m-p/3957129#M27314</link>
      <description>If you aren't going to run more applications on your machine, you don't need to add swap at all.&lt;BR /&gt;For example: yesterday you had 1GB RAM + 1GB swap = 2GB virtual memory.&lt;BR /&gt;today you have 2GB RAM + 1GB swap = 3GB virtual memory.</description>
      <pubDate>Thu, 08 Mar 2007 02:43:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-swap-partition-size-in-linux/m-p/3957129#M27314</guid>
      <dc:creator>Vitaly Karasik_1</dc:creator>
      <dc:date>2007-03-08T02:43:53Z</dc:date>
    </item>
  </channel>
</rss>

