How to install gnu linux

How to install gnu linux

This section explains how to install Debian GNU/Linux from an existing Unix or Linux system, without using the menu-driven installer as explained in the rest of the manual. This “ cross-install ” HOWTO has been requested by users switching to Debian GNU/Linux from Red Hat, Mandriva, and SUSE. In this section some familiarity with entering *nix commands and navigating the file system is assumed. In this section, $ symbolizes a command to be entered in the user’s current system, while # refers to a command entered in the Debian chroot.

Once you’ve got the new Debian system configured to your preference, you can migrate your existing user data (if any) to it, and keep on rolling. This is therefore a “ zero downtime ” Debian GNU/Linux install. It’s also a clever way for dealing with hardware that otherwise doesn’t play friendly with various boot or installation media.

As this is a mostly manual procedure, you should bear in mind that you will need to do a lot of basic configuration of the system yourself, which will also require more knowledge of Debian and of Linux in general than performing a regular installation. You cannot expect this procedure to result in a system that is identical to a system from a regular installation. You should also keep in mind that this procedure only gives the basic steps to set up a system. Additional installation and/or configuration steps may be needed.

D.3.1.В Getting Started

With your current *nix partitioning tools, repartition the hard drive as needed, creating at least one filesystem plus swap. You need around 613MB of space available for a console only install, or about 2133MB if you plan to install X (more if you intend to install desktop environments like GNOME or KDE Plasma).

Next, create file systems on the partitions. For example, to create an ext3 file system on partition /dev/sda6 (that’s our example root partition):

To create an ext2 file system instead, omit -j .

Initialize and activate swap (substitute the partition number for your intended Debian swap partition):

Mount one partition as /mnt/debinst (the installation point, to be the root ( / ) filesystem on your new system). The mount point name is strictly arbitrary, it is referenced later below.

If you want to have parts of the filesystem (e.g. /usr) mounted on separate partitions, you will need to create and mount these directories manually before proceding with the next stage.

D.3.2.В Install debootstrap

The utility used by the Debian installer, and recognized as the official way to install a Debian base system, is debootstrap . It uses wget and ar , but otherwise depends only on /bin/sh and basic Unix/Linux tools [27] . Install wget and ar if they aren’t already on your current system, then download and install debootstrap .

Or, you can use the following procedure to install it manually. Make a work folder for extracting the .deb into:

The debootstrap binary is located in the Debian archive (be sure to select the proper file for your architecture). Download the debootstrap .deb from the pool, copy the package to the work folder, and extract the files from it. You will need to have root privileges to install the files.

D.3.3.В Run debootstrap

debootstrap can download the needed files directly from the archive when you run it. You can substitute any Debian archive mirror for http.us.debian.org/debian in the command example below, preferably a mirror close to you network-wise. Mirrors are listed at http://www.debian.org/mirror/list.

If you have a stretch Debian GNU/Linux CD mounted at /cdrom , you could substitute a file URL instead of the http URL: file:/cdrom/debian/

Substitute one of the following for ARCH in the debootstrap command: amd64 , arm64 , armel , armhf , i386 , mips , mips64el , mipsel , powerpc , ppc64el , or s390x .

If the target architecture is different than the host, you should add the —foreign option.

Читайте также:  Загрузочная флешка windows 10 как запустить asus

D.3.4.В Configure The Base System

Now you’ve got a real Debian system, though rather lean, on disk. chroot into it:

If the target architecture is different from the host, you will need to first copy qemu-user-static to the new host:

After chrooting you may need to set the terminal definition to be compatible with the Debian base system, for example:

Depending on the value of TERM, you may have to install the ncurses-term package to get support for it.

If the target architecture is different from the host, you need to finish the multi-stage boot strap:

D.3.4.1.В Create device files

At this point /dev/ only contains very basic device files. For the next steps of the installation additional device files may be needed. There are different ways to go about this and which method you should use depends on the host system you are using for the installation, on whether you intend to use a modular kernel or not, and on whether you intend to use dynamic (e.g. using udev ) or static device files for the new system.

