move archboot-create-container to archboot-x86_64-create-container

This commit is contained in:
Tobias Powalowski 2022-01-08 09:04:11 +01:00
parent 1a14736bea
commit d9ec40ca3b
4 changed files with 12 additions and 9 deletions

View file

@ -8,7 +8,7 @@ _SAVE_RAM=""
_LINUX_FIRMWARE=""
_DIR=""
LATEST_ARM64="http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz"
AARCH64_ARCHBOOT_FIRMWARE="/etc/archboot/archboot-linux-firmware-latest.tar.zst"
AARCH64_ARCHBOOT_FIRMWARE="https://mirror.rackspace.com/archlinux/iso/archboot/aarch64/firmware/archboot-linux-firmware-latest.tar.zst"
usage () {
echo "CREATE ARCHBOOT CONTAINER"
@ -43,7 +43,7 @@ fi
echo "Starting container creation ..."
if [[ "$(uname -m)" == "x86_64" ]]; then
echo "Downloading archlinuxarm aarch64..."
! [[ -f ArchLinuxARM-aarch64-latest.tar.gz ]] && wget ${LATEST_ARM64}
! [[ -f ArchLinuxARM-aarch64-latest.tar.gz ]] && wget ${LATEST_ARM64} >/dev/null 2>&1
fi
echo "Create directories in ${_DIR} ..."
mkdir "${_DIR}"
@ -69,13 +69,15 @@ systemd-nspawn -D "${_DIR}" pacman -Syu --noconfirm >/dev/null 2>&1
# remove linux hook to speedup
echo "Remove 60-linux-aarch64.hook from container..."
rm "${_DIR}/usr/share/libalpm/hooks/60-linux-aarch64.hook"
echo "Copy archboot-linux-firmware to container..."
cp "${AARCH64_ARCHBOOT_FIRMWARE}" "${_DIR}/"
echo "Download archboot-linux-firmware to container..."
wget -P "${_DIR}/" "${AARCH64_ARCHBOOT_FIRMWARE}" >/dev/null 2>&1
# install archboot-arm
echo "Installing archboot-linux-firmware to container..."
systemd-nspawn -D "${_DIR}" /bin/bash -c "yes | pacman -U /archboot-linux-firmware-latest.tar.zst" >/dev/null 2>&1
echo "Installing archboot-arm container..."
systemd-nspawn -D "${_DIR}" /bin/bash -c "yes | pacman -S archboot-arm" >/dev/null 2>&1
echo "Setting hostname to archboot ..."
systemd-nspawn -D "${_DIR}" /bin/bash -c "echo archboot > /etc/hostname" >/dev/null 2>&1
if [[ "${_SAVE_RAM}" == "1" ]]; then
# clean container from not needed files
echo "Clean container, delete not needed files from ${_DIR} ..."

View file

@ -57,7 +57,7 @@ if [[ "${D_SCRIPTS}" == "1" ]]; then
[[ -e /usr/bin/setup ]] && wget -q "$INSTALLER_SOURCE/archboot-setup.sh?inline=false" -O /usr/bin/setup >/dev/null 2>&1
[[ -e /usr/bin/km ]] && wget -q "$INSTALLER_SOURCE/archboot-km.sh?inline=false" -O /usr/bin/km >/dev/null 2>&1
[[ -e /usr/bin/tz ]] && wget -q "$INSTALLER_SOURCE/archboot-tz.sh?inline=false" -O /usr/bin/tz >/dev/null 2>&1
[[ -e /usr/bin/archboot-create-container.sh ]] && wget -q "$INSTALLER_SOURCE/archboot-create-container.sh?inline=false" -O /usr/bin/archboot-create-container.sh >/dev/null 2>&1
[[ -e /usr/bin/archboot-x86_64-create-container.sh ]] && wget -q "$INSTALLER_SOURCE/archboot-x86_64-create-container.sh?inline=false" -O /usr/bin/archboot-x86_64-create-container.sh >/dev/null 2>&1
[[ -e /usr/bin/archboot-x86_64-release.sh ]] && wget -q "$INSTALLER_SOURCE/archboot-x86_64-release.sh?inline=false" -O /usr/bin/archboot-x86_64-release.sh >/dev/null 2>&1
[[ -e /usr/bin/update-installer.sh ]] && wget -q "$INSTALLER_SOURCE/archboot-update-installer.sh?inline=false" -O /usr/bin/update-installer.sh >/dev/null 2>&1
echo "Finished: Downloading scripts done."
@ -76,13 +76,13 @@ if [[ "${L_COMPLETE}" == "1" || "${L_INSTALL_COMPLETE}" == "1" ]]; then
if [[ "${L_COMPLETE}" == "1" ]]; then
echo "Step 2/6: Generating archboot container in "${W_DIR}" ..."
echo " This will need some time ..."
archboot-create-container.sh "${W_DIR}" -cc -cp -alf >/dev/tty7 2>&1 || exit 1
archboot-x86_64-create-container.sh "${W_DIR}" -cc -cp -alf >/dev/tty7 2>&1 || exit 1
fi
# create container with package cache
if [[ "${L_INSTALL_COMPLETE}" == "1" ]]; then
echo "Step 2/6: Generating archboot container in "${W_DIR}" ..."
echo " This will need some time ..."
archboot-create-container.sh "${W_DIR}" -cc -alf >/dev/tty7 2>&1 || exit 1
archboot-x86_64-create-container.sh "${W_DIR}" -cc -alf >/dev/tty7 2>&1 || exit 1
fi
# generate initrd in container, remove archboot packages from cache, not needed in normal install, umount tmp before generating initrd

View file

@ -92,7 +92,8 @@ if [[ "$(grep "^\[testing" /etc/pacman.conf)" ]]; then
sed -i -e '/^#\[community-testing\]/ { n ; s/^#// }' ${_DIR}/etc/pacman.conf
sed -i -e 's:^#\[testing\]:\[testing\]:g' -e 's:^#\[community-testing\]:\[community-testing\]:g' ${_DIR}/etc/pacman.conf
fi
echo "Setting hostname to archboot ..."
systemd-nspawn -D "${_DIR}" /bin/bash -c "echo archboot > /etc/hostname" >/dev/null 2>&1
if [[ "${_SAVE_RAM}" == "1" ]]; then
# clean container from not needed files
echo "Clean container, delete not needed files from ${_DIR} ..."

View file

@ -25,7 +25,7 @@ echo "Start release creation in $1 ..."
mkdir -p $1
cd $1
# create container
archboot-create-container.sh "${W_DIR}" -cc -cp -alf
archboot-x86_64-create-container.sh "${W_DIR}" -cc -cp -alf
# generate tarball in container, umount tmp it's a tmpfs and weird things could happen then
echo "Generate ISO ..."
systemd-nspawn -q -D "${W_DIR}" /bin/bash -c "umount /tmp;archboot-x86_64-iso.sh -t -i=archrelease"