FAI installation instructions

Thomas Neumann blacky+fai at fluffbunny.de
Thu May 6 11:47:56 CEST 2010


hiya

> jurgen.lamsens at telenet.be a écrit :
>> The problem is; I'm stuck at creating the "minimal Ubuntu
>> system/debootstrap" base image. In other words: what is the next step
>> after: "apt-get install debootstrap" ?

> Roughly, it should be something like this:

> # debootstrap hardy /some/where/hardy http://some-ubuntu-mirror/
> # tar zc -C /some/where/hardy -f /my/fai/config/basefiles/HARDY.tar.gz .

> And then add your host in /my/fai/config/class/50-host-class, with the
> HARDY variable, configure disk, packages, etc..., and start the
> installation.

...and fail, because /etc/apt/sources.list got overwritten during prepareapt.




# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### BEGIN SUBROUTINE INFO
# Provides-Var:    none
# Requires-Var:    $FAI_ROOT $FAI_ETC_DIR
# Suggests-Var:    $IPADDR $DOMAIN
# Short-Description: <task desc.>
### END SUBROUTINE INFO

task_prepareapt () {

    # ftp and http needs resolv.conf in chroot environment, /etc/hosts is
useful
    # think about using fcopy for these two files
    [ -f /etc/resolv.conf ] && cp /etc/resolv.conf $FAI_ROOT/etc
    [ -f /etc/hosts ] && cp /etc/hosts $FAI_ROOT/etc
    # set hostname in $FAI_ROOT
    if [ -f /var/run/fai/FAI_INSTALLATION_IN_PROGRESS ]; then
      echo $HOSTNAME >$FAI_ROOT/etc/hostname
      if [ -n "$IPADDR" ]; then
        ainsl -s $FAI_ROOT/etc/hosts "$IPADDR $HOSTNAME.$DOMAIN $HOSTNAME"
      fi
    fi

    if [ X$FAI_ALLOW_UNSIGNED = X1 ]; then
      cat <<EOF > $FAI_ROOT/etc/apt/apt.conf.d/10fai
APT::Get::AllowUnauthenticated "true";
Aptitude::CmdLine::Ignore-Trust-Violations yes;
EOF
    fi
    # during normal installation, we need sources.list from /etc/apt
    [ $do_init_tasks -eq 1 ] && FAI_ETC_DIR=/etc
    [ -d $FAI_ETC_DIR/apt ] && cp -r $FAI_ETC_DIR/apt/* $FAI_ROOT/etc/apt/
}




More information about the linux-fai mailing list