A few of the available options are:

install the makedev package, and create a default set of static device files using (after chrooting)

manually create only specific device files using MAKEDEV

bind mount /dev from your host system on top of /dev in the target system; note that the postinst scripts of some packages may try to create device files, so this option should only be used with care

Источник

InstallingGR

Contents

From Binaries [ edit ]

The recommended way to install GNU Radio on most platforms is using already available binary packages (see Ubuntu PPA Installation). For some platforms there are no binaries provided by available package managers or the GNU Radio project. In these cases please contact the maintainer of the package manager or the GNU Radio project to find a sensible way to provide binaries for your platform.

In addition to using binaries, GNU Radio can be installed:

  1. From source (for those who want full control)
  2. Using PyBOMBS (for those who want it built from source and/or installed to a specific directory using a script)
  3. Using conda (for those who want binaries installed to managed environments)

Linux [ edit ]

Most distributions contain a package named gnuradio or similar in their standard repositories. For most use cases it is enough to install this package and start developing.

The development of GNU Radio can be fast-paced, and binaries provided by your distribution may be outdated. Do check if the version you’re installing is up to date! Sometimes old versions are not updated in the packaging systems. If you find a bug in a older GNU Radio version, please check if the bug still exists in the newer version of GNU Radio before filing a new issue.

If the version shipped in your distribution is outdated please contact the corresponding maintainer to update it in the packaging system.

Here are examples of how to install GNU Radio in various Linux distributions. Click the link under «Distribution» for how to install dependencies.

Distribution Command
Debian/Ubuntu and derivates
Fedora
RHEL/CentOS
Archlinux
Gentoo Linux
Suse Linux

On other distributions, simply use the appropriate package management command to install the gnuradio package and then please add it to this list. If you need newer versions or have a different platform please contact the package maintainer of your distribution or raise your issue on the mailing list.

Ubuntu PPA Installation [ edit ]

For Ubuntu, the latest builds (both released and pulled from master branch) are maintained as PPAs on launchpad. Be sure to uninstall any previously installed versions of gnuradio first.

To access the latest from the master branch, add the gnuradio/gnuradio-master ppa (removing other gnuradio ppas if already configured)

To access the current released version (3.9), add the gnuradio/gnuradio-releases ppa (removing other gnuradio ppas if already configured)

To access the 3.8 released version, add the gnuradio/gnuradio-releases-3.8 ppa (removing other gnuradio ppas if already configured)

To access the 3.7 released version (legacy), add the gnuradio/gnuradio-releases-3.7 ppa (removing other gnuradio ppas if already configured)

Then, update the apt sources, and install gnuradio

Attention: Do NOT try to install further packages like `gr-osmosdr` via Ubuntu’s package management (i.e. using «apt»). Ubuntu will try to install a potentially incompatible version and your system will be in an undefined state.

Читайте также:  Настройка производительности windows 10 приложение

Modtool on Ubuntu [ edit ]

NOTE: On released builds for Ubuntu 18 (bionic), there is an issue using gr_modtool after GNU Radio has been installed from the PPA. This is due to byte-compiled code that remains in the modtool templates after installation. To workaround this issue:

This issue does not appear for Ubuntu 19 and later packages

Fedora COPR Installation [ edit ]

Packages are available for Fedora 29,30,31 hosted under COPR:

1. Add the repository:

— For the latest released version:

— For the latest pull from git master:

2. Install GNU Radio

Raspberry Pi [ edit ]

There is a pre-built 32 bit SDR flavored Raspberry Pi OS distro, PiSDR that includes GnuRadio and other SDR utilities. There are also instructions for InstallingGRFromSource_on_Raspberry_Pi.

Windows [ edit ]

Binary installers are now available for GNU Radio 3.7 and 3.8, download them here.
Conda packages are an alternative for installing binaries for GNU Radio 3.8+. See the conda install guide or radioconda.
If you need to install GNU Radio from source refer to the Windows install guide.

