[X2Go-Commits] [[X2Go Wiki]] page changed: doc:howto:tce

wiki-admin at x2go.org wiki-admin at x2go.org
Tue Aug 27 21:47:26 CEST 2019


A page in your DokuWiki was added or changed. Here are the details:

Date        : 2019/08/27 19:47
Browser     : Mozilla/5.0 (X11; Linux x86_64; rv:60.9) Gecko/20100101 Goanna/4.3 Firefox/60.9 PaleMoon/28.6.1
IP-Address  : 109.193.81.67
Hostname    : HSI-KBW-109-193-081-067.hsi7.kabel-badenwuerttemberg.de
Old Revision: https://wiki.x2go.org/doku.php/doc:howto:tce?rev=1553015827
New Revision: https://wiki.x2go.org/doku.php/doc:howto:tce
Edit Summary: Build scripts and instructions updated for Debian Buster
User        : stefanbaur

@@ -27,37 +27,46 @@
    * At least an i586-compatible CPU
    * Capability to boot via PXE //or// sufficient local storage (expect 250-450 MB, depending on what you decide to include)
    * A graphics card and input devices (Keyboard, Mouse/Trackball/Touchpad/Trackpoint/Touchscreen, ...) that are supported by the stock Debian X Server
  ===== Build system prerequisites for all variants =====
-   * You need a Debian Jessie system to build the image. (Other
distributions based on Debian might work, but this is untested.)
+   * You need a Debian Buster system to build the image. (Other distributions based on Debian might work, but this is untested.)
    * We suggest using a 64-Bit system, however, it is possible to use a 32-Bit system if you don't want to build a 64-Bit ThinClient image.
    * We suggest leaving at least 4 GB of free disk space so the build won't abort due to insufficient disk space while packages are downloaded, unpacked and copied around.
    * Make sure your package list is up to date by running: <code>sudo apt-get update </code>
    * Install the required packages by running: <code>sudo apt-get install genisoimage git-core live-build live-config-doc live-manual-html live-boot-doc</code>
  
  ===== Building your own X2Go-TCE Image =====
  ==== Configuring the Build ====
  <code>
- #!/bin/bash
+ # NOTE: This file gets sourced by the actual buildscript - so place it in the same directory as the buildscript or adjust the
path in the buildscript.
+ 
  # Select ONE of the following git reposities
  # this one loosely corresponds to "stable"
- export LBX2GO_CONFIG='git://code.x2go.org/live-build-x2go.git::feature/openbox-magic-pixel-workaround'
+ #export LBX2GO_CONFIG='git://code.x2go.org/live-build-x2go.git::feature/openbox-magic-pixel-workaround-buster'
  # this one loosely corresponds to "heuler"
- #export LBX2GO_CONFIG='https://github.com/LinuxHaus/live-build-x2go::feature/openbox-magic-pixel-workaround'
- # NOTE: Add "-stretch" to the end of the LBX2GO_CONFIG string to create a stretch build
+ export LBX2GO_CONFIG='https://github.com/LinuxHaus/live-build-x2go::feature/openbox-magic-pixel-workaround-buster'
+ # NOTE: Add "-stretch" to the end of the LBX2GO_CONFIG string to create a stretch build, and "-buster" for a buster build
+ # NOTE: As of 2019-08-27, buster builds are only available via the github repo and for the feature/openbox-magic-pixel-workaround-buster and
feature/mate-minidesktop-buster branches
  
  # Select ONE of the following LBX2GO_ARCH lines and comment out the others
  # (feel free to use long or short options)
  # for 64-Bit builds, use:
  export LBX2GO_ARCH='-a amd64 -k amd64'
  # 32-Bit, larger memory footprint, but faster performance on i686 and newer
- # export LBX2GO_ARCH='-a i386 -k 686-pae'
- # 32-Bit, smallest memory footprint
+ #export LBX2GO_ARCH='-a i386 -k 686-pae'
+ # 32-Bit, smallest memory footprint - not available on buster
  # export LBX2GO_ARCH='--architectures i386 --linux-flavours 586'
  
- # detect if the selected git repo is meant to build a stretch or jessie image
+ # If you want to use the stock ISO image as created by this script, add your boot parameters here
+ #export LBX2GO_BOOTAPPEND_LIVE="boot=live components noswap lang=de vconsole.keymap=de keyboard-layouts=de locales=de_DE.UTF-8 silent quiet pubkey=http://x2go/x2go-tce/config/authorized_keys sessionsurl=http://x2go/x2go-tce/config/sessions
toram"
+ 
+ # detect if the selected git repo is meant to build a buster, stretch or jessie image
  if [ -z "${LBX2GO_CONFIG##*-stretch}" ] ; then
          export LBX2GO_DEBVERSION="stretch"
