Installation over serial console : menu of profile not working as expected
Hi folks, I'm new with the FAI server setup, I'm using fai version 5.7 on stretch. I want to operate installation of clients with a serial console using the profile functionality so I can get a menu. It works when I'm connecting a screen to the server (well, i'm using a virtual box setup to test), I can choose the right menu. It's broken when I replicate the same steps using the serial console (ttyS0), I get the menu of profile, I choose the option, press enter. Boom with the following error message. As if I was pressing "cancel"... which is not the case. ./40-parse-profiles.sh defined new classes: 40-parse-profiles.sh OK. Executing /var/lib/fai/config/class/41-warning.sh. 41-warning.shOK. Executing /var/lib/fai/config/class/50-host-classes. 50-host-classes OK. Executing /var/lib/fai/config/class/60-misc. 60-misc OK. List of all classes: DEFAULT LINUX AMD64 DHCPC GRUB_PC ip-192-168-33-100 LAST Calling task_defvar Defining variables from additional.var ++ disklist='sda sdb ' Calling task_action FAI_ACTION: install Performing FAI installation. All data may be overwritten! Calling task_install Calling task_partition No matching disk_config found Error in task partition. Code: 710 Traceback: task_error task_partition task task_install task task_action task main Source hook: savelog.LAST.sh ERRORS found in log files. See /tmp/fai/error.log savelog.LAST.sh OK. $LOGUSER is undefined. Not saving log files to remote. FATAL ERROR. Installation stopped. On the serial console ttyS0, using the menu profile, after have chosen the profile, I don't get the screen about "all your data on this disk WILL BE DESTROYED" here are the boot parameters: append initrd=initrd.img-4.9.0-8-amd64 ip=dhcp root=/srv/fai/nfsroot:vers=3 rootovl console=ttyS0,115200n8 FAI_FLAGS=verbose,sshd,createvt,menu FAI_CONFIG_SRC=nfs://faiserver/srv/fai/config FAI_ACTION=install I suspect the problem is with this script... https://github.com/faiproject/fai-config/blob/master/class/40-parse-profiles.sh Many thanks in advance. Sébastien
Re: Installation over serial console : menu of profile not working as expected
Le 18-11-20 à 06 h 41, Thomas Lange a écrit : >>>>>> On Mon, 19 Nov 2018 22:02:44 -0300, Sébastien Grenier >>>>>> said: > > > I suspect the problem is with this script... > > > https://github.com/faiproject/fai-config/blob/master/class/40-parse-profiles.sh > > I also think that the problem is there. > Can you try to write the value of the variable $out (which is the > output of the command tty) to a file and see if it is set correctly? > When I echo $out like this diff --git a/class/40-parse-profiles.sh b/class/40-parse-profiles.sh index c80cf7a7..01804c2f 100755 --- a/class/40-parse-profiles.sh +++ b/class/40-parse-profiles.sh @@ -14,6 +14,7 @@ fi [ "$flag_menu" ] || return 0 out=$(tty) +echo $out > /tmp/fai/out.txt tempfile=`(tempfile) 2>/dev/null` tempfile2=`(tempfile) 2>/dev/null` - I get that /dev/console in /tmp/fai/out.txt Is it what should be expected? Thanks, Sébastien
Re: Installation over serial console : menu of profile not working as expected
Le 18-11-20 à 10 h 23, Sébastien Grenier a écrit : > Le 18-11-20 à 06 h 41, Thomas Lange a écrit : >>>>>>> On Mon, 19 Nov 2018 22:02:44 -0300, Sébastien Grenier >>>>>>> said: >> >> > I suspect the problem is with this script... >> > >> https://github.com/faiproject/fai-config/blob/master/class/40-parse-profiles.sh >> >> I also think that the problem is there. >> Can you try to write the value of the variable $out (which is the >> output of the command tty) to a file and see if it is set correctly? >> > > When I echo $out like this > > > diff --git a/class/40-parse-profiles.sh b/class/40-parse-profiles.sh > index c80cf7a7..01804c2f 100755 > --- a/class/40-parse-profiles.sh > +++ b/class/40-parse-profiles.sh > @@ -14,6 +14,7 @@ fi > [ "$flag_menu" ] || return 0 > > out=$(tty) > +echo $out > /tmp/fai/out.txt > tempfile=`(tempfile) 2>/dev/null` > tempfile2=`(tempfile) 2>/dev/null` > - > > I get that > /dev/console > in /tmp/fai/out.txt > > Is it what should be expected? > Seems like the most interesting part is part of this file: # cat /tmp/fileVotmuV libgpm: zero screen dimension, assuming 80x25. the temp file is created by the script class/40-parse-profiles.sh I've ask a friend that have suggested to remove the 1>$out at line 150 and 161. Now, I can press enter in the menu and it's working over the serial console and also on the normal screen. But, I've lost the capacity to navigate the menu, it ouputs garbage instead. Let see... Sébastien
Re: Installing jessie/buster machines with stretch FAI?
Thanks for both of you for your responses. Le 19-02-07 à 04 h 57, Thomas Lange a écrit : >>>>>> On Wed, 6 Feb 2019 23:49:49 -0300, Sébastien Grenier >>>>>> said: > > > Now I would like to have the same setup of profile but with jessie > > instead stretch. I tried to modified > If the target distribution is different from the nfsroot, you need a > basefile. You can get basefiles for jessie and buster from > http://fai-project.org/download/basefiles/ > I downloaded JESSIE64.tar.xz and copied it here /srv/fai/config/basefiles/ and added the class "JESSIE64" to the selected profile and I got that in the /tmp/fai/fail.log on the client. alling task_extrbase ftar: extracting /var/lib/fai/config/basefiles/JESSIE64.tar.xz to /target/ So far so good! :) But, it got "updated" to stretch a few hook later. >From the /tmp/fai/fail.log on the client Copying APT key from DEBIAN.asc to DEBIAN.asc.gpg Calling hook: updatebase.DEBIAN updatebase.DEBIANOK. Calling task_updatebase Updating base Ign http://faiserver:3142 stretch InRelease Get:1 http://faiserver:3142 stretch Release.gpg [2434 B] Ign http://fai-project.org stretch InRelease . Is there a way not to upgraded to stretch? Cheers, Sébastien
Installing jessie/buster machines with stretch FAI?
Hello, I'm running fai-server 5.7.3 on Debian stretch and I've been installing stretch machines without problem. I'm using the default.profile menu to choose which profile to install. Now I would like to have the same setup of profile but with jessie instead stretch. I tried to modified https://github.com/faiproject/fai-config/blob/master/class/DEBIAN.var#L1 (release=) to have there "jessie" instead of "stretch". No change, stretch is always installed... I'm curious about how this variable is useful then. I looked at changing the sources.list on the faiserver here /srv/fai/nfsroot/etc/apt/sources.list from stretch to jessie! I'm getting jessie packages on the client machine but dependencies errors. I feel that is far from the right way to do this... and soon, I'll like to test installing buster (testing) with the same profile setup. What would be the good way to install another debian release than "stable". Cheers, Sébastien