Loading ...
Sorry, an error occurred while loading the content.

Re: [nslu2-linux] Re: Is swap partition recreated at every boot time?

Expand Messages
  • Robert Hammond
    In message , Robert Hammond writes ... Many apologies for replying to my own posts again but have now
    Message 1 of 33 , Jun 30, 2006
    • 0 Attachment
      In message <8uZRIhG5tYpEFwHU@...>, Robert Hammond
      <rob.hammond@...> writes
      >In message <q+1UMeFIEYpEFwl7@...>, Robert Hammond
      ><rob.hammond@...> writes
      >>In message <7AkwTGEPDWpEFwkG@...>, Robert Hammond
      >><rob.hammond@...> writes
      >><snip>
      >>>
      >>>I found an article on the web that has reasonably good instructions on
      >>>how to add swap space by creating a swap file. I am going to try this
      >>>later this weekend. It involves using the dd command to create a blank
      >>>file then using mkswap and swapon. With Unslung 5.5 and 6.8 there is
      >>>plenty of spare partition space on the Conf partition so is a good place
      >>>for a swap file. If it works then I will post up on the Wiki a small
      >>>diversion script for this.
      >>
      >>My initial attempt using the conf partition seemed to fail, perhaps
      >>there is not enough room on this partition.
      >>
      >>But I have created a swap file on the data partition using the following
      >>commands (be careful of any email word wrap)
      >>
      >>dd if=/dev/zero of=/share/hdd/data/swapfile bs=1024 count=131072
      >>mkswap -c /share/hdd/data/swapfile
      >>swapon /share/hdd/data/swapfile
      >>
      >>Notes
      >>The extra swap shows up using the free command.
      >>I am running unslung 5.5 but I think that this should work with 6.8
      >>I have not fully tested the new swap but intend to by running something
      >>that is memory intensive later this weekend, perhaps a PHP script with
      >>image magic on a pic file.
      >>May need to chmod the file 0755 ??.
      >>Not too sure of the page file size used by the NSLU2 so assumed it to be
      >>1024, unless any one knows differently.
      >>
      >After gathering more data from the web, advice seems to be to not
      >create the swap in the root folder. Also I think there is no need to
      >chmod the created file.
      >
      >So a better instruction is to :-
      >
      >Login as root
      >dd if=/dev/zero of=/mnt/linux.swp bs=1024 count=128k
      >mkswap -c /mnt/linux.swp
      >swapon /mnt/linux.swp
      >
      >
      >To allow the swap file to be mounted at boot time, create using a unix
      >style text editor an unslung script called rc.local in the /unslung
      >folder :-
      >
      >#! /bin/sh
      ># Mount the Swap file
      >swapon /mnt/linux.swp
      >return 1
      >
      Many apologies for replying to my own posts again but have now found a
      Wiki web page for this. I will add some improvements to the page later
      this weekend.
      <http://www.nslu2-linux.org/wiki/HowTo/AddAdditionalSwapSpace>
      --
      Robert Hammond
      PGP:0x154144DA
    • Robert Hammond
      In message , Robert Hammond writes ... Many apologies for replying to my own posts again but have now
      Message 33 of 33 , Jun 30, 2006
      • 0 Attachment
        In message <8uZRIhG5tYpEFwHU@...>, Robert Hammond
        <rob.hammond@...> writes
        >In message <q+1UMeFIEYpEFwl7@...>, Robert Hammond
        ><rob.hammond@...> writes
        >>In message <7AkwTGEPDWpEFwkG@...>, Robert Hammond
        >><rob.hammond@...> writes
        >><snip>
        >>>
        >>>I found an article on the web that has reasonably good instructions on
        >>>how to add swap space by creating a swap file. I am going to try this
        >>>later this weekend. It involves using the dd command to create a blank
        >>>file then using mkswap and swapon. With Unslung 5.5 and 6.8 there is
        >>>plenty of spare partition space on the Conf partition so is a good place
        >>>for a swap file. If it works then I will post up on the Wiki a small
        >>>diversion script for this.
        >>
        >>My initial attempt using the conf partition seemed to fail, perhaps
        >>there is not enough room on this partition.
        >>
        >>But I have created a swap file on the data partition using the following
        >>commands (be careful of any email word wrap)
        >>
        >>dd if=/dev/zero of=/share/hdd/data/swapfile bs=1024 count=131072
        >>mkswap -c /share/hdd/data/swapfile
        >>swapon /share/hdd/data/swapfile
        >>
        >>Notes
        >>The extra swap shows up using the free command.
        >>I am running unslung 5.5 but I think that this should work with 6.8
        >>I have not fully tested the new swap but intend to by running something
        >>that is memory intensive later this weekend, perhaps a PHP script with
        >>image magic on a pic file.
        >>May need to chmod the file 0755 ??.
        >>Not too sure of the page file size used by the NSLU2 so assumed it to be
        >>1024, unless any one knows differently.
        >>
        >After gathering more data from the web, advice seems to be to not
        >create the swap in the root folder. Also I think there is no need to
        >chmod the created file.
        >
        >So a better instruction is to :-
        >
        >Login as root
        >dd if=/dev/zero of=/mnt/linux.swp bs=1024 count=128k
        >mkswap -c /mnt/linux.swp
        >swapon /mnt/linux.swp
        >
        >
        >To allow the swap file to be mounted at boot time, create using a unix
        >style text editor an unslung script called rc.local in the /unslung
        >folder :-
        >
        >#! /bin/sh
        ># Mount the Swap file
        >swapon /mnt/linux.swp
        >return 1
        >
        Many apologies for replying to my own posts again but have now found a
        Wiki web page for this. I will add some improvements to the page later
        this weekend.
        <http://www.nslu2-linux.org/wiki/HowTo/AddAdditionalSwapSpace>
        --
        Robert Hammond
        PGP:0x154144DA
      Your message has been successfully submitted and would be delivered to recipients shortly.