Note: We do not officially support Windows. We do our best to provide installation instructions and work out build bugs on Windows when they are reported and patches received. As new versions of GNU Radio, its dependencies, and Windows itself come out, however, keeping all of them working together is beyond the scope of what the project currently supports. User updates to the above wiki installation instructions are very welcome.

Mac OS X [ edit ]

From Source [ edit ]

Binary installation should be sufficient for most users, and certainly for anyone who is new to GNU Radio. However, if you have special requirements, want the latest version, or the binary packages are not working for you, you may want to install GNU Radio from source.

Notes [ edit ]

  • By default GNU Radio will be installed in the /usr/local directory. See notes about -DCMAKE_INSTALL_PREFIX to install it elsewhere.
  • Running and developing out-of-tree modules does not require GNU Radio to be installed from source.
  • If you want to use GNU Radio with a USRP, you FIRST must clone and install UHD. See the UHD Installation Page for more info, OR follow the instructions in Install UHD from source.
  • To install on a Raspberry Pi, see InstallingGRFromSource on Raspberry Pi.
  • To build from source from within a conda environment, see the conda install guide.

For GNU Radio 3.9 and Master Branch [ edit ]

This section describes how to install GNU Radio 3.9 and the Master branch from source code.

Installing Dependencies [ edit ]

Refer to this page for your specific Linux distro to find how to install dependencies. For example, on Ubuntu 20.04 use this command.

Installing Volk [ edit ]

