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

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!

[email protected]:~# 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.
[email protected]:~# chown root:root /swapfile1
[email protected]:~# 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.
[email protected]:~# swapon /swapfile1
Adding 524284k swap on /swapfile1. Priority:-1 extents:246
across:1568156k SS

Now it works.
shall I follow to do the different instructions mentioned on this website
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 / ).


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


grep SWAP /boot/config-uname -r

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


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

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)
In function 'PyObject

_wrap_viterbi_combined_fs_sptr_symbol_name(PyObject*, PyObject*)’:*
internal compiler error: Bus error

Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html http://gcc.gnu.org/bugs.html> for

make[2]: ***
Error 1

make[1]: *** [gr-trellis/swig/CMakeFiles/_trellis_swig.dir/all] Error

make: *** [all] Error 2

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

Best regards,


2014-05-23 14:56 GMT+02:00 Marcus Müller [email protected]:


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,


2014-05-26 16:23 GMT+02:00 Wafa E. [email protected]:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs