User Tools

Site Tools


doc:howto:tce

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
doc:howto:tce [2019/11/14 00:37]
stefanbaur [Configuring the Build]
doc:howto:tce [2021/01/25 00:18]
stefanbaur [Configuring the Build] This is part one of the patch to create Images for the Raspberry Pi
Line 44: Line 44:
 # we have a successful connect on port 3142, assume # we have a successful connect on port 3142, assume
 # it's apt-cacher-ng and use it # it's apt-cacher-ng and use it
- +# 
-if nc -z 127.0.0.1 3142 ; then +if nc -z 127.0.0.1 3142 ; then
     # bad idea with apt-cacher-ng, but will work with e.g. squid     # bad idea with apt-cacher-ng, but will work with e.g. squid
-    # export https_proxy=http://127.0.0.1:3128/ +    # export https_proxy=http://127.0.0.1:3128/
     # export http_proxy=http://127.0.0.1:3128/     # export http_proxy=http://127.0.0.1:3128/
     # export ftp_proxy=http://127.0.0.1:3128/     # export ftp_proxy=http://127.0.0.1:3128/
Line 54: Line 54:
     export LB_APT_HTTP_PROXY=http://127.0.0.1:3142/     export LB_APT_HTTP_PROXY=http://127.0.0.1:3142/
 fi fi
 +
 +# set these to true to save source files
 +#export LB_SOURCE="true"
 +#export LBX2GO_GETSRC="true"
  
 # Select ONE of the following git reposities # Select ONE of the following git reposities
Line 71: Line 75:
 # 32-Bit, smallest memory footprint - not available on buster # 32-Bit, smallest memory footprint - not available on buster
 # export LBX2GO_ARCH='--architectures i386 --linux-flavours 586' # export LBX2GO_ARCH='--architectures i386 --linux-flavours 586'
-EXPERIMENTAL: For ARM (Raspberry Pi), try+# For ARM (Raspberry Pi): 
-# export LBX2GO_ARCH='-a arm64' +#export LBX2GO_ARCH='-a arm64' 
-# Note that ARM builds are currently not working, at least not on the Pi.+#export LBX2GO_ARCH_MODEL='Pi4' # you can also set this to 'Pi3'Note that there must not be any whitespace between 'Pi' and the digit.
  
 # If you want to use the stock ISO image as created by this script, add your boot parameters here # 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" # 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"
 +
 +if echo -e "$LBX2GO_CONFIG" | grep -q "openbox"; then
 +        LBX2GO_BOOTAPPEND_LIVE+="fastpo "
 +        export LBX2GO_BOOTAPPEND_LIVE
 +elif echo -e "$LBX2GO_CONFIG" | grep -q "minidesktop"; then
 +        LBX2GO_BOOTAPPEND_LIVE+='timezone=Europe/Berlin noautologin ' # if you use nottyautologin instead of noautologin, an autologin will be set for the account "user", which conflicts our setting for the account "x2gothinclient"
 +        export LBX2GO_BOOTAPPEND_LIVE
 +fi
  
 # detect if the selected git repo is meant to build a buster, stretch or jessie image # detect if the selected git repo is meant to build a buster, stretch or jessie image
 if [ -z "${LBX2GO_CONFIG##*-stretch}" ] ; then if [ -z "${LBX2GO_CONFIG##*-stretch}" ] ; then
     export LBX2GO_DEBVERSION="stretch"     export LBX2GO_DEBVERSION="stretch"
 +    export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0"
 +elif [ -z "${LBX2GO_CONFIG##*-buster-heuler}" ] ; then
 +    export LBX2GO_DEBVERSION="buster"
 +    export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0"
 +elif [ -z "${LBX2GO_CONFIG##*-buster-heuler-bpo}" ] ; then
 +    export LBX2GO_DEBVERSION="buster"
     export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0"     export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0"
 elif [ -z "${LBX2GO_CONFIG##*-buster}" ] ; then elif [ -z "${LBX2GO_CONFIG##*-buster}" ] ; then
Line 97: Line 115:
  
 # set boot loader type - leave this unchanged unless you really know what you're doing # set boot loader type - leave this unchanged unless you really know what you're doing
-if echo "$LBX2GO_ARCH| awk '{print $2}' | grep -q "arm" ; then+if echo $LBX2GO_ARCH | awk '{print $2}' | grep -q "arm" ; then
     # This is part of our experimental ARM support     # This is part of our experimental ARM support
     LBX2GO_BOOTLOADERPARAMNAME=" "     LBX2GO_BOOTLOADERPARAMNAME=" "