Since Volk is no longer considered as a submodule of GNU Radio (GNU Radio commit #80c04479da962d048d41165081b026aafdaa0316 ),
you MUST FIRST install Volk, and then install GNU Radio.

The basic idea is the same, but instead of building Volk along with GNU Radio, you need to clone and build it separately. For this example, we will start in the home directory. You can, of course, use any directory you wish and the results will be the same.

Note: In the following command, you can add -DCMAKE_INSTALL_PREFIX=XXX to install Volk into the PREFIX XXX ; if not specified, then the PREFIX is /usr/local . See other CMake options in Common cmake flags.

  • cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../
  • make
  • make test
  • sudo make install

If you’re running Linux, then always remember to do the following command after installing any library:

Installing GNU Radio [ edit ]

Note: If you want to build the maint-3.9 branch rather than the default master branch, enter: git checkout maint-3.9 and then

Note: In the following command, you can add -DCMAKE_INSTALL_PREFIX=XXX to install GNU Radio into the PREFIX XXX ; if not specified, then the PREFIX is /usr/local . See other CMake options in Common cmake flags.

  • cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../
  • make -j3 (e.g. if you want to use 3 CPU cores during the build. To use 8 do -j8, to use 1, leave out the -j flag.)

Note: In the following command, it is very possible that not all tests pass. Generally any error is a sign of a missing dependency such as the Python interface to ZMQ or NumPy or SciPy, none of which are required for building GNU Radio but are required for testing.

Читайте также:  Обновление операционных систем семейства windows

If you’re running Linux, then always remember to do the following command after installing any library:

If you encounter «Cannot import gnuradio» error, then go to Finding the Python library to set your PYTHONPATH and LD_LIBRARY_PATH.
After setting these environment variables, you need to do sudo ldconfig again for the Linux dynamic library loader to find the just-installed GNU Radio libraries.
If you have installed in a custom path with -DCMAKE_INSTALL_PREFIX=XXX , you will need to add that path to $PATH in order to find gnuradio-companion.

For GNU Radio 3.8 or Earlier [ edit ]

For this example, we will start in the home directory; you can, of course, use any directory you wish and the results will be the same.

Note: In the following command, change maint-3.8 to some other branch or tag if you want to build a different version of GNU Radio; see tags for tagged releases including pre-releases («rc»). For branches, it’s generally wise to stick with «master» (the default after cloning), and, currently: maint-3.7 or maint-3.8 . Here we checkout the maint-3.8 branch, which contains the latest 3.8 release plus any fixes or augmentations to it that will be in the next 3.8 release.

  • git checkout maint-3.8
  • git submodule update —init —recursive
  • mkdir build
  • cd build

Note: In the following command, you can add -DCMAKE_INSTALL_PREFIX=XXX to install GNU Radio into the PREFIX XXX ; if not specified, then the PREFIX is /usr/local . See other CMake options in Common cmake flags.

  • cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../
  • make -j3 (e.g. if you want to use 3 CPU cores during the build. To use 8 do -j8, to use 1 leave out the -j flag.)
  • sudo make install

If you’re running Linux, then always remember to do the following command after installing any library:

Go to Finding the Python library to set your PYTHONPATH and LD_LIBRARY_PATH.
After setting these environment variables, you need to do sudo ldconfig again for the Linux dynamic library loader to find the just-installed GNU Radio libraries.
If you have installed in a custom path with -DCMAKE_INSTALL_PREFIX=XXX , you will need to add that path to $PATH in order to find gnuradio-companion.

For Ubuntu 18.04 [ edit ]

An easy way to install GNU Radio 3.8 on many Ubuntu systems is to use the following commands (note that this skips the setup for UHD hardware):

  • sudo apt install git cmake g++ libboost-all-dev libgmp-dev swig python3-numpy python3-mako python3-sphinx python3-lxml doxygen libfftw3-dev libsdl1.2-dev libgsl-dev libqwt-qt5-dev libqt5opengl5-dev python3-pyqt5 liblog4cpp5-dev libzmq3-dev python3-yaml python3-click python3-click-plugins python3-zmq python3-scipy python3-pip python3-gi-cairo
  • pip3 install git+https://github.com/pyqtgraph/pyqtgraph@develop
  • pip3 install numpy scipy
  • echo ‘export PYTHONPATH=/usr/local/lib/python3/dist-packages:usr/local/lib/python2.7/site-packages:$PYTHONPATH’ >>

/.bashrc
echo ‘export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH’ >>

/.bashrc
echo ‘export PYTHONPATH=/usr/local/lib/python3/dist-packages:usr/local/lib/python2.7/site-packages:$PYTHONPATH’ >>

/.profile
echo ‘export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH’ >>

/

  • git clone —recursive https://github.com/gnuradio/gnuradio
  • cd gnuradio
  • git checkout maint-3.8
  • mkdir build
  • cd build
  • git pull —recurse-submodules=on
  • git submodule update —init
  • cmake -DENABLE_GR_UHD=OFF ..
  • make -j $(nproc —all)
  • sudo make install
  • sudo ldconfig
  • Once this is done, reboot your computer and GNU Radio should be all set for you.

    Common cmake flags [ edit ]

    • -DENABLE_GR_XXX=ON This enables (or disables for =OFF) the GNU Radio component named XXX. You might not need all of them, and this way, you can compile quicker.
    • -DCMAKE_INSTALL_PREFIX=XXX Install your stuff to XXX.
    • -DCMAKE_BUILD_TYPE=Debug This causes gcc to add debug symbols to all binaries. Useful for debugging (otherwise, it decreases efficiency!)
    • -DPYTHON_EXECUTABLE=/usr/bin/python <2,3>This selects the Python version and executable to be used during build time and will determine which Python libraries will be used for building the Python bindings.

    For a list of additional cmake flags, as well as minimum versions of dependencies, see [1]

    Using PyBOMBS [ edit ]

    PyBOMBS is good at building GNU Radio, UHD, and various Out of Tree (OOT) modules from source and then installing into a specified user directory rather than in the system files. PyBOMBS detects the user’s Operating System and loads all of the prerequisites in the first stage of the build.

    The PyBOMBS documentation is in the PyBOMBS README.

    OK, it’s installed, what now? [ edit ]

    If the installation worked without any trouble, you’re ready to use GNU Radio! If you have no idea how to do that, the best place to start is with the Tutorials.

    Optionally, you may run volk_profile on your terminal to help libvolk to determine the optimal kernels (may speed up GNU Radio).

    Источник

    Оцените статью