+         export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0"
+ elif [ -z "${LBX2GO_CONFIG##*-buster}" ] ; then
+         export LBX2GO_DEBVERSION="buster"
+         export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0"
  else
          export LBX2GO_DEBVERSION="jessie"
  fi
  
@@ -119,27 +128,31 @@
  export LBX2GO_TCE_SHRINK="true"
  
  # This patches the squashfs file into the initrd. Only parsed when image type "netboot" is set.
  # Will require boot parameter live-media=/ instead of fetch=...
- # Both TFTP client and TFTP server must support file transfers >32MB for this to work, if you want to deploy this initrd via TFTP, 
- # so e.g. atftpd will not work - tftpd-hpa, howeverm seems to have no problem with larger files.
+ # Both TFTP client and TFTP server must support
file transfers >32MB for this to work, if you want to deploy this initrd via TFTP,
+ # so e.g. atftpd will not work - tftpd-hpa, however, seems to have no problem with larger files.
  # When using iPXE, you can use http instead of TFTP.
  # This is especially helpful if you want to netboot via http and cannot use the server's IP, but must specify a DNS name - as "fetch=..." only understands IPs.
- export LBX2GO_NOSQUASHFS="false"
+ export LBX2GO_NOSQUASHFS="true"
  
  # Select ONE of the following LBX2GO_IMAGETYPE lines and comment out the others
  # to create an iso image:
  # export LBX2GO_IMAGETYPE='iso'
  # to create an iso image that can also be dd'ed to USB media:
- # export LBX2GO_IMAGETYPE='iso-hybrid'
+ #export LBX2GO_IMAGETYPE='iso-hybrid'
  # to create a netboot-image:
  export LBX2GO_IMAGETYPE='netboot'
  # NOT RECOMMENDED:
  # to create an image that can be written to a hard disk (always results
  # in a "build failed" message, even though the build might have worked):
 
# export LBX2GO_IMAGETYPE='hdd'
  # to create a tar file only (seems to be broken in live-build):
  # export LBX2GO_IMAGETYPE='tar'
