How to create a Multiboot USB to carry various Linux distros

To be able to create an automatic installation file on a Linux device or some of its variants. We will need some knowledge , because it is different from other operating systems. Next, we will explain how to develop an installable file with .deb format.

How to Create Multiboot on Various Linux Distros

Index( )

  1. What is Multiboot?
  2. Executable files with DEB packages in derivatives of Linux, Ubuntu – Debian – Mint

What is Multiboot?

Multibooting (English: Multi boot, Multi booting) is the ability of a computer to be able to have more than one operating system running on the same hard drive or computer and boot with any of them.

When booting the computer with dual boot, the system will ask the user which of the installed systems he wants to use, and after this stage it will start loading “only” that system this time. The ability to choose the system to boot is granted by the Boot Manager or Boot loader.

Dual booting can also help software developers in situations that require using multiple operating systems for development and testing.

Having one of these boot systems on a machine can help reduce hardware costs considerably. Note that the reduction in hardware costs is offset by the increase in the cost of system administration , as well as by the unavailability of software that does not run at all times, as the operating system that does not correspond to it is running.

Another solution to this problem is the use of virtual machine applications to emulate another computer from the operating system chosen as the base.

Executable files with DEB packages in derivatives of Linux, Ubuntu – Debian – Mint

If we want to distribute an application on Linux that is based on Debian, we will have to package it in .deb format . Which is the type of format that is attributed to Debian packages. Now, the only thing we should know before starting our project is that .deb packages do not install external resources.

So, if we want or need to install an external database, it would be much better to use another server. Such as the MySQL forms service , which with its SQLITE feature allows external databases to be installed in the system.

Let’s start then, in the Linux operating system, the “sh” executable files are installed by default in the folder: “ /usr/bin ”. But, this can be modified at the developer’s decision.

In the same way, the executables also install their libraries in the folder: “ / usr/lib”. And the icon to be able to integrate the application menu in the folder: “ /usr/share/instalation-folder ”.

Resulting in a code syntax like this:

/usr/bin/application.sh -Executable script sh or run- /usr/lib/application/application.jar -java run jar- /usr/lib/application/libraries_application.jar -miscellaneous libraries-
usr /share /doc/application/icon.gif -java application icon-

Next, we are going to open a file explorer and in the same way, we will create a new application folder . In addition, we have to take into account that said folder has to be easy to assign from our terminal. This with the intention of starting to create our installation application structure.

We will create inside our application folder, another with the name: DEBIAN. And within it, we will create a new text file without any extension. We will name this file: “ control ”. Because said file will have the descriptions and specifications that will be shown to the user.

An example of the content of such a file could be as follows:

  • Package: Application
  • Version: 12.0
  • Section: Documentation
  • Priority: optional
  • Architecture: all
  • Maintainer: Pedro-Gonzales-JR < aplicaciones@pedro.gonzales.jr.com >
  • Installed-Size: 171
  • Description: Whatever the description we want to place on the package.

(In case you need more lines to explain the package description, make sure that the beginning of each is represented by a space , because otherwise, the application will detect it as another field).

The next step that we will carry out consists of copying all the files that the application in which we are working has compiled. Or in the case that it is a java application, we will have to copy the .jar file. And then we will place them in the folder: application/usr/lib/application

And then we’ll create a new item in the folder called: application/usr/bin. A text file that we will put as a name: “ application.sh ”. With the bash script that we will show below and that will be in charge of indicating the address of the executable file:

            #!/bin/bash

            ( A blank space is left here )

            java -jar /usr/lib/application/application.jar

We continue by giving our application execution permissions with the command: chmod +x application.sh and in the same way, we will assign an icon to the application, placing it inside the folder: application/usr/share/hello-world .

To continue with the creation of our executable file, we will create a file with the specifics of the installation. This will have to be inside the folder: application/usr/share/applications . We will call it “application” and we will place inside it:

[Desktop Entry]

Encoding=UTF-8

Name=Application

Comment=(Comments about our application)

Exec=/usr/bin/application

Icon=/usr/share/application.png

terminal=false

Type=Application

Categories=Education;Documentation;Other

StartupNotify=true

And now, the final product of our creation can be viewed by us in the terminal. And our .deb file has been turned into a complete and fully functional installer. Being able to share it with other people or Linux users who wish to obtain our product.

 


Categories:

Tags:


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *