Re: UEFI boot order, Re: Tip: Remote FAI install
Hi all, I'm wondering whether this issue concerning bad/wrong UEFI boot order after a fai installation already was resolved in the meantime (since September, 2021)? https://lists.uni-koeln.de/pipermail/linux-fai/2021-September/012770.html The idea was to e.g. add a few lines in config/scripts/GRUB_EFI/10-setup with efibootmgr commands (possibly before and) after the grub-install commands to correct the changed UEFI boot order. Currently I'm installing new desktops with uninitialized ssds and after the reboot I find the PXE boot option with a lower priority than the installed OS which for my environment is quite inconvenient... Best regards, Andreas -- Dr. Andreas Sindermann fon: +49 (221) 470-4201 Institut fuer Theoretische Physikfax: +49 (221) 470-5159 Universitaet zu Koeln Zuelpicher Str. 77 mailto:sin...@thp.uni-koeln.de D-50937 Koeln, Germany http://www.thp.uni-koeln.de/~sinder
Re: Progressbar for extracting Basefiles
Please find included the both files I have changed. Hint: you need to install pv in the nfsroot Am 18.01.23 um 15:19 schrieb Karsten Nordsiek: Yes that's working. I have added the -f Option Now it works as fine as it should thx for the hint. Regards Karsten Nordsiek Am 18.01.23 um 14:34 sch rieb Thomas Lange: On Wed, 18 Jan 2023 12:28:26 +0100, Karsten Nordsiek said: > -1 Use only first tar file matching class name. > -c class[class] Define classes (space separated). Hmmm, it's hard to see what you have changed. A diff or git diff would be much better to understand. My first guess is to add -f to the pv call. -f, --force output even if standard error is not a terminal Inside FAI we redirect the output to a pipe which also does tee into a file. Or you may try to force the output (does pv use stderr?) to /dev/ttyN. #! /bin/bash #* # # ftar -- extract tar files using FAI classes # # This script is part of FAI (Fully Automatic Installation) # Copyright (C) 2001-2017 Thomas Lange, la...@informatik.uni-koeln.de # Universitaet zu Koeln # #* # This program 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 2 of the License, or # (at your option) any later version. # # This program 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. # # A copy of the GNU General Public License is available as # '/usr/share/common-licences/GPL' in the Debian GNU/Linux distribution # or on the World Wide Web at http://www.gnu.org/copyleft/gpl.html. You # can also obtain it by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #* # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - die() { local e=$1 # first parameter is the exit code shift echo "ftar: $@" >&2 # print error message exit $e } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - extract() { local file=$1 local catname=$2 if [ $deletefiles -eq 1 ] ; then cd $target/$dir && rm -f -- .* * 2>/dev/null deletefiles=0 fi if [ $removedir -eq 1 ]; then cd $target/$dir || die 4 "ERROR: cd to $target/$dir failed. Aborting." [ $PWD = "/" ] && die 3 "WARNING: Will not do recursive removal of directory /" rm -rf -- .* * 2>/dev/null removedir=0 fi if [ $progress -eq 1 ]; then echo "ftar: extracting $file to $target/$dir" | tr -s '/' $catname $file | pv -f -s $(du -sb $file | awk '{print $1}') | tar $xattrs --numeric-owner -C $target/$dir $vflag -xf - else echo "ftar: extracting $file to $target/$dir" | tr -s '/' $catname $file | tar $xattrs --numeric-owner -C $target/$dir $vflag -xf - tardone=1 # if option -1 is set, only one class will be used [ $single -eq 1 ] && exit 0 fi } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - usage() { cat <#! /bin/bash #* # # subroutines -- useful subroutines for FAI # # This script is part of FAI (Fully Automatic Installation) # (c) 2000-2021 by Thomas Lange, la...@informatik.uni-koeln.de # Universitaet zu Koeln # (c) 2001-2005 by Henning Glawe, gla...@physik.fu-berlin.de # Freie Universitaet Berlin # #* # This program 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 2 of the License, or # (at your option) any later version. # # This program 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. # # A copy of the GNU General Public License is available as # `/usr/share/common-licences/GPL' in the Debian GNU/Linux distribution # or on the World Wide Web at http://www.gnu.org/copyleft/gpl.html. You # can also obtain it by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #* # source this file, then you have these function available in the shell # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - die() { # echo comment and exit
Re: Progressbar for extracting Basefiles
Yes that's working. I have added the -f Option Now it works as fine as it should thx for the hint. Regards Karsten Nordsiek Am 18.01.23 um 14:34 sch rieb Thomas Lange: On Wed, 18 Jan 2023 12:28:26 +0100, Karsten Nordsiek said: > -1 Use only first tar file matching class name. > -c class[class] Define classes (space separated). Hmmm, it's hard to see what you have changed. A diff or git diff would be much better to understand. My first guess is to add -f to the pv call. -f, --force output even if standard error is not a terminal Inside FAI we redirect the output to a pipe which also does tee into a file. Or you may try to force the output (does pv use stderr?) to /dev/ttyN.
Re: Progressbar for extracting Basefiles
> On Wed, 18 Jan 2023 12:28:26 +0100, Karsten Nordsiek > said: > -1 Use only first tar file matching class name. > -c class[class] Define classes (space separated). Hmmm, it's hard to see what you have changed. A diff or git diff would be much better to understand. My first guess is to add -f to the pv call. -f, --force output even if standard error is not a terminal Inside FAI we redirect the output to a pipe which also does tee into a file. Or you may try to force the output (does pv use stderr?) to /dev/ttyN. -- viele Grüße Thomas
Progressbar for extracting Basefiles
Hello to all, a small problem and I hope you can help me I want to show a progressbar while extracting the basefile so I have done some changes as follows: changes in /srv/fai/nfsroot/usr/sbin/ftar Usage: ftar [OPTION] ... SOURCE -1 Use only first tar file matching class name. -c class[class] Define classes (space separated). -d Delete all files in target before extracting. -D Create debug output. -h Show summary of options. -p Show progress indicator -r Recursively remove files in target before extracting. -s source_dir Look for source files relative to source_dir. -t target_dir Extract files relativ to target_dir. -v Be verbose. Not yet used. (Option p added to the Optionlist) declare Variables: source=$FAI/files target=$FAI_ROOT deletefiles=0 removedir=0 tardone=0 single=0 ignore=0 progress=0 (added progress=0) Changes in Section extract() if [ $progress -eq 1 ]; then echo "ftar: extracting $file to $target/$dir" | tr -s '/' $catname $file | pv -s $(du -sb $file | awk '{print $1}') | tar $xattrs --numeric-owner -C $target/$dir $vflag -xf - else echo "ftar: extracting $file to $target/$dir" | tr -s '/' $catname $file | tar $xattrs --numeric-owner -C $target/$dir $vflag -xf - tardone=1 # if option -1 is set, only one class will be used [ $single -eq 1 ] && exit 0 fi Changes in File /srv/fai/nfsroot/usr/lib/fai/subroutines changes in Section task_extrabse() fetch-basefile # remember, ftar extracts into $FAI_ROOT by default, so / means $FAI_ROOT/ # copy the base file class based if it exists [ -d $FAI/basefiles ] && ftar -1vp -s $FAI/basefiles / if [ $? -ne 0 ]; then if [ $do_init_tasks -eq 1 ]; then ftar -p -1v -c base -s /var/tmp / else [ -d $NFSROOT/var/tmp ] && ftar -p -1v -c base -s $NFSROOT/var/tmp / fi # if no base file was extracted, call debootstrap if [ ! -d $FAI_ROOT/etc ]; then echo "No base file found. Calling debootstrap." [ -z "$FAI_DEBOOTSTRAP" ] && die "\$FAI_DEBOOTSTRAP undefined. Aborting" call_debootstrap $FAI_DEBOOTSTRAP task_error 801 $? fi fi The file has been extracted but there is no output in Stdout (Terminal) Let me know if you need more Informations Greetings Karsten Nordsiek