Update debian-isogen to use ubuntu style interface names

This change allows the resulting debian live cd to use
ubuntu compatible interface names so that network configuration
for ubuntu hosts can be compatible with this debian live cd

This change also adds utilities to support bonding and vlans
as well as a few critical network debugging tools.

Change-Id: Idf07797ca7c2998aaede85e290a330ce3202bf0e
This commit is contained in:
Meadows, Alan (am240k) 2020-03-20 13:10:29 -07:00 committed by Meadows, Alan (am240k)
parent 28c08bfd38
commit b02a323436
3 changed files with 26 additions and 1 deletions

View File

@ -25,6 +25,8 @@ _debootstrap
chroot "${CHROOT}" < "${BASEDIR}/packages_install.sh"
_use_ubuntu_net_device_names
mkdir -p "${CLOUD_DATA_LATEST}"
cp "${BASEDIR}/meta_data.json" "${CLOUD_DATA_LATEST}"
cp "${USER_DATA}" "${CLOUD_DATA_LATEST}/user_data"

View File

@ -23,6 +23,16 @@ function _debootstrap (){
http://ftp.debian.org/debian/
}
function _use_ubuntu_net_device_names (){
# this prioritizes the path policy over slot
# giving ubuntu compatible interface names
cat <<EOF>"${HOME}"/LIVE_BOOT/chroot/usr/lib/systemd/network/99-default.link
[Link]
NamePolicy=kernel database onboard path slot
MACAddressPolicy=persistent
EOF
}
function _make_kernel(){
mkdir -p "${HOME}"/LIVE_BOOT/{scratch,image/live}
mksquashfs \

View File

@ -24,9 +24,22 @@ apt-get update && apt-get install -y --no-install-recommends \
openssh-server \
curl \
gnupg \
iptables
iptables \
ifenslave \
bridge-utils \
tcpdump \
iputils-ping \
vlan
UNSTABLE_REPO="deb http://ftp.debian.org/debian unstable main"
echo "${UNSTABLE_REPO}" >> /etc/apt/sources.list.d/unstable.list
# ensure we support bonding and 802.1q
echo 'bonding' >> /etc/modules
echo '8021q' >> /etc/modules
apt-get update && apt-get install -y --no-install-recommends \
cloud-init
rm -rf /etc/apt/sources.list.d/unstable.list /var/lib/apt/lists/*