Commit d2544f58 authored by Ansgar Schulte's avatar Ansgar Schulte 💬
Browse files

zwischen stand. Mint Autoinstall läuft nicht

parent 369d4f45
Pipeline #1931 failed with stage
in 10 minutes and 25 seconds
#!/bin/bash
OUTPUT_DIR=$1
SNAPS_TO_DOWNLOAD=$2
pushd ${OUTPUT_DIR}/
for snap2install in ${SNAPS_TO_DOWNLOAD}
do
echo download $directory
snap download $snap2install --target-directory ${OUTPUT_DIR}/
mv ${OUTPUT_DIR}/${snap2install}_*.snap ${OUTPUT_DIR}/${snap2install}.snap
mv ${OUTPUT_DIR}/${snap2install}_*.assert ${OUTPUT_DIR}/${snap2install}.assert
done
\ No newline at end of file
snap download $snap2install
mv ${snap2install}_*.snap ${snap2install}.snap
mv ${snap2install}_*.assert ${snap2install}.assert
done
popd
\ No newline at end of file
......@@ -20,6 +20,7 @@ IMAGE_META_NAME="${IMAGE_NAME/\.iso/.release.txt}"
BUILDINFO_LOG="artifacts/buildinfo.log"
ARTIFACTS_DIR="$(pwd)/artifacts"
SNAPS_TO_DOWNLOAD="core20 core gnome-3-28-1804 chromium teams zoom-client skype discord telegram-desktop inkscape"
CASPER_DIR_NAME="casper"
log () {
delimiter="##########"
......@@ -29,6 +30,7 @@ log () {
# Xubuntu
log "installing Xubuntu"
if [ "$USE_XUBUNTU" = true ] ; then
CASPER_DIR_NAME="live"
DOWNLOAD_URL="http://cdimage.ubuntu.com/xubuntu/releases/18.04/release/xubuntu-18.04.5-desktop-amd64.iso"
ISO_FILENAME="${BUILD_DIR}/xubuntu-18.04.5-desktop-amd64.iso"
IMAGE_NAME="heyalter-xubuntu-amd64-${CI_COMMIT_REF_NAME}-${TODAY}-b${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}.iso"
......@@ -37,16 +39,20 @@ if [ "$USE_XUBUNTU" = true ] ; then
# Xubuntu 32 Bit
log "installing Xubuntu 32 Bit"
if [ "$USE_X86" = true ] ; then
CASPER_DIR_NAME="live"
# DOWNLOAD_URL="http://cdimage.ubuntu.com/xubuntu/releases/18.04/release/xubuntu-18.04.5-desktop-i386.iso"
DOWNLOAD_URL="https://altushost-swe.dl.sourceforge.net/project/zorin-os/15/Zorin-OS-15.3-Education-Lite-32-bit.iso"
# DOWNLOAD_URL="https://altushost-swe.dl.sourceforge.net/project/zorin-os/15/Zorin-OS-15.3-Education-Lite-32-bit.iso"
# DOWNLOAD_URL="https://osdn.net/dl/sparkylinux/sparkylinux-5.14-i686-xfce.iso"
# DOWNLOAD_URL="https://sourceforge.net/projects/mx-linux/files/Final/MX-19.3_386.iso/download"
DOWNLOAD_URL="http://mirror.bauhuette.fh-aachen.de/linuxmint-cd/debian/lmde-4-cinnamon-32bit.iso"
# ISO_FILENAME="${BUILD_DIR}/xubuntu-18.04.5-desktop-i386.iso"
ISO_FILENAME="${BUILD_DIR}/Zorin-OS-15.3-Education-Lite-32-bit.iso"
# ISO_FILENAME="${BUILD_DIR}/Zorin-OS-15.3-Education-Lite-32-bit.iso"
ISO_FILENAME="${BUILD_DIR}/lmde-4-cinnamon-32bit.iso"
# ISO_FILENAME="${BUILD_DIR}/sparkylinux-5.14-i686-xfce.iso"
# ISO_FILENAME="${BUILD_DIR}/MX-19.3_386.iso"
# IMAGE_NAME="heyalter-xubuntu-i386-${CI_COMMIT_REF_NAME}-${TODAY}-b${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}.iso"
IMAGE_NAME="heyalter-zorin-i386-${CI_COMMIT_REF_NAME}-${TODAY}-b${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}.iso"
IMAGE_NAME="heyalter-lmde-i386-${CI_COMMIT_REF_NAME}-${TODAY}-b${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}.iso"
# IMAGE_NAME="heyalter-zorin-i386-${CI_COMMIT_REF_NAME}-${TODAY}-b${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}.iso"
# IMAGE_NAME="heyalter-sparky-i386-${CI_COMMIT_REF_NAME}-${TODAY}-b${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}.iso"
# IMAGE_NAME="heyalter-mx-i386-${CI_COMMIT_REF_NAME}-${TODAY}-b${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}.iso"
SNAPS_TO_DOWNLOAD="core18 core chromium skype inkscape"
......@@ -103,10 +109,10 @@ env | grep -e CI_PIPELINE_IID \
log "unsquash squashfs"
# if [ "$USE_XUBUNTU" = true ] ; then
# fakeroot unsquashfs -d ${SQUASHFS_EXTRACTED_DIR} ${ISO_EXTRACTED_DIR}/antiX/linuxfs
# fakeroot unsquashfs -d ${SQUASHFS_EXTRACTED_DIR} ${ISO_EXTRACTED_DIR}/live/filesystem.squashfs
# else
# Default Ubuntu
fakeroot unsquashfs -d ${SQUASHFS_EXTRACTED_DIR} ${ISO_EXTRACTED_DIR}/casper/filesystem.squashfs
# Default Ubuntu
fakeroot unsquashfs -d ${SQUASHFS_EXTRACTED_DIR} ${ISO_EXTRACTED_DIR}/${CASPER_DIR_NAME}/filesystem.squashfs
# fi
#
......@@ -159,10 +165,19 @@ env | grep -e CI_PIPELINE_IID \
cp files/grubdefault ${SQUASHFS_EXTRACTED_DIR}/etc/default/grub
log "Copying our files to the ISO"
mkdir -p ${ISO_EXTRACTED_DIR}/preseed/
cp files/preseed/* ${ISO_EXTRACTED_DIR}/preseed/
cp files/isolinux.cfg ${ISO_EXTRACTED_DIR}/isolinux/isolinux.cfg
rm -f ${ISO_EXTRACTED_DIR}/boot/grub/grub.cfg
cp files/grub.cfg ${ISO_EXTRACTED_DIR}/boot/grub/grub.cfg
if [ "$USE_XUBUNTU" = true ] ; then
cp files/isolinuxmint.cfg ${ISO_EXTRACTED_DIR}/isolinux/isolinux.cfg
cp files/grubmint.cfg ${ISO_EXTRACTED_DIR}/boot/grub/grub.cfg
else
# Default Ubuntu
cp files/isolinux.cfg ${ISO_EXTRACTED_DIR}/isolinux/isolinux.cfg
cp files/grub.cfg ${ISO_EXTRACTED_DIR}/boot/grub/grub.cfg
fi
log "Homedir"
......@@ -206,7 +221,7 @@ env | grep -e CI_PIPELINE_IID \
log "Download Snaps"
./_download_snaps.sh ${ISO_EXTRACTED_DIR}/setup/snaps
./_download_snaps.sh ${ISO_EXTRACTED_DIR}/setup/snaps ${SNAPS_TO_DOWNLOAD}
if [ "$USE_XUBUNTU" != true ] ; then
......@@ -221,14 +236,17 @@ log "copy buildinfo.log to heyalter persistence dir"
cp $BUILDINFO_LOG ${ISO_EXTRACTED_DIR}/heyalter/
log "create squashfs"
chmod +w ${ISO_EXTRACTED_DIR}/casper/filesystem.manifest
fakeroot fakechroot chroot ${SQUASHFS_EXTRACTED_DIR} dpkg-query -W --showformat='${Package} ${Version}\n' > ${ISO_EXTRACTED_DIR}/casper/filesystem.manifest
cp ${ISO_EXTRACTED_DIR}/casper/filesystem.manifest ${ISO_EXTRACTED_DIR}/casper/filesystem.manifest-desktop
sed -i '/ubiquity/d' ${ISO_EXTRACTED_DIR}/casper/filesystem.manifest-desktop
sed -i '/casper/d' ${ISO_EXTRACTED_DIR}/casper/filesystem.manifest-desktop
rm ${ISO_EXTRACTED_DIR}/casper/filesystem.squashfs
mksquashfs ${SQUASHFS_EXTRACTED_DIR} ${ISO_EXTRACTED_DIR}/casper/filesystem.squashfs
printf $(du -sx --block-size=1 ${SQUASHFS_EXTRACTED_DIR} | cut -f1) > ${ISO_EXTRACTED_DIR}/casper/filesystem.size
if [ "$USE_XUBUNTU" = true ] ; then
touch ${ISO_EXTRACTED_DIR}/${CASPER_DIR_NAME}/filesystem.manifest
fi
chmod +w ${ISO_EXTRACTED_DIR}/${CASPER_DIR_NAME}/filesystem.manifest
fakeroot fakechroot chroot ${SQUASHFS_EXTRACTED_DIR} dpkg-query -W --showformat='${Package} ${Version}\n' > ${ISO_EXTRACTED_DIR}/${CASPER_DIR_NAME}/filesystem.manifest
cp ${ISO_EXTRACTED_DIR}/${CASPER_DIR_NAME}/filesystem.manifest ${ISO_EXTRACTED_DIR}/${CASPER_DIR_NAME}/filesystem.manifest-desktop
sed -i '/ubiquity/d' ${ISO_EXTRACTED_DIR}/${CASPER_DIR_NAME}/filesystem.manifest-desktop
sed -i '/casper/d' ${ISO_EXTRACTED_DIR}/${CASPER_DIR_NAME}/filesystem.manifest-desktop
rm ${ISO_EXTRACTED_DIR}/${CASPER_DIR_NAME}/filesystem.squashfs
mksquashfs ${SQUASHFS_EXTRACTED_DIR} ${ISO_EXTRACTED_DIR}/${CASPER_DIR_NAME}/filesystem.squashfs
printf $(du -sx --block-size=1 ${SQUASHFS_EXTRACTED_DIR} | cut -f1) > ${ISO_EXTRACTED_DIR}/${CASPER_DIR_NAME}/filesystem.size
log "prepare mbr"
dd if="$ISO_FILENAME" bs=1 count=446 of="$BUILD_DIR/mbr.bin"
......
if loadfont /boot/grub/font.pf2 ; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
set timeout=5
menuentry "Ubuntu HeyAlter" {
set gfxpayload=keep
linux /liva/vmlinuz file=/cdrom/preseed/ubuntu.seed only-ubiquity auto automatic-ubiquity quiet splash ---
initrd /liva/initrd.lz
}
menuentry "Ubuntu (safe graphics)" {
set gfxpayload=keep
linux /liva/vmlinuz file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash nomodeset ---
initrd /liva/initrd.lz
}
grub_platform
if [ "$grub_platform" = "efi" ]; then
menuentry 'UEFI Firmware Settings' {
fwsetup
}
fi
# D-I config version 2.0
# search path for the c32 support libraries (libcom32, libutil etc.)
default live-install
label live-install
menu label ^Install HeyAlter LMDE 4
kernel /live/vmlinuz
append file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/live/initrd.lz auto automatic-ubiquity quiet splash ---
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment