Installing Debian Squeeze (i386) - No $HOSTNAME set
Hallo, just tried to install current Debian Squeeze (i386) using fai 3.4.2 with partly success. (Installation with Fai is quite new to me, so maybe I should have tried lenny first - but however I need a squeeze installation.) So here is what I have done: - Downloaded and installed fai-packages from http://people.debian.org/~mika/fai/release/ - Typical commands: fai-setup fai-mirror /srv/fai/mirror make-fai-nfsroot; fai-cd -f -m /srv/fai/mirror /mnt/hgfs/TEMP/fai-test1.iso Just used demo config (except some changes for my local mirror). - Booted the fai-cd - Selected gnomehost (demohost didn't work either) After installation finished only the base system (FAIBASE and DHCPC) was there, no GNOME and no GERMAN as expected. The login prompt on the second terminal is "root@(none)". No hostname set, no network configuration, "cat /proc/cmdline" says: BOOT_IMAGE=/boot/vmlinuz boot=live FAI_FLAGS=verbose,createvt FAI_ACTION=install ip=192.168.1.1:eth0:of hostname=gnomehost" Guess somehow these settings should be passed to the installation system. That seems to be the reason why only FAIBASE was installed (script "50-host-classes"). Regards Karl
Re: Installing Debian Squeeze (i386) - No $HOSTNAME set
Perhaps stupid question but you did not mention that... did you boot the machine at the end of installation? If yes, are you sure your booted the installed system, rather than the installation system again? It sounds like you are still at the prompt of the installation system, not your installed system. Toomas On Tue, 2010-09-21 at 12:46 +0200, Karl Wallner wrote: > Hallo, > > just tried to install current Debian Squeeze (i386) using fai 3.4.2 with > partly success. > (Installation with Fai is quite new to me, so maybe I should have tried lenny > first - but > however I need a squeeze installation.) > > So here is what I have done: > - Downloaded and installed fai-packages from > http://people.debian.org/~mika/fai/release/ > - Typical commands: > fai-setup > fai-mirror /srv/fai/mirror > make-fai-nfsroot; > fai-cd -f -m /srv/fai/mirror /mnt/hgfs/TEMP/fai-test1.iso >Just used demo config (except some changes for my local mirror). > - Booted the fai-cd > - Selected gnomehost (demohost didn't work either) > > After installation finished only the base system (FAIBASE and DHCPC) was > there, > no GNOME and no GERMAN as expected. The login prompt on the second terminal is > "root@(none)". No hostname set, no network configuration, "cat /proc/cmdline" > says: > BOOT_IMAGE=/boot/vmlinuz boot=live FAI_FLAGS=verbose,createvt > FAI_ACTION=install ip=192.168.1.1:eth0:of hostname=gnomehost" > > Guess somehow these settings should be passed to the installation system. > That seems to be the reason why only FAIBASE was installed (script > "50-host-classes"). > > > Regards > Karl >
Re: Installing Debian Squeeze (i386) - No $HOSTNAME set
Am 21.09.2010 16:36, schrieb Toomas Tamm: Perhaps stupid question but you did not mention that... did you boot the machine at the end of installation? If yes, are you sure your booted the installed system, rather than the installation system again? It sounds like you are still at the prompt of the installation system, not your installed system. After reboot the prompt is still "root@(none)". IMHO the selection of package classes works like this: - In Grub menu.lists there is some entry like: ... hostname=gnomehost - The installation system somehow detects this and should set the hostname <== This step fails - The script "/var/lib/fai/config/classes/50-host-classes" selects package classes to install. #! /bin/bash # assign classes hosts # use a list of classes for our demo machine case $HOSTNAME in faiserver) echo "FAIBASE DEMO FAISERVER" ;; demohost) echo "FAIBASE DHCPC DEMO" ;; gnomehost) echo "FAIBASE DHCPC DEMO XORG GNOME";; atom*) echo "FAIBASE DHCPC DEMO" ;; bear) echo "FAIBASE DHCPC LVM_XEN_SERVER XEN" ;; puma) echo "FAIBASE DHCPC RAID_XEN_VIRTUAL" ;; *) echo "FAIBASE DHCPC" ;; esac As the hostname remains unset during installation (and also after reboot) only a base system is installed. Guess this is problem has sth. to with debian squeeze or fai 3.4.2. Karl
Re: Installing Debian Squeeze (i386) - No $HOSTNAME set
Hi Mika and everyone, [...] > > After installation finished only the base system (FAIBASE and DHCPC) was > there, > no GNOME and no GERMAN as expected. The login prompt on the second terminal is > "root@(none)". No hostname set, no network configuration, "cat /proc/cmdline" > says: > BOOT_IMAGE=/boot/vmlinuz boot=live FAI_FLAGS=verbose,createvt > FAI_ACTION=install ip=192.168.1.1:eth0:of hostname=gnomehost" > > Guess somehow these settings should be passed to the installation system. > That seems to be the reason why only FAIBASE was installed (script > "50-host-classes"). > Could it be that setting the hostname from the kernel command line is more or less *again* broken? Mika, explicitly speaking to you as you seem to be the one most up-to-date regarding live-initramfs and friends. At some earlier stage it was necessary to use HOSTNAME=gnomehost to make things work, then hostname=gnomehost used to work. Looking at the code in scripts/live in *lenny* there is explicit parsing of a hostname= parameter. This hostname parameter is *not* parsed in the version in squeeze anymore. Karl (or anybody else having a squeeze system at hand), could you maybe try whether using HOSTNAME=gnomehost makes things work? If this is the case, then we should definitely also fix this for squeeze (again speaking to Mika as FAI stable release manager :-) ). Best, Michael pgpAQGFCDo0Wt.pgp Description: PGP signature
Re: Installing Debian Squeeze (i386) - No $HOSTNAME set
Am 25.09.2010 00:27, schrieb Michael Tautschnig: Karl (or anybody else having a squeeze system at hand), could you maybe try whether using HOSTNAME=gnomehost makes things work? Yep. This helps - at least for the package selection. Still some problems remain: - Some scripts fail (will look at this). - Some package names are wrong. ... but generally the installed system looks ok now. Thank you, Karl
Re: Installing Debian Squeeze (i386) - No $HOSTNAME set
> Am 25.09.2010 00:27, schrieb Michael Tautschnig: > > > >Karl (or anybody else having a squeeze system at hand), could you maybe try > >whether using HOSTNAME=gnomehost makes things work? > > > Yep. This helps - at least for the package selection. > > Still some problems remain: > - Some scripts fail (will look at this). > - Some package names are wrong. > > ... but generally the installed system looks ok now. > It would be fantastic if you could provide the full logs of your installation, it seems that not too many people have used FAI on full squeeze systems before. We definitely need to resolve these issues before the release. Thanks a lot, Michael pgpLlpEJCOHUw.pgp Description: PGP signature
Re: Installing Debian Squeeze (i386) - No $HOSTNAME set
Hallo Michael, Am 25.09.2010 17:53, schrieb Michael Tautschnig: > It would be fantastic if you could provide the full logs of your installation, > it seems that not too many people have used FAI on full squeeze systems before. > We definitely need to resolve these issues before the release. here is a list of problems/annoyances during installation of Debian Squeeze with fai 3.4.2: 1. Use uppercase hostname/ip parameters in boot command line. Change to uppercase in "/srv/tftp/fai/pxelinux.cfg/*" or "/etc/fai/grub.cfg" > APPEND boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=install IP=192.168.148.100:eth0:off HOSTNAME=gnomehost root=/dev/nfs nfsroot=192.168.148.11:/srv/fai/nfsroot 2. ftp-logserver does not default to install server. Need to set Logserver explicitly in file /etc/fai/fai.conf. > # Name of log-server. If undefined, the install server will be used. > LOGSERVER=faiserver 3. ssh-command for fai-chboot (Calling task_chboot) requires user input. > The authenticity of host 'faiserver (192.168.148.11)' can't be established. > RSA key fingerprint is ... > Are you sure you want to continue connection (yes/no)? Solution is to append the line "StrictHostKeyChecking no" to /etc/ssh/ssh_config (for nfsroot). 4. Some packages missing in squeeze > fai.log:No candidate version found for iceweasel-gnome-support > fai.log:No candidate version found for icedove-gnome-support > fai.log:No candidate version found for gnome-apt These packages are not available for debian squeeze. 5. Error when running fai-setup > df: Warning: cannot read table of mounted file systems: No such file or directory > No /etc/mtab inside nfsroot. Solution is to add a softlink: "ln -sf /proc/mounts /etc/mtab" 6. Error when running fai-setup > Creating config file /etc/default/grub with new version > grub-probe: error: cannot find a device for / (is /dev mounted?). > grub-probe: error: cannot find a device for /boot (is /dev mounted?). > grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?). No idea on this errors. Can't detect any problems caused by this. 7. Error messages on modules.dep missing (but file exists!) > fai.log:FATAL: Could not load /lib/modules/2.6.32-5-486/modules.dep: No such file or directory > fai.log:FATAL: Could not load /lib/modules/2.6.32-5-486/modules.dep: No such file or directory > fai.log:FATAL: Could not load /lib/modules/2.6.32-5-486/modules.dep: No such file or directory Reason was 5. 8. Final reboot (task_faiend) produces some messages (Messages only visible for a moment). Messages like: "Unmounting ...", "Failed to unmount ...", "Remount read only". But everything works find after it. Regards, Karl
Re: Installing Debian Squeeze (i386) - No $HOSTNAME set
Hi all, I've started to review these changes and added some fixes in 4.0~beta2+experimental22. However, there are still a few open issues from my point of view. [...] > > here is a list of problems/annoyances during installation of Debian Squeeze > with fai 3.4.2: > > 1. Use uppercase hostname/ip parameters in boot command line. >Change to uppercase in "/srv/tftp/fai/pxelinux.cfg/*" or > "/etc/fai/grub.cfg" > > APPEND boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=install > IP=192.168.148.100:eth0:off HOSTNAME=gnomehost root=/dev/nfs > nfsroot=192.168.148.11:/srv/fai/nfsroot > I've added the HOSTNAME= changes, but I'm not that sure about the IP= stuff. I have also mailed Mika to seek further input from debian-live, if possible. > 2. ftp-logserver does not default to install server. >Need to set Logserver explicitly in file /etc/fai/fai.conf. > > # Name of log-server. If undefined, the install server will be used. > > LOGSERVER=faiserver > Well, apparently the comments in your fai.conf are still outdated/misleading. I believe this has since be fixed (LOGSERVER isn't even listed there by default anymore). The true issue, however, is that LOGSERVER defaults to $SERVER, which is supposed to be set in get-boot-info; but get-boot-info tries to evaluate the ip= kernel command line option, which in your case has been changed to IP=... > 3. ssh-command for fai-chboot (Calling task_chboot) requires user input. > > The authenticity of host 'faiserver (192.168.148.11)' can't be established. > > RSA key fingerprint is ... > > Are you sure you want to continue connection (yes/no)? > Solution is to append the line "StrictHostKeyChecking no" to > /etc/ssh/ssh_config (for nfsroot). > No, fai-setup should be taking care of this, as good as it can. There should be some output resulting from echo "$sshdir/known_hosts created."; you might want to check the contents of that file. > 4. Some packages missing in squeeze > > fai.log:No candidate version found for iceweasel-gnome-support > > fai.log:No candidate version found for icedove-gnome-support > > fai.log:No candidate version found for gnome-apt > These packages are not available for debian squeeze. > Thanks a lot, fixed in this experimental version. > 5. Error when running fai-setup > > df: Warning: cannot read table of mounted file systems: No such file or > > directory > > > No /etc/mtab inside nfsroot. > Solution is to add a softlink: "ln -sf /proc/mounts /etc/mtab" > I have no idea when df would be called, or which script should be calling it. > 6. Error when running fai-setup > > Creating config file /etc/default/grub with new version > > grub-probe: error: cannot find a device for / (is /dev mounted?). > > grub-probe: error: cannot find a device for /boot (is /dev mounted?). > > grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?). > No idea on this errors. Can't detect any problems caused by this. > It's just installing the grub package in the NFSROOT, but it can (obviously) not be properly configured; should not pose any problems. > 7. Error messages on modules.dep missing (but file exists!) > > fai.log:FATAL: Could not load /lib/modules/2.6.32-5-486/modules.dep: No > > such file or directory > > fai.log:FATAL: Could not load /lib/modules/2.6.32-5-486/modules.dep: No > > such file or directory > > fai.log:FATAL: Could not load /lib/modules/2.6.32-5-486/modules.dep: No > > such file or directory > Reason was 5. > > 8. Final reboot (task_faiend) produces some messages (Messages only visible > for a moment). >Messages like: "Unmounting ...", "Failed to unmount ...", "Remount read > only". >But everything works find after it. > No idea about the last two; but for the moment we probably don't need to worry too much about these as installation seems to succeed, so no need for quick fixes for squeeze. Thanks a lot for the detailed report! We still need to fix those kernel command line issues, and I'd say we badly need a proper fix. Best, Michael pgp4GscueQnMs.pgp Description: PGP signature
Re: Installing Debian Squeeze (i386) - No $HOSTNAME set
Hi Karl, > Hallo Michael, > > Am 25.09.2010 17:53, schrieb Michael Tautschnig: > > It would be fantastic if you could provide the full logs of your > > installation, > > it seems that not too many people have used FAI on full squeeze systems > > before. > > We definitely need to resolve these issues before the release. > > here is a list of problems/annoyances during installation of Debian Squeeze > with fai 3.4.2: > > 1. Use uppercase hostname/ip parameters in boot command line. >Change to uppercase in "/srv/tftp/fai/pxelinux.cfg/*" or > "/etc/fai/grub.cfg" > > APPEND boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=install > IP=192.168.148.100:eth0:off HOSTNAME=gnomehost root=/dev/nfs > nfsroot=192.168.148.11:/srv/fai/nfsroot > [...] As a number of doubts were raised by several people - could you please reaffirm that you had to use an uppercase IP= parameter and that the lowercase ip= version did not work? Thanks a lot, Michael pgpwP6a1OOUiM.pgp Description: PGP signature
Re: Installing Debian Squeeze (i386) - No $HOSTNAME set
Hi, just updated to 3.4.3~rc1. All further observations refer to this version. 1. Use uppercase hostname/ip parameters in boot command line. Change to uppercase in "/srv/tftp/fai/pxelinux.cfg/*" or "/etc/fai/grub.cfg" APPEND boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=install IP=192.168.148.100:eth0:off HOSTNAME=gnomehost root=/dev/nfs nfsroot=192.168.148.11:/srv/fai/nfsroot I've added the HOSTNAME= changes, but I'm not that sure about the IP= stuff. I have also mailed Mika to seek further input from debian-live, if possible. I'll check it later. 3. ssh-command for fai-chboot (Calling task_chboot) requires user input. The authenticity of host 'faiserver (192.168.148.11)' can't be established. RSA key fingerprint is ... Are you sure you want to continue connection (yes/no)? Solution is to append the line "StrictHostKeyChecking no" to /etc/ssh/ssh_config (for nfsroot). No, fai-setup should be taking care of this, as good as it can. There should be some output resulting from echo "$sshdir/known_hosts created."; you might want to check the contents of that file. "$sshdir/known_hosts" is only created when FAI_LOGPROTO is "ssh". (I used LOGPROTO "ftp".) fai-setup:95> if [ "$FAI_LOGPROTO" = "ssh" ]; then 5. Error when running fai-setup df: Warning: cannot read table of mounted file systems: No such file or directory No /etc/mtab inside nfsroot. Solution is to add a softlink: "ln -sf /proc/mounts /etc/mtab" I have no idea when df would be called, or which script should be calling it. It's called by "update-initramfs" (during fai-setup). Reproducible with: > r...@sque32:~# chroot /srv/fai/nfsroot/live/filesystem.dir > r...@sque32:/# update-initramfs -u > update-initramfs: Generating /boot/initrd.img-2.6.32-5-486 > df: Warning: cannot read table of mounted file systems: No such file or directory > warning: can't open /etc/mtab: No such file or directory 6. Error when running fai-setup Creating config file /etc/default/grub with new version grub-probe: error: cannot find a device for / (is /dev mounted?). grub-probe: error: cannot find a device for /boot (is /dev mounted?). grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?). No idea on this errors. Can't detect any problems caused by this. It's just installing the grub package in the NFSROOT, but it can (obviously) not be properly configured; should not pose any problems. grub-probe is called by grub-install, which is called by postinst of grub-pc (/var/lib/dpkg/info/grub-pc.postinst). IMHO it is not useful to call grub-install inside nfs-root during fai-setup. fai-cd (iso+usb) do their own grub install. Maybe it's better to install grub-pc unconfigured (dpkg --unpack). Regards, Karl Wallner
Re: Installing Debian Squeeze (i386) - No $HOSTNAME set
Hi Michael, Am 04.10.2010 18:37, schrieb Michael Tautschnig: As a number of doubts were raised by several people - could you please reaffirm that you had to use an uppercase IP= parameter and that the lowercase ip= version did not work? I was wrong (I fooled myself while doing some dhcp setup/changes). Lowercase "ip" is correct. Sorry for the confusion. Regards, Karl Wallner
Re: Installing Debian Squeeze (i386) - No $HOSTNAME set
> Hi Michael, > > Am 04.10.2010 18:37, schrieb Michael Tautschnig: > >As a number of doubts were raised by several people - could you please > >reaffirm > >that you had to use an uppercase IP= parameter and that the lowercase ip= > >version did not work? > > > I was wrong (I fooled myself while doing some dhcp setup/changes). Lowercase > "ip" is correct. > Sorry for the confusion. > But the hostname -> HOSTNAME stuff is still necessary? Thanks a lot, Michael pgpMI2cdSgxBI.pgp Description: PGP signature
Re: Installing Debian Squeeze (i386) - No $HOSTNAME set
Am 06.10.2010 01:43, schrieb Michael Tautschnig: Hi Michael, Am 04.10.2010 18:37, schrieb Michael Tautschnig: As a number of doubts were raised by several people - could you please reaffirm that you had to use an uppercase IP= parameter and that the lowercase ip= version did not work? I was wrong (I fooled myself while doing some dhcp setup/changes). Lowercase "ip" is correct. Sorry for the confusion. But the hostname -> HOSTNAME stuff is still necessary? Yes. Regards, Karl
Re: Installing Debian Squeeze (i386) - No $HOSTNAME set
* Karl Wallner [Wed Oct 06, 2010 at 09:02:37PM +0200]: > Am 06.10.2010 01:43, schrieb Michael Tautschnig: >> But the hostname -> HOSTNAME stuff is still necessary? > Yes. Ok, I think I found the problem. Karl, can you please do me a favour and try the following: Edit /lib/live/config.sh and replace: # 001-hostname live-config.hostname=*|hostname=*) LIVE_HOSTNAME="${_PARAMETER#*hostname=}" ;; with: # 001-hostname live-config.hostname=*|hostname=*) HOSTNAME="${_PARAMETER#*hostname=}" export HOSTNAME ;; and then rebuild the initrd (using update-initramfs). Why it's working for you with HOSTNAME=.. in the kernel cmdline is that the kernel's cmdline content is reachable and exported to userspace and therefore the HOSTNAME you provide works within FAI. Why it's not working with hostname=... on the other side is that the argument to hostname=... was exported as $HOSTNAME in older live-initramfs versions but the behaviour was changed starting with live-config 2.0~a1-1 where it became $HOST, starting with git commit a1486378484ab4aa86165fc0493be9ff57079725 (resulting in live-config 2.0~a4-1) it's the above mentioned $LIVE_HOSTNAME but FAI relies on $HOSTNAME being set. I pinged the debian-live people to make sure they are aware of this regression for FAI, let's see if they can help us in coming up with a solution working for both sides. regards, -mika- -- http://michael-prokop.at/ || http://adminzen.org/ http://grml-solutions.com/ || http://grml.org/ signature.asc Description: Digital signature
Re: Installing Debian Squeeze (i386) - No $HOSTNAME set
Hi Karl, [...] (hostname/HOSTNAME issue is tracked in a separate sub-thread) > > >>3. ssh-command for fai-chboot (Calling task_chboot) requires user input. > >>>The authenticity of host 'faiserver (192.168.148.11)' can't be established. > >>>RSA key fingerprint is ... > >>>Are you sure you want to continue connection (yes/no)? > >>Solution is to append the line "StrictHostKeyChecking no" to > >>/etc/ssh/ssh_config (for nfsroot). > >> > > > >No, fai-setup should be taking care of this, as good as it can. There should > >be > >some output resulting from echo "$sshdir/known_hosts created."; you might > >want > >to check the contents of that file. > > > "$sshdir/known_hosts" is only created when FAI_LOGPROTO is "ssh". (I used > LOGPROTO "ftp".) > fai-setup:95> if [ "$FAI_LOGPROTO" = "ssh" ]; then > Ah, ok, seems we are abusing that $LOG... stuff for running fai-chboot as well. Not really nice, IMHO. Would you mind filing a bug with the Debian BTS about his issue? I bet we're not going to get this fixed within the next days and it would just get lost all too easily. > >>5. Error when running fai-setup > >>>df: Warning: cannot read table of mounted file systems: No such file or > >>>directory > >>> > >>No /etc/mtab inside nfsroot. > >>Solution is to add a softlink: "ln -sf /proc/mounts /etc/mtab" > >> > > > >I have no idea when df would be called, or which script should be calling it. > It's called by "update-initramfs" (during fai-setup). Reproducible with: > > r...@sque32:~# chroot /srv/fai/nfsroot/live/filesystem.dir > > r...@sque32:/# update-initramfs -u > > update-initramfs: Generating /boot/initrd.img-2.6.32-5-486 > > df: Warning: cannot read table of mounted file systems: No such file or > > directory > > warning: can't open /etc/mtab: No such file or directory > > > >>6. Error when running fai-setup > >>>Creating config file /etc/default/grub with new version > >>>grub-probe: error: cannot find a device for / (is /dev mounted?). > >>>grub-probe: error: cannot find a device for /boot (is /dev mounted?). > >>>grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?). > >>No idea on this errors. Can't detect any problems caused by this. > >> > > > >It's just installing the grub package in the NFSROOT, but it can (obviously) > >not > >be properly configured; should not pose any problems. > > > grub-probe is called by grub-install, which is called by postinst of grub-pc > (/var/lib/dpkg/info/grub-pc.postinst). > IMHO it is not useful to call grub-install inside nfs-root during fai-setup. > fai-cd (iso+usb) do their own grub install. > Maybe it's better to install grub-pc unconfigured (dpkg --unpack). > I'm not sure whether we want to fix those "problems" at all - none of them will be causing problems for the installed system, doing a redirect to /dev/null would be just as good. Best, Michael pgpXR5nFzitZY.pgp Description: PGP signature