+ 
+ if [ "$LBX2GO_IMAGETYPE" = "netboot" ]; then
+         LBX2GO_DEFAULTS+=" $LBX2GO_BOOTLOADER"
+ fi
  </code>
  
  ==== Live-Patching the Build ====
  This patch is required if you need USB mount capability on the ThinClient while [[http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=1136|Bug #1136]] is still unresolved.
@@ -154,13 +167,17 @@
  ==== Starting the Build ====
  Change to a directory where you want to save your builds, and run the following commands:
  <code>
  #!/bin/bash
+ 
+ # read (source) the config file
+ . ./x2go-tce-config
+ 
  # Create Timestamp
  LBX2GO_TIMESTAMP=$(date +"%Y%m%d%H%M%S")
  
  # Set Directory name
- LBX2GO_TCEDIR=./live-build-x2go-$LBX2GO_TIMESTAMP
+ LBX2GO_TCEDIR="./live-build-x2go-${LBX2GO_TIMESTAMP}-${LBX2GO_IMAGETYPE}-$(echo $LBX2GO_ARCH | awk '{print $2}')-${LBX2GO_CONFIG##*/}"
  
  if [ -z "$LBX2GO_ARCH" ] ||
  
  [ -z "$LBX2GO_SPACE" ] ||
     [ -z "$LBX2GO_CONFIG" ] ||
@@ -190,24 +207,33 @@
      cd $LBX2GO_TCEDIR
  
      lb config $LBX2GO_ARCH $LBX2GO_SPACE $LBX2GO_DEFAULTS \
         --config $LBX2GO_CONFIG --binary-images $LBX2GO_IMAGETYPE \
-        --archive-areas "$LBX2GO_ARCHIVE_AREAS"
+        --archive-areas "$LBX2GO_ARCHIVE_AREAS" \
+        --bootappend-live "$LBX2GO_BOOTAPPEND_LIVE"
      # This will copy any patches we have prepared
      if [ -d "../patch" ] ; then
          cp -a ../patch/* config/
+     fi
+     # This will copy any patches we have prepared for minidesktop
+     if [ -d "../patch-minidesktop" ] && (echo "$LBX2GO_CONFIG" | grep -q minidesktop) ; then
+         cp -a ../patch-minidesktop/* config/
      fi
      # This enables an i386-only package in the sources.list file when an i386 build is requested
      if echo "$LBX2GO_ARCH" | grep -q -i "i386" ; then
          sed -i -e 's/# for i386 only #//' config/package-lists/desktop.list.chroot
      fi
-      
  # This is for minidesktop builds only
-         if [ -f config/package-lists/firefox-langpacks.list.chroot ] && [ -n "$LBX2GO_LANG" ]; then
-                 for LBX2GO_SINGLE_LANG in $(echo $LBX2GO_LANG | tr ';' ' '); do
-                         echo "LANG: '$LBX2GO_SINGLE_LANG'"
-                         sed -i -e 's/#firefox-esr-l10n-'$LBX2GO_SINGLE_LANG'$/firefox-esr-l10n-'$LBX2GO_SINGLE_LANG'/' config/package-lists/firefox-langpacks.list.chroot
-                 done
-         fi
+     # This is for minidesktop builds only
+     if [ -f config/package-lists/firefox-langpacks.list.chroot ]; then
+             if [ -n "$LBX2GO_LANG" ]; then
+                     for LBX2GO_SINGLE_LANG in $(echo $LBX2GO_LANG | tr ';' ' '); do
+                             echo "LANG: '$LBX2GO_SINGLE_LANG'"
+                             sed -i -e 's/#firefox-esr-l10n-'$LBX2GO_SINGLE_LANG'$/firefox-esr-l10n-'$LBX2GO_SINGLE_LANG'/' config/package-lists/firefox-langpacks.list.chroot
+               
     done
+             else
+                     rm config/package-lists/firefox-langpacks.list.chroot
+             fi
+     fi
      if [ "$LBX2GO_TCE_SHRINK" = "true" ] ; then
          echo '#!/bin/sh' >./config/hooks/0112-remove-folders.hook.chroot
          echo 'set -e' >>./config/hooks/0112-remove-folders.hook.chroot
          echo '# Remove folders' >>./config/hooks/0112-remove-folders.hook.chroot
@@ -224,10 +250,12 @@
              ln ./tftpboot/live/vmlinuz ./x2go-tce-vmlinuz
              ln ./tftpboot/live/initrd.img ./x2go-tce-initrd.img
              if [ "$LBX2GO_NOSQUASHFS" = "true" ] ; then
                  (cd binary; echo live$'\n'live/filesystem.squashfs |cpio -o -H newc | gzip --fast) >./x2go-tce-filesystem.cpio.gz
-                 cat ./x2go-tce-initrd.img ./x2go-tce-filesystem.cpio.gz >./x2go-tce-initrd-with-fs.img
-                 rm ./x2go-tce-filesystem.cpio.gz ./x2go-tce-filesystem.squashfs ./x2go-tce-initrd.img
+                 cat
./x2go-tce-initrd.img ./x2go-tce-filesystem.cpio.gz >./x2go-tce-initrd-with-fs.img || exit 1
+                 rm ./x2go-tce-filesystem.cpio.gz
+                 # keeping these doesn't hurt, but feel free to rm them as well
+                 # rm ./x2go-tce-filesystem.squashfs ./x2go-tce-initrd.img
              fi
          fi
          if [ "$LBX2GO_IMAGETYPE" = "iso" ] || [ "$LBX2GO_IMAGETYPE" = "iso-hybrid" ] ; then
              ln ./binary/live/vmlinuz ./x2go-tce-vmlinuz
@@ -241,10 +269,19 @@
          fi
          # create timestamp file
          stat -c %Y ./config/includes.chroot/lib >./x2go-tce-timestamp
          touch -m -d @$(cat x2go-tce-timestamp) x2go-tce-timestamp
-         lb clean
-         rm -rf ./cache
+         if [ "$LBX2GO_GETSRC" = "true" ] ; then
+                 if lb source debian ;
+                 then
+                         echo -e "Source files have been downloaded: '$LBX2GO_TCEDIR'"
+                 else
+                         echo -e
"Source download failed: '$LBX2GO_TCEDIR'"
+                 fi
+         else
+                 lb clean
+                 rm -rf ./cache
+         fi
      else
          # note that imagetype hdd always ends here,
          # due to a harmless error that can be safely ignored, but which sets the error code to != 0
          echo -e "Build failed: '$LBX2GO_TCEDIR'"


-- 
This mail was generated by DokuWiki at
https://wiki.x2go.org/



More information about the x2go-commits mailing list