Line 138: Line 156:
  
 # This is part of our experimental ARM support # This is part of our experimental ARM support
-if echo "$LBX2GO_ARCH| grep -q 'arm'; then+if echo $LBX2GO_ARCH | grep -q 'arm' && ! dpkg --print-architecture | grep -q 'arm' ; then
     export LBX2GO_DEFAULTS+=" --bootstrap-qemu-arch arm64 \     export LBX2GO_DEFAULTS+=" --bootstrap-qemu-arch arm64 \
-                              --bootstrap-qemu-static /usr/bin/qemu-arm-static"+                              --bootstrap-qemu-static /usr/bin/qemu-aarch64-static 
 +                              --apt-options \"--yes -oAPT::Default-Release=${LBX2GO_DEBVERSION} -oAPT::Immediate-Configure=false\"
 +fi 
 + 
 +# This is part of our experimental ARM support 
 +# This makes sure the resulting disk image is at least 1GB in size, even though our build currently requires way less. 
 +# It's unlikely that anyone will need to boot from a smaller partition; but if we let live-build pick the minimum size automatically, 
 +# we will not have enough space left to copy the firmware blobs into the right location. 
 +if echo $LBX2GO_ARCH | grep -q 'arm' ; then 
 +    export LBX2GO_DEFAULTS+=" --binary-filesystem fat32 \ 
 +                              --hdd-size 1024"
 fi fi
  
Line 150: Line 178:
 # This is to optimize squashfs size, based on a suggestion by intrigeri from the TAILS team # This is to optimize squashfs size, based on a suggestion by intrigeri from the TAILS team
 # note that this will permanently change /usr/lib/live/build/binary_rootfs # note that this will permanently change /usr/lib/live/build/binary_rootfs
-sed -i -e 's#MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -comp xz"#MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -comp xz -Xbcj x86 -b 1024K -Xdict-size 1024K"#' /usr/lib/live/build/binary_rootfs+if dpkg --print-architecture | grep -q 'arm'; then 
 +        # on arm, these parameters must not be used; if they're there, we need to reinstall the package to undo our patch 
 +        if grep -q -- '-Xbcj x86 -b 1024K -Xdict-size 1024K' /usr/lib/live/build/binary_rootfs; then 
 +                apt install --reinstall live-build 
 +        fi 
 +else 
 +        sed -i -e 's#MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -comp xz"#MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -comp xz -Xbcj x86 -b 1024K -Xdict-size 1024K"#' /usr/lib/live/build/binary_rootfs 
 +fi
  
 # This removes documentation, locales and man pages # This removes documentation, locales and man pages
Line 159: Line 194:
 # This patches the squashfs file into the initrd. Only parsed when image type "netboot" is set. # 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=... # 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, +# 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. # 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. # When using iPXE, you can use http instead of TFTP.
Line 174: Line 209:
 # /!\ the options below are NOT RECOMMENDED unless you use live-build from Debian Buster /!\ # /!\ the options below are NOT RECOMMENDED unless you use live-build from Debian Buster /!\
 # to create an image that can be written to a hard disk (for older live-build versions, this # to create an image that can be written to a hard disk (for older live-build versions, this
-# always results in a "build failed" message, even though the build might have worked - use +# always results in a "build failed" message, even though the build might have worked - use
 # live-build from Buster and things will work): # live-build from Buster and things will work):
 # export LBX2GO_IMAGETYPE='hdd' # export LBX2GO_IMAGETYPE='hdd'
 # to create a tar file only (seems to be broken in older live-build versions - Buster works): # to create a tar file only (seems to be broken in older live-build versions - Buster works):
 # export LBX2GO_IMAGETYPE='tar' # export LBX2GO_IMAGETYPE='tar'
 +
 +# This is part of our experimental ARM support
 +if echo "$LBX2GO_ARCH" | grep -q "arm" ; then
 +        # enforce hdd image for arm at the moment (might need to support netboot later on too)
 +        if ! [ "$LBX2GO_IMAGETYPE" = "hdd" ] ; then
 +                echo "WARNING: Replacing selected image type with 'hdd' That's all we currently support on ARM."
 +                LBX2GO_IMAGETYPE="hdd"
 +        fi
 +fi
  
 if [ "$LBX2GO_IMAGETYPE" = "netboot" ]; then if [ "$LBX2GO_IMAGETYPE" = "netboot" ]; then
