# Swap file generation (was: Re: Removing the old version and Installing gnuradio 3.7 on USRP E 110)

**URL:** <https://www.ruby-forum.com/t/swap-file-generation-was-re-removing-the-old-version-and-installing-gnuradio-3-7-on-usrp-e-110/229948>\
**Category:** GNU Radio\
**Created:** [May 23, 2014, 2:57pm UTC](https://www.ruby-forum.com/t/swap-file-generation-was-re-removing-the-old-version-and-installing-gnuradio-3-7-on-usrp-e-110/229948 "2014-05-23T14:57:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7993a0/32.png) [@jason\_sam](https://www.ruby-forum.com/u/jason_sam)\
**Post date:** [May 23, 2014, 2:57pm UTC](https://www.ruby-forum.com/t/swap-file-generation-was-re-removing-the-old-version-and-installing-gnuradio-3-7-on-usrp-e-110/229948/1 "2014-05-23T14:57:29Z")

</div>

Hi Wafa,

On 23.05.2014 13:55, Wafa E. wrote:

> The parameter:  
> {-L label | LABEL=label} LABEL of device to be used  
> {-U uuid | UUID=uuid} UUID of device to be used  
> name of device to be used  
> name of file to be used  
> Ah, so that’s another version of swapon. Since the purpose was to  
> display current swap usage, -s would have been the option of choice.  
> However, if it works now, you don’t have to run it anymore. Clearly,  
> this command didn’t do anything, but printed its usage options. You  
> should carefully read  
> and understand what programs do!

> root@usrp-e1xx:~# mkswap /swapfile1  
> Setting up swapspace version 1, size = 524284 KiB  
> no label, UUID=76dccdc9-cb8a-40c6-9e0a-ed58eaa900f8  
> This seems to succeed, meaning that mkswap was able to access that file.  
> Whatever was holding the swapfile open has since released it, it seems.  
> root@usrp-e1xx:~# chown root:root /swapfile1  
> root@usrp-e1xx:~# chmod 0600 /swapfile1  
> This changes the file’s ownership and sets its access mode; if this is  
> the same file we talked about before, you ran this twice on; this does  
> no harm, but is unnecessary.  
> _root@usrp-e1xx:~# swapon /swapfile1_  
> _Adding 524284k swap on /swapfile1. Priority:-1 extents:246  
> across:1568156k SS_
> 
> Now it works.  
> Great!  
> shall I follow to do the different instructions mentioned on this website  
> [http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/](http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/) ie making swap  
> file on the root  
> I don’t understand. What different instructions are you talking about?  
> These instructions work, as you found out yourself.  
> However, you followed these instructions /word by word/ and created a  
> small swapfile on /.  
> I asked you to create a swapfile on an external drive, being much bigger  
> than what you’ve created.

> or shall I connect usrp to an external memory ? If yes shall I connect a  
> flash disc to the usrp on its usb host port ?  
> As I said, yes, use external memory. You will need some space on the  
> root partition for the actual build, and you’re congesting it with a  
> swap file.

Please create a larger swapfile on an external drive (larger file means  
you have to adjust the parameters you give to “dd”, on the external  
drive means you have to store it on the mount point of that drive, not  
on / ).

Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![Marcus\_MS\_ller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5daacb/32.png) [@Marcus\_MS\_ller](https://www.ruby-forum.com/u/Marcus_MS_ller)\
**Post date:** [May 23, 2014, 4:45pm UTC](https://www.ruby-forum.com/t/swap-file-generation-was-re-removing-the-old-version-and-installing-gnuradio-3-7-on-usrp-e-110/229948/2 "2014-05-23T16:45:12Z")

</div>

dd if=/dev/zero of=/swapfile bs=1M count=4000  
mkswap /swapfile  
swapon /swapfile

# free -g

```
          total used free shared buffers cached

```

Mem: 0 0 0 0 0 0  
-/+ buffers/cache: 0 0  
Swap: 3 0 3

If you get an error, the kernel was not built with swap enabled.

# grep SWAP .config

CONFIG\_SWAP=y  
or

# grep SWAP /boot/config-`uname -r`

To make it permanent edit /etc/fstab and add a line  
/swapfile none swap sw 0 0  
Regards  
Sid.

---

<div class="post-metadata">

**Author:** ![Marcus\_MS\_ller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5daacb/32.png) [@Marcus\_MS\_ller](https://www.ruby-forum.com/u/Marcus_MS_ller)\
**Post date:** [May 26, 2014, 4:25pm UTC](https://www.ruby-forum.com/t/swap-file-generation-was-re-removing-the-old-version-and-installing-gnuradio-3-7-on-usrp-e-110/229948/3 "2014-05-26T16:25:30Z")

</div>

Hi,

I did a swap memory on a pen drive(its capacity is 16 Go).I did these  
instructions for swap:  
I connected the pen drive to a usb hub which is connected to usb host  
port .

_\>sudo fdisk -l_

_\>sudo umount /dev/mtdblock4_

_\>sudo mkswap /dev/mtdblock4_

_\>sudo swapon -p 32767 /dev/mtdblock4_

_\>cat /proc/swaps_

```
        Type Size Used Priority

         /dev/mtdblock4 partition 517628 0 32767

```

And when I tried to update gnuradio, I got this error on 85 %.  
_Scanning dependencies of target \_trellis\_swig_  
_[85%] Building CXX object  
gr-trellis/swig/CMakeFiles/\_trellis\_swig.dir/trellis\_swigPYTHON\_wrap.cxx.o_  
_end\_request: I/O error, dev mtdblock4, sector 189960_  
_Read-error on swap-device (31:4:189968)_  
_end\_request: I/O error, dev mtdblock4, sector 189960_  
_Read-error on swap-device (31:4:189968)_  
_/home/root/gnuradio.git/build/gr-trellis/swig/trellis\_swigPYTHON\_wrap.cxx:  
In function 'PyObject_  
\_wrap\_viterbi\_combined\_fs\_sptr\_symbol\_name(PyObject\*, PyObject\*)':\*  
_/home/root/gnuradio.git/build/gr-trellis/swig/trellis\_swigPYTHON\_wrap.cxx:186072:1:  
internal compiler error: Bus error_  
_Please submit a full bug report,_  
_with preprocessed source if appropriate._  
_See \<[GCC Bugs - GNU Project](http://gcc.gnu.org/bugs.html) [http://gcc.gnu.org/bugs.html](http://gcc.gnu.org/bugs.html)\> for  
instructions._  
_make[2]: \*\*\*  
[gr-trellis/swig/CMakeFiles/\_trellis\_swig.dir/trellis\_swigPYTHON\_wrap.cxx.o]  
Error 1_  
_make[1]: \*\*\* [gr-trellis/swig/CMakeFiles/\_trellis\_swig.dir/all] Error  
2_  
_make: \*\*\* [all] Error 2_

How can I fix it in order to update gnuradio on usrp e110 ?

Best regards,

Wafa HAJ HMIDA

2014-05-23 14:56 GMT+02:00 Marcus Müller [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![Marcus\_MS\_ller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5daacb/32.png) [@Marcus\_MS\_ller](https://www.ruby-forum.com/u/Marcus_MS_ller)\
**Post date:** [May 27, 2014, 2:43pm UTC](https://www.ruby-forum.com/t/swap-file-generation-was-re-removing-the-old-version-and-installing-gnuradio-3-7-on-usrp-e-110/229948/4 "2014-05-27T14:43:09Z")

</div>

Hi,

I’m really sorry for posting to you another time.

In fact, I still don’t find a solution to my problem mentioned on the  
previous e-mail.  
I really need your help to update gnuradio on usrp e110.

Best regards,

Wafa HAJ HMIDA

2014-05-26 16:23 GMT+02:00 Wafa E. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
