PDA

View Full Version : The Agony and the Estasy



koØm
09-01-2016, 12:57 PM
It was "The Thrill of Victory" and then, it was the "Agony of Defeat"

http://aaronscher.com/wireless_com_SDR/MacOSX_install_gnu_radio.html

http://forums.radioreference.com/software-defined-radio/335126-how-quickly-create-op25-usb-boot-drive-persistent-storage.html

Run OP25 on Windows 7 (http://forums.radioreference.com/software-defined-radio/301459-virtualbox-project-run-op25-windows-7-a-34.html#post2613217)

I created a Ubuntu on a bootable USB drive with OP25 receiver build upon PyBombs and Python; after all that work, I found out that my Dell Duo Core Laptop didn't have enough horsepower to run the program.

So, I went out and purchased another 32 gigabyte Flash Drive and set it up to boot to Ubuntu GNU Radio Live SDR Environment for my MacBook Pro. After a lengthy process, the receiver was built and functioning.


https://youtu.be/PA3JkM8zlBw

And then, the script stopped running, when i tried to restart it, it told me that the folder or the command that that it was in didn't exist, best I can figure is that the PATH got blown away but, I don't know how or where to start to fix it (I know just enough to follow directions and make logical changes but not enough to 'write' code).

So, I have one Ubuntu USB stick waiting for a quad core machine to run it on and a Ubuntu USB for OS-X that is not able to load the ./scope.py command. Would you (any combination or order):

Take a time period off from the project (anywhere from a cup of coffee to a couple of days)
Attempt to repair the broken path installation
Re-format the USB drive and, start from the beginning making it bootable, add the Linux, then adding the op25.
Start all over with a new Flash Drive
Say, "Fock this shyte" and go catch up on Pre-season Football and the TV shows piling up on the DVR.


"It was the best of times and, it was the worse of times....."

.

K7SGJ
09-02-2016, 10:29 AM
For the Pope and the Rat, the fact we don't experience ecstasy anymore, IS our agony.

koØm
09-02-2016, 12:49 PM
How to quickly create an OP25 USB boot drive (with persistent storage)
Hi,

Here is a brief summery of the process that I used to create a USB boot drive, based on the excellent GNU Radio live environment, to run op25 (scope.py, etc...). The whole process should take less than 15 minutes, resulting in a bootable GNU Radio environment that is pretested, integrated, and has 25 additional GNU Radio-based applications and block libraries pre-installed.

This summary assumes the following:

- the GNU Radio v3.7.9.2 live image is used

- you have a cursory familiarity with the Ubuntu operating system that the GNU Radio live image is based on, including the ability to edit files and setup networking

- you know how to boot from a USB drive with your current computer system

Follow these steps:

1. Format a USB drive to FAT32. Insure that the maximum size of the stick is 32GB (or the first bootable partition on a larger USB drive is 32GB or smaller).

2. Download the GNU Radio ISO image from:

GNU Radio live DVD (http://gnuradio.org/redmine/projects/gnuradio/wiki/GNURadioLiveDVD)

3. On Windows, download the unetbootin utility from:

UNetbootin (https://unetbootin.github.io/)

(If you are running Linux, you should be able to do something like 'sudo apt-get install unetbootin').

4. Use unetbootin to create the bootable USB stick:

* Click on 'Diskimage', insure that the dropdown menu is set to 'ISO', and select the GNU Radio ISO file downloaded previously.

* Set a value for 'Space used to preserve files across reboots' (I use 2000 to enable 2GB of persistent storage).

* Insure 'Type' is set to 'USB Drive', and 'Drive' points to your USB drive.

* Click 'OK'

5. When finished, eject and then re-insert the USB drive (do not boot from it yet).

6. Two boot files need to be edited to add 'persistence' (this enables saving any changes to the GNU Radio environment across boots). The GNU Radio live system boots with syslinux.cfg when doing a 'legacy boot', and with grub.cfg when booted via the newer EFI system approach.

Edit file /boot/grub/grub.cfg on the USB drive (if running Windows, don't use Notepad, use Notepad++ [excellent and free] or another editor that preserves the original unix file format). I remove other entries from the boot menu as well, so my grub.cfg file ends up looking like this:

Code:
if loadfont /boot/grub/font.pf2 ; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

menuentry "Boot Ubuntu (persistent)" {
set gfxpayload=keep
linux /casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash -- persistent
initrd /casper/initrd.lz
}
Now edit file /syslinux.cfg on the USB drive. Mine looks like this:

Code:
default menu.c32
prompt 0
menu title GNU Radio Live SDR Environment
timeout 100

label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash -- persistent

label ubnentry1
menu label ^Boot Ubuntu (persistent)
kernel /casper/vmlinuz.efi
append initrd=/casper/initrd.lz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash -- persistent
7. Now boot the USB drive. Setup networking, and set the correct timezone, date, and time (click on the 'gear' icon on the top, right side of the screen to access 'System Settings').

8. On occasion, you may wish to use Ubuntu's 'apt-get' utility to update and/or install new apps. This is completely optional, but if you wish to do so, open a shell terminal and enter the following commands to eliminate potential errors when using apt-get:

* sudo apt-get remove cryptsetup
* sudo dpkg --configure -a

Now execute:

* sudo apt-get update

You can now use apt-get to install and/or upgrade standard packages if you wish.

9. Next, from a shell terminal, change to directory '/usr/local/src/pybombs_legacy' and do the following:

* Edit file 'config.dat' to change line:

gotoptions = --reference=/root/live/gitcache

to

gotoptions =

* Now you can execute 'sudo ./pybombs install gr-op25' to intsall op25.

* Assuming the prior command executed without error, execute 'sudo ldconfig'


**** General Notes ****

- If you choose to use Ubuntu's 'apt-get' utility, insure that you never update the OS kernel (for example, by executing 'sudo apt-get dist-upgrade')... the USB drive will no longer boot if you do!

- After installing, the working directory for op25 (where scope.py resides) is:

/usr/local/src/pybombs_legacy/src/gr-op25/op25/gr-op25_repeater/apps

- For assistance with setting up op25, watch this video:

OP25 Video (https://www.youtube.com/watch?v=DxQeCzksDi4)

and read these:

Welcome to OP25 (http://op25.osmocom.org/trac/wiki)
Signal Scope (http://op25.osmocom.org/trac/report/wiki/SignalScopePage)



I went through this enough for my Windows based machine, I decided to make a bootable USB Radio installation for my Mac Book Pro. After the "successful" installation I ran the program and, it took off and flew, I changes some command line functions to tune it to my trunk frequency and it gave me an error (no big deal, just change value in trunk.tsv file). I closed out sudo nano, saved the edits and, when I went back to run the command line, "the command did not exist" - did an "ls" , the whole folder was gone.

I'm thinking to myself, "Wow, you really screwed that up, how did you do it"? I tried to repair the install but it was late in the evening so, I left it alone - for two days; I reformatted the drive and set it up for OS-X; when I tried to run the program, it was too messed around to work and, I did not feel like de-bugging it so, I started with a brand new 32 GB USB Drive - (I went through the whole procedure for the third time for the MacBook Pro laptop.

ETA: I reserved 9999 MB for "Persistence"

New Thumb-drive, new installation, fresh set of eyes and, I imputed the commands and, it works (as expected), I carefully edited my command line and .TSV files and, it works UNTIL, I power down the laptop and restart in Ubuntu again; I enter my command line and, I get a message that the command didn't exist, BULLSHIT!

The directory did not exist, in spite of editing the files as directed, these installs had no "PERSISTENCE". The installation and the folders/directories connected with them didn't exist. Documents that I saved in the documents folder were gone. I checked the first USB drive and found the same thing, there was not Persistence, the information was lost when booted up; regardless, saved or installed made no difference.

This only happens with the USB drives setup to boot on OS-X systems, Windows installations have "Persistence" and the information survives over a reboot.