Add some additional supplemental packages (fw)
This commit is contained in:
parent
b0bd21b4b5
commit
91a2cdf4b6
11
buildiso.sh
11
buildiso.sh
|
@ -99,7 +99,7 @@ prepare_iso() {
|
|||
echo -n "Extracting Debian Live ISO files... "
|
||||
iso_tempdir=$( mktemp -d )
|
||||
sudo mount artifacts/${srcliveisofile} ${iso_tempdir} &>/dev/null || fail "Error mounting Live ISO file."
|
||||
sudo rsync -au --exclude live/filesystem.squashfs ${iso_tempdir}/ ${tempdir}/installer/ &>/dev/null || fail "Error extracting Live ISO files."
|
||||
sudo rsync -a --exclude live/filesystem.squashfs --exclude isolinux/menu.cfg --exclude isolinux/stdmenu.cfg ${iso_tempdir}/ ${tempdir}/installer/ &>/dev/null || fail "Error extracting Live ISO files."
|
||||
sudo umount ${iso_tempdir} &>/dev/null || fail "Error unmounting Live ISO file."
|
||||
rmdir ${iso_tempdir} &>/dev/null
|
||||
echo "done."
|
||||
|
@ -117,6 +117,11 @@ prepare_rootfs() {
|
|||
buster \
|
||||
artifacts/debootstrap/ \
|
||||
http://ftp.ca.debian.org/debian &>debootstrap.log || fail "Error performing debootstrap."
|
||||
# Grab some additional files in non-free
|
||||
sudo wget http://ftp.ca.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_20190114-2_all.deb -O artifacts/debootstrap/var/cache/apt/archives/firmware-bnx2_20190114-2_all.deb
|
||||
sudo chroot artifacts/debootstrap/ dpkg -i /var/cache/apt/archives/firmware-bnx2_20190114-2_all.deb || fail "Error installing supplemental package firmware-bnx2"
|
||||
sudo wget http://ftp.ca.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2x_20190114-2_all.deb -O artifacts/debootstrap/var/cache/apt/archives/firmware-bnx2x_20190114-2_all.deb
|
||||
sudo chroot artifacts/debootstrap/ dpkg -i /var/cache/apt/archives/firmware-bnx2x_20190114-2_all.deb || fail "Error installing supplemental package firmware-bnx2x"
|
||||
if [[ -n ${clean_me} ]]; then
|
||||
sudo chroot artifacts/debootstrap/ apt clean &>/dev/null || fail "Error cleaning apt cache in debootstrap."
|
||||
else
|
||||
|
@ -147,7 +152,7 @@ prepare_rootfs() {
|
|||
fi
|
||||
sudo nice mksquashfs ${tempdir}/rootfs/ artifacts/filesystem.squashfs -e boot &>/dev/null || fail "Error generating squashfs."
|
||||
fi
|
||||
sudo cp artifacts/filesystem.squashfs ${tempdir}/installer/live/filesystem.squashfs &>/dev/null || fail "Error copying squashfs to tempdir."
|
||||
sudo rsync -a artifacts/filesystem.squashfs ${tempdir}/installer/live/filesystem.squashfs &>/dev/null || fail "Error copying squashfs to tempdir."
|
||||
echo "done."
|
||||
}
|
||||
|
||||
|
@ -166,7 +171,7 @@ build_iso() {
|
|||
-iso-level 3 \
|
||||
-o ../${isofilename} \
|
||||
-full-iso9660-filenames \
|
||||
-volid "DEBIAN_CUSTOM" \
|
||||
-volid "PVC_NODE_INSTALLER" \
|
||||
-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
|
||||
-eltorito-boot \
|
||||
isolinux/isolinux.bin \
|
||||
|
|
11
install.sh
11
install.sh
|
@ -9,6 +9,7 @@ logfile="/tmp/pvc-install.log"
|
|||
debrelease="buster"
|
||||
debmirror="http://debian.mirror.rafal.ca/debian"
|
||||
debpkglist="lvm2,parted,gdisk,grub-pc,grub-efi-amd64,linux-image-amd64,sudo,vim,gpg,gpg-agent,aptitude,openssh-server,vlan,ifenslave,python,python2,python3,ca-certificates,ntp"
|
||||
suppkglist="firmware-linux,firmware-linux-nonfree"
|
||||
|
||||
clear
|
||||
|
||||
|
@ -309,6 +310,16 @@ echo -n "Running debootstrap install... "
|
|||
debootstrap --include=${debpkglist} ${debrelease} ${target}/ ${debmirror} >&2
|
||||
echo "done."
|
||||
|
||||
echo -n "Adding non-free repository (firmware, etc.)... "
|
||||
mkdir -p ${target}/etc/apt/sources.list.d/ >&2
|
||||
echo "deb ${debmirror} ${debrelease} contrib non-free" | tee -a ${target}/etc/apt/sources.list.d/non-free.list >&2
|
||||
chroot ${target} apt update >&2
|
||||
echo "done."
|
||||
|
||||
echo -n "Installing supplemental packages... "
|
||||
chroot ${target} apt install -y --no-install-recommends $( sed 's/,/ /g' <<<"${suppkglist}" ) >&2
|
||||
echo "done."
|
||||
|
||||
# Determine the bypath name of the specified system disk
|
||||
for disk in /dev/disk/by-path/*; do
|
||||
bypathlink="$( readlink ${disk} | awk -F'/' '{ print $NF }' )"
|
||||
|
|
Loading…
Reference in New Issue