Ubuntu Restricted Extras Off-line Installer

Contents

  1. Modify installer behaviour using a Preseed file
    1. Writing the preseed file
  2. Modify pool structure to include more packages
  3. Preparing the bootable medium
    1. Putting an isohybrid image onto USB stick

The process of customizing or 'remastering' Ubuntu installation CDs is not especially complex, but it is a little tedious and finicky.

May 08, 2018  How To Install Ubuntu Restricted Extras in Ubuntu 18.04 Bionic By Niawati Niawati is a channel that contains a video Tutorial on Linux, Ubuntu, Linux Mint and Other Website: www.curhatman.net www.

The Ubuntu installation CD (since Ubuntu 6.06, the 'alternative install' or 'server' CD) has three main parts: a boot-loader (Isolinux on AMD64/x86 systems, yaboot on PowerPC) and its configuration (which starts everything up); debian-installer (also known as d-i, which in this case is really a specialized miniature Ubuntu system); and a Debian-style repository structure, which is what takes up disk space in the directories 'pool' and 'dists'. Building a new CD may involve modifications to all three parts.

This page shows a simple recipe for customizing the CD. It assumes that you copy the contents of the installation CD to /opt/cd-image/ on your local system and create a couple of other dirs in /opt/. Modify as needed.

You might speed up the development cycle by using a virtual Ubuntu session, for example, using VirtualBox. You can then use the .ISO file to test rather than burning a CD. If you do, please note that you need to perform ALL operations described here on the GUEST system. Note that with VirtualBox, during an installation (Host key)-F4 will display the installation output and (Host key)-F1 will return you to the general status screen. Note that the host key is set to the right Ctrl key by default.

This guide is for the 'Alternative Install' or 'Server Install' CDs. There is a page referring to customization of the Desktop (Live) CD, and another guide on how to create a Live CD without using an existing CD at all.

Although the 'Server Install' images are supposed to fit on usual CD media, you may as well use DVD or BD (Blu-ray) media. In the following text, read 'CD' as 'CD, DVD, or BD'.

At least since release 12.04, the images also work from USB stick or other hard-disk-like storage devices. USB stick on amd64 UEFI works since 14.04.

Below is a list of original images which you can use :

Type

Ubuntu 16.04 LTS

Ubuntu 18.04 LTS

Ubuntu 19.10

Alternate

n/a

n/a

n/a

Server

i386 amd64

As time goes by, some will vanish or be replaced. But releases.ubuntu.com will hopefully continue to show a list of available release directories with some *server*.iso images in them.

Copy the entire installation CD to a directory on your hard drive. This guide will assume your CD image is in /opt/cd-image/, but you can put it wherever you like. It will take around 1GB of hard drive space.

If you have an ISO file, you can mount it and copy files out of it without burning it to CD:

Use 'Gmount-iso' program for a GUI method of mounting iso files. You can also try 'ISO Master' to access the iso file directly without mounting.

You can use rsync to copy the CD:

or just

Note: the -p option for mkdir creates the leadin directories if they don't already exist. In this example, /opt is created if it doesn't already exist.

