diff --git a/.gitignore b/.gitignore index e778be5..0f1f509 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /screenlog* /logs *.swp +*.lck diff --git a/lib/07-will_it_blend.func.sh b/lib/07-will_it_blend.func.sh index bc6458f..7938223 100644 --- a/lib/07-will_it_blend.func.sh +++ b/lib/07-will_it_blend.func.sh @@ -43,7 +43,11 @@ function will_it_blend () { local BUILDDIR="${BUILDDIR}${ARCHSUFFIX}" # now let's build the squashed image... and generate some checksums as well to verify download integrity. - rm -rf ${ARCHBOOT} + # are we building split-arch ISOs? + if [[ "${MULTIARCH}" == "n" ]]; + then + rm -rf ${ARCHBOOT} + fi mkdir -p ${ARCHBOOT}/${AIROOT} if [ ! -f "${ARCHBOOT}/${AIROOT}/airootfs.sfs" ] || [ "${CHROOTDIR}/root/.bash_history" -nt "${ARCHBOOT}/${AIROOT}/airootfs.sfs" ]; diff --git a/lib/08-stuffy.func.sh b/lib/08-stuffy.func.sh index 19c8fe6..98f1607 100644 --- a/lib/08-stuffy.func.sh +++ b/lib/08-stuffy.func.sh @@ -59,24 +59,30 @@ EOF # create the embedded efiboot FAT stuff # how big should we make the disk? echo "Generating the EFI embedded FAT filesystem..." - rm -f ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img - FTSIZE=$(du -sc ${TEMPDIR}/{boot,EFI,loader} | tail -n1 | awk '{print $1}') - FATSIZE=$((${FTSIZE} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/prebootloader/PreLoader.efi ))) # now we need to calculate the space for various files we're going to include... - FATSIZE=$((${FTSIZE} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/prebootloader/HashTool.efi))) # now we need to calculate the space for various files we're going to include... - FATSIZE=$((${FTSIZE} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/gummiboot/gummibootx64.efi))) # now we need to calculate the space for various files we're going to include... - FATSIZE=$((${FTSIZE} + $(stat --format="%s" ${TEMPDIR}/EFI/shellx64_v1.efi))) # now we need to calculate the space for various files we're going to include... - FATSIZE=$((${FTSIZE} + $(stat --format="%s" ${TEMPDIR}/EFI/shellx64_v2.efi))) # now we need to calculate the space for various files we're going to include... - FATSIZE=$((${FATSIZE} + 64)) # let's give a little wiggle room - ${RACECAR_CHK}truncate -s "${FATSIZE}"K ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img + # are we building split-arch ISOs? + if [[ "${MULTIARCH}" == "n" ]]; + then + rm -f ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img + fi + # now we need to calculate the space for various files we're going to include... + FATSIZE=$(stat --format="%s" ${TEMPDIR}/boot/${UXNAME}.64.kern) # EFI/BDISK/bdisk.efi + FATSIZE=$((${FATSIZE} + $(stat --format="%s" ${TEMPDIR}/boot/${UXNAME}.64.img))) # EFI/BDISK/bdisk.img + FATSIZE=$((${FATSIZE} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/prebootloader/PreLoader.efi))) # EFI/boot/bootx64.efi + FATSIZE=$((${FATSIZE} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/prebootloader/HashTool.efi))) # EFI/boot/HashTool.efi + FATSIZE=$((${FATSIZE} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/gummiboot/gummibootx64.efi))) # EFI/boot/loader.efi + FATSIZE=$((${FATSIZE} + $(stat --format="%s" ${TEMPDIR}/EFI/shellx64_v1.efi))) + FATSIZE=$((${FATSIZE} + $(stat --format="%s" ${TEMPDIR}/EFI/shellx64_v2.efi))) + FATSIZE=$((${FATSIZE} + $(du -sb ${TEMPDIR}/loader | tail -n1 | awk '{print $1}'))) # loader/* (okay so i cheated a little here.) + FATSIZE=$((${FATSIZE} + 786432)) # let's give a little wiggle room; 768k should do it. -_- + ${RACECAR_CHK}truncate -s "${FATSIZE}" ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img ${RACECAR_CHK}mkfs.vfat -F 32 -n ${DISTNAME}_EFI ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img >> "${LOGFILE}.${FUNCNAME}" 2>&1 - #${RACECAR_CHK}mkfs.vfat -F32 -s2 -n ${DISTNAME}_EFI ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img >> "${LOGFILE}.${FUNCNAME}" 2>&1 mkdir -p ${SRCDIR}/efiboot mount ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img ${SRCDIR}/efiboot mkdir -p ${SRCDIR}/efiboot/EFI/${DISTNAME} cp ${TEMPDIR}/boot/${UXNAME}.64.kern ${SRCDIR}/efiboot/EFI/${DISTNAME}/${UXNAME}.efi cp ${TEMPDIR}/boot/${UXNAME}.64.img ${SRCDIR}/efiboot/EFI/${DISTNAME}/${UXNAME}.img mkdir -p ${SRCDIR}/efiboot/{EFI/boot,loader/entries} - # GETTING DEJA VU HERE. +# GETTING DEJA VU HERE. cat > ${SRCDIR}/efiboot/loader/loader.conf << EOF timeout 3 default ${UXNAME} diff --git a/lib/mk.chroot.sh b/lib/mk.chroot.sh index 957b90d..025d6c9 100755 --- a/lib/mk.chroot.sh +++ b/lib/mk.chroot.sh @@ -157,6 +157,8 @@ EOF # Disable NetworkManager. Fuck that shit. ln -s /dev/null ${i}/etc/systemd/system/NetworkManager.service ln -s /dev/null ${i}/etc/systemd/system/NetworkManager-dispatcher.service + # Remove the machine-id file so it's automatically generated. + rm -f ${i}/etc/machine-id # Prep pacman echo "Prepping ${i}. This will take a while..." echo -n "...Key initializing..."