Loading...
 

Edit Section: Ubuntu 18.04 LTS for Human Beans


x
 
!!!# Example for a OMDbuntu Live USB disk
Choose Lubuntu 18.04 64 bit as a base (it doesn't seem to work as expected for Lubuntu 16.04 since it doesn't seem to be able to find internet repos to get packages from).
Desktop environment: Other
Lang: ca
Please choose customization action
1) Run console application
2) Continue building
Your choice (1..2)> 1
Extra system packages:
{CODE(colors="shell" ln="1" caption="Extra system packages installed in a terminal window inside UCK")}
add-apt-repository -y ppa:webupd8team/java
add-apt-repository -y ppa:marutter/rrutter
apt install -y gfxboot-theme-ubuntu squashfs-tools syslinux-utils libnss-winbind winbind cifs-utils oracle-java8-installer nfs-common git git-cola mc htop parcellite kupfer p7zip-full printer-driver-cups-pdf meld sendemail gigolo
apt install -y  r-recommended  r-cran-xml libgraphviz-dev libcairo2-dev r-cran-cairodevice freeglut3 freeglut3-dev r-cran-rglpk r-cran-rgl r-cran-misc3d libx11-dev libxt-dev libcurl4-gnutls-dev libxml2-dev r-cran-xml libgraphviz-dev libcairo2-dev bwidget tk-table libv8-dev r-cran-rjava libmpfr-dev libc6 libssl-dev texlive-latex-extra texlive-lang-spanish libx11-dev libxml2-dev libxt-dev r-cran-misc3d subversion git texmaker tk-dev unaccent xvfb libgdal-dev libproj-dev libmagick++-dev r-cran-rcolorbrewer r-cran-doparallel libssh2-1-dev libudunits2-dev libgdal-dev libgeos-dev libproj-dev libjq-dev libprotobuf-dev protobuf-compiler libssl-dev libcairo2-dev libapparmor-dev g++
# apt install -y  r-cran-mysql # no troba el paquet  slax a debian9
R CMD javareconf
wget https://download1.rstudio.org/rstudio-xenial-1.1.463-amd64.deb
apt install -y ./rstudio-xenial-1.1.463-amd64.deb
{CODE}
Extra R packages
{CODE(colors="shell" ln="1" caption="Extra R packages installed in a terminal window inside UCK")}
if (!require(devtools)) install.packages("devtools"); library(devtools)
# Check Availability of package manager "PacMan" (and install it, if missing)
# if you have R < 3.5
if (version$major==3 && version$minor < 5) {
  # Instal.la devtools si et cal
  if (!require("devtools")) install.packages("devtools"); require("devtools")
  cat("R Version: ", paste0(version$major,".",version$minor), ". ")
  cat("Tens una versió de R anterior a 3.5, per tant, instal.lem la versió corresponent de PacMan (0.4.1)\n")
  # Instal.la la darrera versió de pacman (0.4.1) que anava abans de la que va només amb R 3.5+ (pacman v0.5)
  if (!require("pacman")) install_version("pacman", version = "0.4.1"); require("pacman")
} else {
# if you have R 3.5 or higher
  if (!require("pacman")) install.packages("pacman"); require("pacman")
}
p_load("devtools", "plotly", "Nozzle.R1", "VennDiagram", "stringr", "xml2", "parallel", "data.table", "doParallel", "xtable", "plyr", "dplyr", "reshape2", "rjson", "d3heatmap", "htmlwidgets", "googleVis", "doMC", "knitr", "checkpoint", "sem", "rmarkdown", "relimp", "aplpack",  "addinslist", "tidyverse", "magick", "webshot", "pacman", "officer", "flextable", "huxtable", "RODBC", "leaflet", "gitlabr", "colorspace", "mapdeck", "rsvg", "png", "cartography", "magick", "rJava", "rio")
{CODE}
Before exiting the "-+Run console application+-", you need to update (or replace) the customization script in order to make it work with latest Ubuntu versions (16.04+; derived from [https://askubuntu.com/a/699474|here])
Create a file called customize_iso2 in your home directory for instance:
{CODE()}
nano /home/xavi/customize_iso2
{CODE}
Add these contents inside:
{CODE(ln="1" colors="shell" caption="Contents of customize_iso2")}
#!/bin/bash
###################################################################################
# UCK - Ubuntu Customization Kit                                                  #
# Copyright (C) 2006-2010 UCK Team                                                #
#                                                                                 #
# UCK is free software: you can redistribute it and/or modify                     #
# it under the terms of the GNU General Public License as published by            #
# the Free Software Foundation, either version 3 of the License, or               #
# (at your option) any later version.                                             #
#                                                                                 #
# UCK is distributed in the hope that it will be useful,                          #
# but WITHOUT ANY WARRANTY; without even the implied warranty of                  #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                   #
# GNU General Public License for more details.                                    #
#                                                                                 #
# You should have received a copy of the GNU General Public License               #
# along with UCK.  If not, see <http://www.gnu.org/licenses/>.                    #
###################################################################################
# NAME:
#    customize_iso -- customize iso image outside of root FS
#
# SYNOPSIS:
#    customize_iso [remaster_home] [customization_scripts_dir]
#
# DESCRIPTION:
#    This procedure performs additional customization that needs to
#    happen outside of the image of the root file system:
#        - Configuration of the boot environment
#            - isolinux configuration
#            - gfxboot configuration (language/keyboard support!)
#            - propagation of a new kernel/initrd
#            - Simple bootmanager (directory "install" in image)
#        - Configuration of additional resources outside the root FS
#            - Add-Ons (like sample document/music/video files)
#            - More Add-Ons (like OSS for Win / Mac)
#
# NOTES:
#    Execution of the procedure may require Internet access to download
#    the source of the latest version gfxboot-theme-ubuntu.
#
#    If a local copy of gfxboot-theme-ubuntu is available in the remaster
#    home, it will be used instead of a (possibly updated) download.
SCRIPT_DIR=`dirname "$0"`
REMASTER_HOME=${1:-~/tmp}
SCRIPT_DIR=${2-$REMASTER_HOME/customization-scripts}
ISO_REMASTER_DIR="$REMASTER_HOME/remaster-iso"
REMASTER_DIR="$REMASTER_HOME/remaster-root"
BOOT_LANG=`cat "$SCRIPT_DIR/livecd_locale"`
function failure()
{
    echo "$@"
    exit 1
}
function get_latest_kernel()
{
    set -- $(ls "$REMASTER_DIR"/boot/vmlinuz* 2>/dev/null |
        sed -e "s@$REMASTER_DIR/boot/@@" |
        tr --  '-.' '\t' |
        sort --key=2 --key=3 --key=4  --key=5 --numeric-sort |
        tail -n1 )
    [ "$1" = "vmlinuz" ] && echo "$REMASTER_DIR/boot/$1-$2.$3.$4-$5-$6"
}
# Create a temporary directory to assemble the gfxboot stuff in
BUILD_DIR=`mktemp -d`
if [ -d $REMASTER_HOME/gfxboot-theme-ubuntu ]
then
    cp -r $REMASTER_HOME/gfxboot-theme-ubuntu "$BUILD_DIR" ||
        failure "Cannot copy gfxboot-theme-ubuntu to $BUILD_DIR"
    pushd "$BUILD_DIR" >/dev/null ||
        failure "Cannot change directory to $BUILD_DIR"
else
    pushd "$BUILD_DIR" >/dev/null ||
        failure "Cannot change directory to $BUILD_DIR"
    #-----HS (1)-->
    #DISTRO_CODENAME=`cd "$ISO_REMASTER_DIR"/dists && find . -maxdepth 1 -type d | grep '/' | cut -d '/' -f2` ||
    #   failure "Unable to identify Ubuntu distro codename"
     DISTRO_CODENAME="$(lsb_release -c|awk '{print $2}')"||
        failure "Unable to identify Ubuntu distro codename"
    #-----HS (1)--<
    APT_SOURCES_TMP_DIR=`mktemp -d`
    wget -c http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/dists/$DISTRO_CODENAME/main/source/Sources.gz -O "$APT_SOURCES_TMP_DIR"/Sources.gz
    #-----HS (2)-->
    #GFXBOOT_THEME_UBUNTU_SOURCE_PACKAGE=http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/pool/main/g/gfxboot-theme-ubuntu/$(zgrep gz "$APT_SOURCES_TMP_DIR"/Sources.gz | grep gfxboot-theme-ubuntu | sed -n 1p | awk '{ print $3 }')
    GFXBOOT_THEME_UBUNTU_SOURCE_PACKAGE=http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/pool/main/g/gfxboot-theme-ubuntu/$(dpkg -l|grep gfxboot-theme-ubuntu|awk '{print $2"_"$3"_"$4".deb"}')
    #-----HS (2)--<
    wget $GFXBOOT_THEME_UBUNTU_SOURCE_PACKAGE ||
        failure "Unable to download gfxboot-theme-ubuntu source package from $GFXBOOT_THEME_UBUNTU_SOURCE_PACKAGE"
    #-----HS (3)-->
    #tar xfz *.tar.gz ||
    tar xfz *.tar.gz
    dpkg -x *.deb . ||
        failure "Unable to extract gfxboot-theme-ubuntu source package"
    #-----HS (3)--<
fi
# Build the gfx boot theme
    #-----HS (4)-->
cd usr/share
    #-----HS (4)--<
cd gfxboot-theme-ubuntu
cd po
ln -s pt.po pt_PT.po
cd ..
##if [ "$BOOT_LANG" = "pt_PT" ]; then
##  make DEFAULT_LANG="pt" || failure "Failed to build gfxboot theme"
##else
    make DEFAULT_LANG="$BOOT_LANG" || failure "Failed to build gfxboot theme"
##fi
# Fix list of languages
pushd boot >/dev/null
# Create regexp that matches all language packs on CD
langpack=""
for langpack in `cat "$SCRIPT_DIR/language_packs"`; do
    if [ -z "$LANGPACKS" ]; then
        LANGPACKS="$langpack"
    else
        LANGPACKS="$LANGPACKS|$langpack"
    fi
done
# Rewrite langlist
cat "$SCRIPT_DIR/livecd_locales" >langlist
popd >/dev/null
# Copy to isolinux in image directory
cp -af boot/* "$ISO_REMASTER_DIR/isolinux/" ||
    failure "Error while copying boot files to $ISO_REMASTER_DIR/isolinux"
popd >/dev/null
# Cleanup
[ "$BUILD_DIR" != "/" ] && rm -rf "$BUILD_DIR"
# Copy kernel and initrd, in case it was changed during installation
VMLINUZ=$(get_latest_kernel)
if [ "$VMLINUZ" != "" ]
then
    INITRD="$REMASTER_DIR"/boot/initrd.img-$(echo `basename $VMLINUZ` | cut -d'-' -f 2-)
    if [ -e "$VMLINUZ" -a -e "$INITRD" ]
    then
        echo "Updating kernel:"
        echo "  kernel=$VMLINUZ"
        echo "  initrd=$INITRD"
        cp -f "$VMLINUZ" "$ISO_REMASTER_DIR/casper/vmlinuz"
        cp -f "$INITRD" "$ISO_REMASTER_DIR/casper/initrd.gz"
    else
        echo "Not updating kernel as initrd not present"
    fi
fi
# Misc fixup for Karmic
pushd "$ISO_REMASTER_DIR"/isolinux >/dev/null
# What used to be called "message" is now called "bootlogo"
if [ -f isolinux.cfg -a -n "`grep "gfxboot bootlogo" isolinux.cfg 2>/dev/null`" ]
then
    if [ -f message ]
    then
        echo "Using bootlogo instead of message"
        mv message bootlogo
    fi
fi
# What used to be a gzipped initrd now is a lzma compressed initrd
if [ -f text.cfg ] || [ -f txt.cfg ]
then
    # At least one of the .cfg file will be missing. Drop error message.
    lzused=`grep initrd.lz text.cfg txt.cfg 2>/dev/null`
    lzmacmd=`which lzma`
    if [ -n "$lzused" ]
    then
        if [ -n "$lzmacmd" ]
        then
            if [ -f ../casper/initrd.gz ]
            then
                pushd "$ISO_REMASTER_DIR"/casper >/dev/null
                echo "Recompressing initrd from gzip to lzma"
                rm -f initrd.lz
                gunzip <initrd.gz | $lzmacmd >initrd.lz
                rm -f initrd.gz
                popd >/dev/null
            fi
        else
            if [ -f ../casper/initrd.gz ]
            then
                echo "lzma command not installed"
                echo "Switching permanently to gzipped initrd"
                sed -i -e 's/initrd\.lz/initrd.gz/g' text.cfg txt.cfg
                rm -f ../casper/initrd.lz
            else
                : do nothing - no initrd.gz
            fi
        fi
    else
        : do nothing - initrd.lz not used
    fi
fi
{CODE}
~tc~|| Added to fix syntax highlighting witin Tiki~/tc~
Then overwrite the customize_iso in uck with your own one:
{CODE(caption="Command to be run on a terminal window out of UCK")}
cp /home/xavi/customize_iso2 /home/xavi/tmp/customization-scripts/customize_iso
{CODE}
Then you can continue with step -+2+- in:
{QUOTE()}
Please choose customization action
1) Run console application
2) Continue building
Your choice (1..2)> 2
{QUOTE}
Change HighlighterToggle Highlighter
  • Sitemap
To translate, do not change the language and the content. Instead, create a new translation in the new language.
The namespace for a page is guessed automatically from the page name. However, some exceptions may arise. This option allows to override the namespace.

Search and select what you are looking for from the options that appear.

No matching results.

days
Image Seed: noun \ˈsēd\ : the beginning of something which continues to develop or grow

Knowledge seeds

Switch Language