User FAQ: Difference between revisions

From FAIWiki
Jump to navigation Jump to search
(testing / unstable issues)
(remove very old stuff)
 
(29 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== What's the official website for FAI? ==
= FAQs for new users =
http://www.informatik.uni-koeln.de/fai
 
== I'm new to FAI. How should I start ? ==
* Use the FAI CD and the FAIme build service
* Install the stable distribution on your first clients!
 
 
== Where do I find the log files? ==
* During installation the are available in /tmp/fai/ on the install client
* At the end of the installation they will be copied to /target/var/log/fai
* If $LOGSERVER and $LOGUSER are set, they are copied to the install server in the home directory of the user $LOGUSER
* After rebooting the install client, the are available in /var/log/fai
 
= Somewhat more advanced FAQs =
== Can I write a hook that is executed ''after'' a certain task? ==
(freely) quoting <code>#fai</code>:
 
<pre>
<sanso> is there a way to define post-hooks other than defining a (pre-)hook for the following task?
<Mrfai> sanso: yes post hooks are possible. Define a pre hook, and inside this hook, you
first call the default task using task_taskname, then add your code for the post hook.
And don't forget to call skiptask.
Mmmm, do you like to add this to the faiwiki, maybe a FAQ or tip?
</pre>
 
= More technical stuff / troubleshooting =
== I try to install testing or sid/unstable and something goes wrong. Why? ==
testing and unstable sid change every day. So it's possible that your problems are
solved today or tomorrow. You should try again. It's recommendable to use a
local mirror and freeze it when you found a working install. But we also
recommend to use stable and local backport repositories whenever possible.
 
''debian@layer-acht.de''
 
As for sid - that's why it's called unstable You might want to get used to things braking.
 
You should only try to install <code>unstable</code> or <code>testing</code> if You know what you're doing and
You ''know'' You ''definitely need'' something other than <code>stable</code>
 
[[User:Sanso|sanso]] 10:20, 11 Aug 2005 (CEST)


== What order are scripts executed in? ==
== What order are scripts executed in? ==
Scripts are executed in class definition order, and in numerical order within each class.
Scripts are executed in class definition order, and in numerical order within each class.


For example, if the classes FOO and BAR were defined (in that order), and <code>$FAI_CONFIGDIR/scripts/FOO</code> contained <code>S20</code> and <code>S40</code>, and <code>$FAI_CONFIGDIR/scripts/BAR</code> contained <code>S30</code>, the order of execution would be:
For example, if the classes FOO and BAR were defined (in that order), and <code>$FAI_CONFIGDIR/scripts/FOO</code> contained <code>20-foo</code> and <code>40-bar</code>, and <code>$FAI_CONFIGDIR/scripts/BAR</code> contained <code>30-mycode</code>, the order of execution would be:
<code>
<code>
# $FAI_CONFIGDIR/scripts/FOO/S20
# $FAI_CONFIGDIR/scripts/FOO/20-foo
# $FAI_CONFIGDIR/scripts/FOO/S40
# $FAI_CONFIGDIR/scripts/FOO/40-bar
# $FAI_CONFIGDIR/scripts/BAR/S30
# $FAI_CONFIGDIR/scripts/BAR/30-mycode
</code>
</code>




== <code>make-fai-nfsroot</code> dies silently, Why? ==


Restarted it with more debug output (-v) and (-r) to recover yielded:
== Why does the system reboot after entering ctrl-c following an installation? ==
Reading Package Lists...
The default actions for FAI do not allow you to get a shell since it is insecure and it will reboot on <ctrl-c> by design.
E: Dynamic MMap ran out of room E: Error occured while processing
 
phpgroupware-
If you want to get a shell you need to change FAI's actions by adding 'createvt' to the FAI_FLAGS variable that is passed to the kernel on startup. You can do this via fai-chboot (e.g. <code>fai-chboot -iFv -k "FAI_ACTION=install" hostname</code>) for network installs.
netsaint (NewPackage) E: Problem with MergeList
 
/var/lib/apt/lists/172.25.1.52:9999
''dawsons@augsburg.edu''
_debian_dists_unstable_main_binary-i386_Packages E: The package lists or
status file could not be parsed or opened.


Reason:
== Why can't I login via ssh to my install client(s) anymore? It used to work but suddenly stopped working. ==
As I my default <code>/etc/apt/sources.list</code> read in stable, testing and unstable, apt-get needs a lot
After you have reinstalled FAI on your server a new ssh host key is
of space for its internal tables. Therefore I had also a special <code>apt.conf</code> which is missing in the
generated. This also happens when you call <code>fai-setup</code> or <code>fai-make-nfsroot</code>.
nfsroot of FAI. This is a known problem of apt.
Remove the relevant line from <code>~/.ssh.known_hosts</code> and try
again. You can use <code>ssh-keygen -R</code> for removing a host from
the known_hosts file.


Solution:
Copied <code>/etc/apt/sources</code> to <code>/etc/fai/sources.list</code>, then minimised it to contain just one version (e.g. stable)
of Debian


''ngiger@mus.ch''
== I need a /boot partition, how do I create one? ==


If your disk is larger than your BIOS can handle, you will need to create a boot partition to boot from. If you don't have a boot partition you will get <code>GRUB Error: 18</code> when the client boots [http://wiki.linuxquestions.org/wiki/GRUB#Error_18]. Use a [[disk_config]] like this one to boot from the /boot partition:


== Why does the system reboot after entering ctrl-c following an installation? ==
disk_config disk1
The default actions for FAI do not allow you to get a shell since it is insecure and it will reboot on <ctrl-c> by design.
primary    /boot          100        rw              ; ext2 boot
logical    /              5000        rw              ; -j ext3
logical    swap            100-400    rw             


If you want to get a shell you need to change FAI's actions by adding 'createvt' to the FAI_FLAGS variable that is passed to the kernel on startup. You can do this via fai-chboot (e.g. <code>fai-chboot -iFv -k "FAI_ACTION=install" hostname</code>) for network installs or for floppy installs you can use something similar to <code>make-fai-bootfloppy "FAI_FLAGS=verbose,createvt,sshd"</code>.
It is important that only the /boot partition is primary, that its filesystem is ext2 and that the boot option is set. If not, FAI will assume that the root partition (/) is the boot partition and GRUB will try to boot from that one. It will result in <code>GRUB Error 15</code>.


''dawsons@augsburg.edu''


== Device missing or not a block device - where did my device go? ==


== I'm new to FAI. How should I start ? ==
If Rebooting fails because of modules missing (e.g. can't mount root fs ...)
* Read the FAI guide and this FAQ.  
Chances are in error.log You'll find a line saying
* Start with the simple examples by copying them to FAI_CONFIGDIR.
---%<---
* Install the stable distribution on your first clients!
rcS.log:Failed to create initrd image.
---%<---


debian@layer-acht.de
<code>rcS.log</code> says:
---%<---
Setting up kernel-image-2.6.8-2-686-smp (2.6.8-12) ...
/usr/sbin/mkinitrd: device /dev/sda1 is not a block device
Failed to create initrd image.
---%<---


== I try to install testing or sid/unstable and something goes wrong. Why? ==
I modified Steffen Grunewald's script:
testing and unstable sid change every day. So it's possible that your problems are
solved today or tomorrow. You should try again. It's recommendable to use a
local mirror and freeze it when you found a working install. But we also
recommend to use stable and local backport repositories whenever possible.


''debian@layer-acht.de''
Yes. udev is the culprit, [...]
As a workaround, you may set up a hook for configure,


As for sid - that's why it's called unstable You might want to get used to things braking.
e.g. in <code>$CONFIGSPACE/hooks/configure.DEFAULT</code>


You should only try to install <code>unstable</code> or <code>testing</code> if You know what you're doing and
---%<---
You ''know'' You ''definitely need'' something other than <code>stable</code>
echo $0 udev bug workaround
# work-around for udev bug
if [ -x $target/etc/init.d/udev ]; then
    chroot $target /etc/init.d/udev stop
    chroot $target /usr/bin/dpkg --configure --pending
    chroot $target /etc/init.d/udev start
fi
---%<---

Latest revision as of 21:45, 30 January 2019

FAQs for new users

I'm new to FAI. How should I start ?

  • Use the FAI CD and the FAIme build service
  • Install the stable distribution on your first clients!


Where do I find the log files?

  • During installation the are available in /tmp/fai/ on the install client
  • At the end of the installation they will be copied to /target/var/log/fai
  • If $LOGSERVER and $LOGUSER are set, they are copied to the install server in the home directory of the user $LOGUSER
  • After rebooting the install client, the are available in /var/log/fai

Somewhat more advanced FAQs

Can I write a hook that is executed after a certain task?

(freely) quoting #fai:

<sanso> is there a way to define post-hooks other than defining a (pre-)hook for the following task?
<Mrfai> sanso: yes post hooks are possible. Define a pre hook, and inside this hook, you 
first call the default task using task_taskname, then add your code for the post hook. 
And don't forget to call skiptask.
Mmmm, do you like to add this to the faiwiki, maybe a FAQ or tip?

More technical stuff / troubleshooting

I try to install testing or sid/unstable and something goes wrong. Why?

testing and unstable sid change every day. So it's possible that your problems are solved today or tomorrow. You should try again. It's recommendable to use a local mirror and freeze it when you found a working install. But we also recommend to use stable and local backport repositories whenever possible.

debian@layer-acht.de

As for sid - that's why it's called unstable You might want to get used to things braking.

You should only try to install unstable or testing if You know what you're doing and You know You definitely need something other than stable

sanso 10:20, 11 Aug 2005 (CEST)

What order are scripts executed in?

Scripts are executed in class definition order, and in numerical order within each class.

For example, if the classes FOO and BAR were defined (in that order), and $FAI_CONFIGDIR/scripts/FOO contained 20-foo and 40-bar, and $FAI_CONFIGDIR/scripts/BAR contained 30-mycode, the order of execution would be:

  1. $FAI_CONFIGDIR/scripts/FOO/20-foo
  2. $FAI_CONFIGDIR/scripts/FOO/40-bar
  3. $FAI_CONFIGDIR/scripts/BAR/30-mycode


Why does the system reboot after entering ctrl-c following an installation?

The default actions for FAI do not allow you to get a shell since it is insecure and it will reboot on <ctrl-c> by design.

If you want to get a shell you need to change FAI's actions by adding 'createvt' to the FAI_FLAGS variable that is passed to the kernel on startup. You can do this via fai-chboot (e.g. fai-chboot -iFv -k "FAI_ACTION=install" hostname) for network installs.

dawsons@augsburg.edu

Why can't I login via ssh to my install client(s) anymore? It used to work but suddenly stopped working.

After you have reinstalled FAI on your server a new ssh host key is generated. This also happens when you call fai-setup or fai-make-nfsroot. Remove the relevant line from ~/.ssh.known_hosts and try again. You can use ssh-keygen -R for removing a host from the known_hosts file.


I need a /boot partition, how do I create one?

If your disk is larger than your BIOS can handle, you will need to create a boot partition to boot from. If you don't have a boot partition you will get GRUB Error: 18 when the client boots [1]. Use a disk_config like this one to boot from the /boot partition:

disk_config disk1
primary     /boot           100         rw              ; ext2 boot 
logical     /               5000        rw              ; -j ext3
logical     swap            100-400     rw              

It is important that only the /boot partition is primary, that its filesystem is ext2 and that the boot option is set. If not, FAI will assume that the root partition (/) is the boot partition and GRUB will try to boot from that one. It will result in GRUB Error 15.


Device missing or not a block device - where did my device go?

If Rebooting fails because of modules missing (e.g. can't mount root fs ...) Chances are in error.log You'll find a line saying

---%<---
rcS.log:Failed to create initrd image.
---%<---

rcS.log says:

---%<---
Setting up kernel-image-2.6.8-2-686-smp (2.6.8-12) ...
/usr/sbin/mkinitrd: device /dev/sda1 is not a block device
Failed to create initrd image.
---%<---

I modified Steffen Grunewald's script:

Yes. udev is the culprit, [...] As a workaround, you may set up a hook for configure,

e.g. in $CONFIGSPACE/hooks/configure.DEFAULT

---%<---
echo $0 udev bug workaround
# work-around for udev bug
if [ -x $target/etc/init.d/udev ]; then
   chroot $target /etc/init.d/udev stop
   chroot $target /usr/bin/dpkg --configure --pending
   chroot $target /etc/init.d/udev start
fi
---%<---