3 # assign classes to hosts based on their hostname
5 # do not use this if a menu will be presented
6 [ "$flag_menu" ] && exit 0
8 # set these early so they are lowest priority.
9 echo FAIBASE STANDARD DEBIAN
11 # note, this is where this file comes from:
12 # cp /usr/share/keyrings/freesh-archive-keyring.gpg STANDARD.gpg
15 # For multi-boot system.
16 # We check that we aren't in a pxe boot environment.
17 # There is probably a better way to do this.
18 # We check the reverse condition in 51-multi-boot,
19 # and set what os we are installing, but don't check it
20 # into git since it changes regularly.
24 # Each host defines following:
26 # UBUNTU or nothing. DEBIAN is always defined as a base.
28 # The base disto version, only use so far is the basefile name if it exists.
29 # Debian stable basefile gets built by faisetup and gets used otherwise.
30 # With X suffix, means it has gone through the dirinstall process and has eXtra
31 # things installed, to speed up installation.
33 # STRETCH64, BUSTER64, BULLSEYE64, BOOKWORM64
34 # FLIDAS64, FLIDAS64BIG, ETIONA64, NABIA64, ARAMO64, ECNE64
35 # XENIAL64, BIONIC64, FOCAL64,
37 # The distro subvol name, we can add as many of these as we want:
38 # VOL_TESTING, VOL_STRETCH, VOL_BUSTER, VOL_BULLSEYE, VOL_BOOKWORM
39 # VOL_FLIDAS, VOL_ETIONA, VOL_NABIA, VOL_ARAMO, VOL_ECNE
40 # VOL_XENIAL, VOL_BIONIC, VOL_FOCAL, VOL_JAMMY, VOL_NOBLE
41 # VOL_BULLSEYE_BOOTSTRAP, VOL_BOOKWORM_BOOTSTRAP.
42 # Using VOL_BUSTER_BOOTSTRAP sets up the install to act like a pxe rom if
43 # grub sets a specific var.
45 # The apt sources files we want,
46 # STRETCH_FREE, STRETCH_NONFREE, STRETCH_LINODE
47 # BUSTER_FREE, BUSTER_NONFREE,
48 # BULLSEYE_FREE, BULLSEYE_NONFREE
49 # BOOKWORM_FREE, BOOKWORM_NONFREE
50 # TESTING_FREE, TESTING_NONFREE,
51 # XENIAL_FREE, BIONIC, FOCAL, FLIDAS, ETIONA, NABIA, ARAMO, ECNE.
53 # It's all a little redundant in some cases, but it keeps things
57 # Other notable classes:
59 # INSTALL: for autodiscover iso, this is needed. We could also add it to
60 # the autodiscover grub, but then we have to burn a new iso if we want a
61 # non-install one. It sets the class for the corresponding INSTALL.var,
62 # which sets FAI_ACTION=INSTALL. I'm not sure if this variable overrides
63 # FAI_ACTION outside of autodiscover, todo: test it out, if it doesn't,
64 # make install be default in 51-multi-boot, and disable it if needed.
66 # DESKTOP: install a bunch of extra packages. For creating X suffix
67 # basefiles. See README.
69 # LINODE: For running a vm on linode, especially one created with fai-cd.
71 # IANK / FSF: general setup of my machine vs FSF machines
72 # NABIA_EXTRA: extra repos for NABIA from other distros
73 # ARAMO_EXTRA: extra repos for ARAMO from other distros
75 # UBUNTU_UP: for trisquel, we want to inherit ubuntu things, except for
76 # some ubuntu things which go in this class. UP = upstream.
78 # D16: for kgpe-d16 specific settings.
80 # JAMMY_FIRMWARE: for trisquel install to get nonfree firmware from
81 # ubuntu jammy. The linux-firmware-free package in trisquel conflicts
82 # with the linux-firmware package in ubuntu, but you only find out after
83 # installing due to an error.
85 # For filesystem/partitioning related classes, see comments at the top of
86 # fai/config/hooks/partition.DEFAULT
88 if [[ -e /a
/bin
/fai
/fai-wrapper
]]; then
89 source /a
/bin
/distro-functions
/src
/identify-distros
91 codename
=$
(debian-codename
)
97 # nonfree repo is not going away any time soon due to
98 # gcc-doc being in nonfree
99 echo ${codename^^}_NONFREE
102 # easier to stay with fai example config if we just call it ubuntu
108 li|lj
) echo "LINODE" ;;
109 bk|je
) echo "NOCRYPT" ;;
114 #echo "PARTITION_PROMPT"
118 if grep ^
52:54:00: /sys
/class
/net
/eth
0/address
&>/dev
/null
; then
119 # if our eth0 mac is in the kvm range, we are a vm.
124 ### Below here is a comment of code, exit above is so it does not get executed ###
126 ###### begin Template for 51-multi-boot ######
128 # It has reasonable combinations of above classes.
129 # We must first replace _ with host name(s).
136 if [[ ! -e /a
/bin
/fai
/fai-wrapper ||
$FAI_ACTION == dirinstall
]]; then
138 # bullseye based minimal recovery / bootstraping os:
139 _
) echo BOOKWORM64 VOL_BOOKWORM_BOOTSTRAP BOOKWORM_FREE
;;
140 # bullseye based minimal recovery / bootstraping os:
141 _
) echo BULLSEYE64 VOL_BULLSEYE_BOOTSTRAP BULLSEYE_FREE
;;
143 _
) echo UBUNTU FLIDAS64 VOL_FLIDAS FLIDAS
;;
145 _
) echo UBUNTU ETIONA64 VOL_ETIONA ETIONA
;;
147 _
) echo UBUNTU NABIA64 VOL_NABIA NABIA
;;
149 _
) echo UBUNTU ARAMO64 VOL_ARAMO ARAMO ARAMO_EXTRA JAMMY_FIRMWARE
;;
151 _
) echo UBUNTU ECNE64 VOL_ECNE ECNE ECNE_EXTRA NOBLE_FIRMWARE
;;
153 _
) echo STRETCH64 VOL_STRETCH STRETCH_NONFREE
;;
155 _
) echo BUSTER64 VOL_BUSTER BUSTER_NONFREE
;;
157 _
) echo BULLSEYE64 VOL_BULLSEYE BULLSEYE_NONFREE
;;
159 _
) echo BOOKWORM64 VOL_BOOKWORM BOOKWORM_NONFREE
;;
161 _
) echo BOOKWORM64 VOL_TESTING TESTING_NONFREE
;;
163 _
) echo UBUNTU XENIAL64 VOL_XENIAL XENIAL_FREE
;;
165 _
) echo UBUNTU BIONIC64 VOL_BIONIC BIONIC
;;
167 _
) echo UBUNTU FOCAL64 VOL_FOCAL FOCAL
;;
169 _
) echo UBUNTU JAMMY64 VOL_JAMMY JAMMY
;;
171 _
) echo UBUNTU NOBLE64 VOL_NOBLE NOBLE
;;
174 ###### end Template for 51-multi-boot ######