Be sure to catch the folder .disk - if you try and copy /cdrom/*, it will ignore the .disk folder, as Bash expands the * to mean 'everything it can see'.

If you use a filemanager program like Nautilus, be sure to launch it with 'gksu nautilus' and mark 'Show Hidden Files' from 'View' menu or you miss some important files. After the copy is done, change file ownership from 'root' if you don't plan to do the rest of the work with sudo.

When the CD boots up, a Linux kernel is started and the installation tasks are initiated. The installer's default behavior can be modified through the use of a 'preseed' file, which feeds d-i answers to questions normally asked by debconf, or in other contexts. If you look in the preseed folder in the install CD, you'll see that certain options (e.g. 'server', 'expert', 'oem') already have preseed files assigned to them. The installation guide has a detailed appendix on preseeding.

Suppose you are installing Ubuntu on a bunch of identical computers, and you already know the answers to certain questions (what country and time zone you're in, what keyboard you have, how the network should be configured, how you want to partition the hard disk, etc). You can 'preseed' the answers to these questions in a very simple configuration file. There're several ways to setup the boot-loader configuration.

Changing isolinux.cfg to identify your preseed

We will create a preseed file called 'firewall.seed', which will live in the /preseed folder of the CD-ROM. We tell d-i where to find this file by modifying the boot-loader configuration file, located in isolinux/isolinux.cfg (or in 8.10 or later, isolinux/text.cfg), to pass appropriate parameters on the kernel command line. In /opt/cd-image/isolinux/isolinux.cfg, add a new section labeled like this:

If you want to set the default selected menu item to your custom seed, change the DEFAULT line to read 'DEFAULT firewall'.

For totally automatic installation with a predefined language (in this example, Estonian), you need to add some more parameters:

To make the installer autochoose the default option and start installing after a timeout, add this line to isolinux/isolinux.cfg (in all versions).

Timeout values are in tenths of a second, therefore a timeout value of 10 is equal to one second.

You must specify a locale and keyboard on the command line, as these questions are asked before the seed is loaded. You can also set DEBCONF_PRIORITY here to ensure you don't see any unnecessary debconf questions.

(On Ubuntu 6.06 and older, use kbd-chooser/method=us rather than console-setup/layoutcode=us.)

Indesign software for mac free download version. It is a very lightweight application that can work in collaboration with Adobe InCopy CC for creating digital content.The application provides powerful printing features for layout designing.

Changing grub.cfg to identify your preseed

We will create a preseed file called 'custom.seed', which will live in the /preseed folder of the CD-ROM. We tell d-i where to find this file by modifying the boot-loader configuration file, located in boot/grub/grub.cfg, to pass appropriate parameters on the kernel command line. In /opt/cd-image/boot/grub/grub.cfg, add a new section labeled like this:

Writing the preseed file

A preseed file has 4 fields per line:

  1. identity of the program which will pick up this command
  2. name of the variable whose value will be passed
  3. variable type
  4. value of variable

It looks something like this (from the default ubuntu-server.seed on the 16.04 CD):

d-i expects there to be exactly one tab or space between variable type and variable value (any other space is seen as being part of the value)

The easiest way to create a preseed file is to start with an example and modify it:

  1. The Ubuntu installation guide (16.04) has examples of many common preseed directives. (Bear in mind that you may need to modify some to work on older versions.)

  2. You could check out Debian's wiki page on preseeding the installer - 6.06 and higher are aligned with Etch and newer versions of the Debian installer, although there are some important differences that apply to preseeding.

  3. If you can't find the option you're looking for you can generate a comprehensive preseed file based on your own install time choices by using debconf-get-selections

debconf-get-selections usage:

This will output a list of all debconf options you've chosen throughout your install; you can pick options out of this and put them into your preseed file.

debconf-get-selections prints 2 spaces between variable type and variable value. You need to change this to one space before putting the line in a preseed file.

Installing extra packages in your preseed file

base-config has been removed from debian-installer since Ubuntu 6.06.

All serial numbers are genuine and you can find more results in our database for Nero software. Games java winning eleven 2014 free Nero 2018 Platinum Crack with License Key offers ultra experience, that enables easy and advanced video editing, innovative video file conversion technology Nero 8 free download free download – Nero Burning ROM, Nero 2017 Platinum, Nero CoverDesigner, and many more programs Download Now ( 100 Working Link )Guitar Pro 2018 is the best music composing software that is well know how to compose music from the guitar. Nero 8 essential, Nero 7 Lite 0.0c, Nero 6.0, Nero 9 lite 3.2.

In Ubuntu 6.06 and older:

In Ubuntu 8.04 and newer: (packages may be separated with commas and/or spaces and continued to another line with a back-slash):

The installer can not install packages which rely on services that would normally be running in an installed system, but which are not running in the environment of the Debian installer. One example of this would be packages which create or modify a database at installation time, and require a postgresql or mysql server to be running. In this case, you will need to use a postinst script, start the necessary database server in the /target chroot, and then call 'apt-install' (if outside the chroot environment) or apt-get (inside the chroot).

Installing language support

A different mechanism is used to install additional languages. Preseed the detailed locale question asked by the installer in expert mode. See the first column of /usr/share/i18n/SUPPORTED for the locale names you can use here. For example, to add support for Bengali and Tamil, use this line:

Running a Final Script

You can run a script in the final part of the installation. The following example runs a script that has been copied onto the installation CD in the setup/install folder. This script runs in the target environment, thus can run scripts in any language (e.g. Python or Perl) that has been installed on the target system.

The above command may not work on 8.10 or later; to copy the script to the target and then execute it, try this:

Generally, a script run from the seed file via late_command, cannot interact with the user. If you need to interact, there are generally three options:

  • Create a custom UDEB that interacts with debconf, and include it with the CD.
  • Create a 'firstrun' script that executes the first time the system boots, and disables itself on completion.
  • Access debconf directly within your script.

A preseed script run via late_command that attempts to run 'chroot /target apt-get ..' (or similar) may run into problems (e.g. file descriptor 3 not found in the postinst stage of some packages, dash being one example). This is caused by your script inheriting environment variables from the already running installer. To solve this, clear the environment variables in your script before calling apt-get:

Probably the prime motivation to build your own install CDs is to modify which packages are installed; in particular you may want to add some packages to the CD.

The easiest way to do this is to build an 'extras' repository structure, containing only your extra .debs, and merge these into the CD file hierarchy before rebuilding the .ISO image. This guide will step you through how to do this.

This requires you to generate the Packages files that defines what files are in your repository; the Release file that indexes your Packages files, and the signed Release.gpg file, approving the repository as being official.

Create an 'Extras' component

The following example references Ubuntu 16.04 ('xenial'). Substitute your version where appropriate.

Create directories for your new component (substituting your version where appropriate):

Put all the extra .debs you want on your CD into pool/extras.

On the scripts page there is a useful script that will strip out all of the packages from your CD image that are not currently installed. You will need to run apt-ftparchive (below) to generate the Packages file.

Generating a new ubuntu-keyring .deb to sign your CD

In order to sign the Release file, we need to use GPG. The install system will then check the signature against the public keys held in the package ubuntu-keyring. You do not have a private key that matches one of the ones in the shipped ubuntu-keyring, so we need to build a custom version of the ubuntu-keyring package. Install the gnupg package if you do not have it already.

To create a signing key, enter gpg --gen-key. Accept the defaults, (for this use, it is probably OK to use 'No expiry'). For your Real Name and E-mail address, you might like to use something like 'XXX Signing Key' and 'packages@xxx.example.org'. Enter an appropriate passphrase.

In another directory (I use /opt/build/), we will download the source for the ubuntu-keyring package, unpack it, add our own GPG key, and rebuild the package. These steps import the 2 Ubuntu public signing keys into your main keyring, then exports them, along with your own public signing key, into a replacement keyring. 'YOURKEYID' should be replaced with the 8-digit hexadecimal code that gpg tells you when you do the --list-keys command. 'Signing Key Name' is what you used in the previous step, when running gpg --gen-key.

To clarify, below is an example 'gpg --list-keys' response. In this example, 'YOURKEYID' immediately follows the '/' on the line beginning with 'pub' (which in this example is '437D05B5'.)

If you change the package's version number (e.g. using dch), then make sure that the version number you choose does not contain a '-' character: if it does, then you'll be converting the package away from the 'native' format and you will have to do some extra steps. It's simpler to use a version number such as '2012.05.19+custom1', putting your preferred local part after the '+' character.

Here is an example, which you will need to customize to suit your own setup:

The following example references Ubuntu 16.04 ('xenial'). Substitute your version where appropriate.

You will end up with a udeb file for the installer, and a .deb file for the system. Both files need to be copied into the main component of your CD, because the CD will not check the extras directory.

Generate a new filesystem.squashfs with the updated ubuntu-archive-keyring.gpg

To prevent the possible issue during installation, we need to regenerate filesystem.squashfs by updating the ubuntu-archive-keyring.gpg we just exported. There are three paths to being replaced:

  • $chroot/usr/share/keyrings/ubuntu-archive-keyring.gpg
  • $chroot/etc/apt/trusted.gpg
  • $chroot/var/lib/apt/keyrings/ubuntu-archive-keyring.gpg

Furthermore, filesystem.size also needs to be updated:

Building the repository with apt-ftparchive

apt-ftparchive builds the Packages and Packages.gz files, needed by the installer. In order to use apt-ftparchive we will need to provide it with some configuration and some index files.

If you will be adding .deb files to pool/universe (eg. customizing xubuntu) you will also need to wget extra.universe and universe files.

We will put the index files in /opt/indices:

Create the files apt-ftparchive-deb.conf, apt-ftparchive-udeb.conf, apt-ftparchive-extras.conf, and release.conf in a directory (/opt/apt-ftparchive), substituting /opt/cd-image/ for the path to your CD image directory, and /opt/indices/ for the location of the index files, if they differ.

The .conf files shown here are sufficient if you are ONLY making changes to .deb files under pool/main and pool/restricted. If you are adding security updates to a Xubuntu customized CD, though, you will be updating .deb files under pool/universe also, so you will need to add lines to apt-ftparchive-deb.conf for universe, similar to the lines shown for main. You will also need to run extraoverride.pl for universe as well as for main - see below.

/opt/apt-ftparchive/apt-ftparchive-deb.conf:

The ExtraOverride component above is needed to add the Task: line to main packages, referenced from the preseed file with ~t<task name>. This is not supplied - but can be extracted from the existing main Packages file with the simple perl script below.

If customizing Xubuntu, and adding new .deb files to pool/universe, run this script for the universe repository also.

The ExtraOverride process can be optional to skip it.

/opt/apt-ftparchive/apt-ftparchive-udeb.conf:

/opt/apt-ftparchive/apt-ftparchive-extras.conf:

You need to build the Packages file in dists/xenial/extras/binary-amd64/Packages using dpkg-scanpackages. See here for an explanation.

The following example of creating Packages references Ubuntu 16.04 ('xenial'). Substitute your version where appropriate. Use apt-ftparchive to finish above step.

/opt/apt-ftparchive/release.conf

This is the configuration file for apt-ftparchive. Change to suit your distribution version:

To build the repository, sign it, and update the MD5SUM file, you can use a script like this:

'YOURKEYID' is the key id you put in your own compiled keyring package before.

At this point, you have a directory which is ready to be collected into an .ISO file and then burnt to a CD or copied to a USB stick.

Building the ISO image

x86 and AMD64

x86 and AMD64 with isohybrid

The original i386 and amd64 ISOs have a Master Boot Record (MBR) which makes them bootable from USB stick via legacy BIOS firmware.

AMD64 with isohybrid and UEFI

Additionally to the MBR for legacy BIOS, the amd64 ISOs since 14.04 can boot from CD and from USB stick via the modern UEFI firmware. Its entry point is marked for USB stick by the MBR partition entry 2, which points to the data content of file /boot/grub/efi.img. Together with UEFI bootability from CD this is achieved by the additional options from -eltorito-alt-boot to -isohybrid-gpt-basdat.

Power PC

Download the HFS map, then use the following command:

ia64

  • $IMAGE is just the location of your iso image.

Burning the image to CD, DVD, or Blu-ray

The first optical drive of a contemporary GNU/Linux system has address /dev/sr0. If in doubt, run the following command to learn about the existing drives and their /dev file adresses.

If your drive or media are old, then you might burn a lot of coasters in experimenting with this process. Re-usable media can ease the pain: CD-RW, DVD-RW, DVD+RW, DVD-RAM, BD-RE.

Putting an isohybrid image onto USB stick

If the x86 and AMD image was made by xorriso with isohybrid options, or if the x86 and AMD image was postprocessed by SYSLINUX program isohybrid, then it will boot from USB stick or hard disk, too.

Such an image is not to be unpacked and installed to the USB stick by a program like 'Rufus' or 'UNetbootin', but rather to be written plainly to the base device file of the USB stick. This implies that the partition table of the stick will be overwritten and thus all data on the stick will become unaccessible, if not overwritten.

Verify device address or make a backup

The main problem on a GNU/Linux system is that you need superuser power to overwrite the whole USB stick, and that this power suffices to also spoil the content of your hard disk.

So first verify that the device file address really leads to the intended device (e.g. by reading a few megabytes and watching it blink). If the USB stick is supposed to be Linux device '/dev/sdh':

or by making a backup of its complete content in a compressed disk file:

(Your /dev/sd address will probably end by a lower letter than 'h'. But this paragraph is all about not to spoil /dev/sda and other hard disks by mistake.)

Write to USB stick

Once you are convinced that this is the right device file address, copy the ISO image onto the USB stick by:

Eventually restore backup

To later restore the original content of the USB stick, take the same care to really use the correct address and then:

Of course, the Ubuntu ISO image will be overwritten by this restore run.

You can now boot off your CD or USB stick. Select the new menu item you created. If you've used preseeding to stop the CD asking questions, the installation could be totally automatic.

  • If your CD fails to read, try re-burning it, possibly at a slower speed.
  • If you get a red d-i screen, check the error message (use Alt-F2, Alt-F3 etc to cycle through the terminals to read the log), and fix your CD appropriately. The log file is /var/log/syslog , check the last lines.
  • Check out some install CD customization scripts that can be used to automate this process.

Hi, I'm new in the forum and have just installed Linux Mint after one year using Ubuntu.
One of the features of LM that attracted me most was that, being compatible with Ubuntu's packages and repositories, LM however comes with some propietary technologies (like Flash Player and some codecs) out of the box, whereas in Ubuntu you have to install them. But when in Ubuntu you install a package called ubuntu-restricted-extras, you have not only that, but also some things that LM doesn't, like the Microsoft propietary fonts (like Times New Roman) and maybe other things that I don't exactly now.
So I have some questions:
-Which things does an Ubuntu with ubuntu-restricted-extras have, that LM doesn't out of the box?
-Which packages do I have to install in LM to have the same things that would have in Ubuntu with that package?
-Can I install the ubuntu-restricted-extras package in LM?
Thanks.