Line 291: Line 335:
     # It makes some necessary changes, and also tries to speed up squashfs creation.     # It makes some necessary changes, and also tries to speed up squashfs creation.
     if (uname -r | grep -q 'i.86' || uname -r | grep -q 'amd64') && \     if (uname -r | grep -q 'i.86' || uname -r | grep -q 'amd64') && \
-       echo "$LB_X2GO_ARCH" | grep -q 'arm'; then+       echo "$LBX2GO_ARCH" | grep -q 'arm'; then
  
         # This command removes all references to fuseext and x2gothinclient from the         # This command removes all references to fuseext and x2gothinclient from the
Line 516: Line 560:
 === Required unless using the X2Go Session Broker: Adding the x2go-tce.sessions session configuration file to your HTTP or FTP Server === === Required unless using the X2Go Session Broker: Adding the x2go-tce.sessions session configuration file to your HTTP or FTP Server ===
 Again, this is assuming you already have an existing, working HTTP or FTP server setup. Again, this is assuming you already have an existing, working HTTP or FTP server setup.
-  * run X2GoClient on any computer you like, and configure a session the same way it should appear on the ThinClient <note tip>when using a Windows client, run x2goclient.exe --portable, or it will store the session information in the registry, rather than in a "sessions" file.</note>+  * run X2GoClient on any computer you like, and configure a session the same way it should appear on the ThinClient 
 + <note tip>when using a Windows client, run x2goclient.exe --portable, or it will store the session information in the registry, rather than in a "sessions" file.</note> 
   * locate the "sessions" file you just created - it should be at ~/.x2goclient/sessions   * locate the "sessions" file you just created - it should be at ~/.x2goclient/sessions
   * copy it to x2go-tce.sessions   * copy it to x2go-tce.sessions
Line 1155: Line 1201:
 FIXME Scripts triggered by if-up should check if a new download is really necessary. FIXME Scripts triggered by if-up should check if a new download is really necessary.
  
-FIXME Feature request: In TCE (not MMD), use <code>+===== List of closed ToDos/FIXMEs for this page =====  
 +  * Feature request: In TCE (not MMD), use <code>
 while ! (grep "^/dev/" /etc/mtab | grep -q rw ) ; do # rw-mounted physical devices detected while ! (grep "^/dev/" /etc/mtab | grep -q rw ) ; do # rw-mounted physical devices detected
  echo s >/proc/sysrq-trigger # sync all  echo s >/proc/sysrq-trigger # sync all
Line 1162: Line 1209:
 echo o >/proc/sysrq-trigger # force fast shutdown/poweroff echo o >/proc/sysrq-trigger # force fast shutdown/poweroff
 </code> for faster poweroff when boot parameter ''fastpo'' is set </code> for faster poweroff when boot parameter ''fastpo'' is set
-===== List of closed ToDos/FIXMEs for this page ===== +
   * ''audioout='', ''blank='', ''*blankdpmsfix'', ''nodpms'', ''xinerama='', are currently unsupported in MiniDesktop-Mode, but this is being worked on, by outsourcing them into scripts under ''/etc/X11/Xsession.d/'' (currently, they reside in ''/lib/live/config/2900-x2go-thinclientconfig'' - which doesn't exist in the MiniDesktop branches - and from there, they get written to ''~/.xsession'' - fixed in github repo, soon in x2go repo   * ''audioout='', ''blank='', ''*blankdpmsfix'', ''nodpms'', ''xinerama='', are currently unsupported in MiniDesktop-Mode, but this is being worked on, by outsourcing them into scripts under ''/etc/X11/Xsession.d/'' (currently, they reside in ''/lib/live/config/2900-x2go-thinclientconfig'' - which doesn't exist in the MiniDesktop branches - and from there, they get written to ''~/.xsession'' - fixed in github repo, soon in x2go repo
   * It would be nice to have a boot parameter ''xroot=[0xaabbcc|URI1[|URI2|...]]'' for the desktop background image/color, and a boot parameter ''xrootmode=center|fill|scale|tile'' to determine how the image(s) should be positioned (if the parameter has been set, but something is wrong, it should default to the "grey mesh" background) - fixed in github repo, soon in x2go repo   * It would be nice to have a boot parameter ''xroot=[0xaabbcc|URI1[|URI2|...]]'' for the desktop background image/color, and a boot parameter ''xrootmode=center|fill|scale|tile'' to determine how the image(s) should be positioned (if the parameter has been set, but something is wrong, it should default to the "grey mesh" background) - fixed in github repo, soon in x2go repo
doc/howto/tce.txt · Last modified: 2024/01/26 19:49 by stefanbaur