FAI 5.6 and Ubuntu 18.04 LTS bionic
Achim Bohnet
alleehol at gmail.com
Fri Jun 22 16:39:54 CEST 2018
> On 18. May 2018, at 22:13, Derek Poon <derekp+fai at ece.ubc.ca> wrote:
>
> In my experience, I have found two potential issues when installing Ubuntu 18.04 using FAI.
>
> The first is that if using FAI <= 5.5, then FAI_DEBOOTSTRAP_OPTS needs '--include gnupg'. Otherwise, the `apt-key add` in /usr/lib/fai/subroutines would fail. (At our site, we always run deboostrap instead of relying on basefiles, and we often need backwards compatibility for dirinstalls.)
>
> The second is that netplan (see https://netplan.io/examples) is the new preferred configuration format for networking; /etc/network/interfaces works only if you install the ifupdown package. I've included excerpts from our local scripts/DEBIAN/30-interface file below. It generates either /etc/netplan/*.yaml or /etc/network/interfaces.d/* or /etc/network/interfaces configuration files as appropriate.
Hi Derek,
thx for the netplan support script.
There's another problem here, when installing bionic via a stretch NFSROOT:
ifname in stretch is eht0
ifname in bionic is ens160
So install and boot time interface names are different. How did you solve this?
Achim
>
> ###############################################################################
>
> netplan_yaml() {
> local IFNAME="$1"
> local METHOD="$2"
> echo "Generating netplan configuration for $IFNAME ($METHOD)" >&2
> echo "# generated by FAI"
> echo "network:"
> echo " version: 2"
> ifclass SERVER ||
> echo " renderer: NetworkManager"
> echo " ethernets:"
> echo " $IFNAME:"
> case "$METHOD" in
> dhcp)
> echo " dhcp4: true"
> ;;
> static)
> echo " addresses: [$CIDR]"
> echo " gateway4: $GATEWAYS_1"
> echo " nameservers:"
> echo " search: [$DOMAIN]"
> echo " addresses: [${DNSSRVS// /, }]"
> ;;
> esac
> }
>
> iface_stanza() {
> local IFNAME="$1"
> local METHOD="$2"
> echo "Generating interface configuration for $IFNAME ($METHOD)" >&2
> echo "# generated by FAI"
> echo "auto $IFNAME"
> echo "iface $IFNAME inet $METHOD"
> case "$METHOD" in
> static)
> echo " address $IPADDR"
> echo " netmask $NETMASK"
> echo " broadcast $BROADCAST"
> echo " gateway $GATEWAYS"
> ;;
> esac
> }
>
> …
>
> case "$FAI_ACTION" in
> install|dirinstall)
> ifclass DHCPC && METHOD=dhcp || METHOD=static
>
> if [ -d $target/etc/netplan ]; then
> # Ubuntu >= 17.10 with netplan.io
> if [ -n "$NIC1" ]; then
> netplan_yaml $NIC1 $METHOD > $target/etc/netplan/01-${NIC1}.yaml
> fi
> elif [ -d $target/etc/network/interfaces.d ]; then
> # ifupdown >= 0.7.41 (Debian >= 8, Ubuntu >= 14.04)
> iface_stanza lo loopback > $target/etc/network/interfaces.d/lo
> if [ -n "$NIC1" ]; then
> iface_stanza $NIC1 $METHOD > \
> $target/etc/network/interfaces.d/$NIC1
> fi
> else
> (
> iface_stanza lo loopback
> iface_stanza $NIC1 $METHOD
> ) > $target/etc/network/interfaces
> fi
>
> if ! ifclass DHCPC ; then
> [ -n "$NETWORK" ] && echo "localnet $NETWORK" > $target/etc/networks
> if [ ! -L $target/etc/resolv.conf -a -e /etc/resolv.conf ]; then
> cp -p /etc/resolv.conf $target/etc
> fi
> fi
> ;;
> esac
>
>
> ###############################################################################
>
>
>
>> On May 18, 2018, at 11:04, Thomas Lange <lange at informatik.uni-koeln.de> wrote:
>>
>> After building the basefile for Ubuntu 18.04 LTS aka Bionic, my first
>> tests look fine. Setting the release name in class/UBUNTU.var to
>> ubuntudist=bionic
>> and copying the basefile from
>> https://fai-project.org/download/basefiles/BIONIC64.tar.xz
>> works. Oh, I didn't test yet if the network is running after the
>> installation. I will do this later.
>
--
To me vi is Zen. To use vi is to practice zen. Every command is
a koan. Profound to the user, unintelligible to the uninitiated.
You discover truth everytime you use it.
-- reddy at lion.austin.ibm.com
More information about the linux-fai
mailing list