diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 670fb67..0da37a7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -13,8 +13,8 @@ jobs: - name: Get version run: | - VERSION=$(grep ^KERNEL_VERSION build.sh | head -n1| cut -d = -f2) - REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2) + VERSION=$(egrep ^KERNEL_VERSION build.sh|cut -d= -f2) + REL=$(egrep ^PKGREL build.sh|cut -d= -f2) echo "ver=${VERSION}" >> $GITHUB_ENV echo "release=${REL}" >> $GITHUB_ENV @@ -46,40 +46,34 @@ jobs: - name: Build run: sudo ./build_in_docker.sh - - name: print sha256sum - run: cat output/sha256* - - name: Generate Tag id: tag run: | VER=$(egrep ^KERNEL_VERSION build.sh|cut -d= -f2) - REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2) - echo Version is $VER + REL=$(egrep ^PKGREL build.sh|cut -d= -f2) + echo Version is ${VER}-${REL} echo "kver=${VER}" >> $GITHUB_ENV echo "isotag=${VER}-${REL}" >> $GITHUB_ENV + + - name: Run build script + run: | + chmod +x ${{ github.workspace }}/build_in_docker.sh + ${{ github.workspace }}/build_in_docker.sh - - name: Upload iso artifact + - name: Upload package artifact uses: actions/upload-artifact@v4 with: - name: mbp-ubuntu-${{ steps.tag.outputs.tag }}.z01 - path: ${{ github.workspace }}/output/* + name: Kubuntu-24.04 + path: ${{ github.workspace }}/output/*.iso - - name: Instructions for putting it back together + - name: Remove unsplit ISO run: | - cat << EOF - Download all the artifacts, and put them in a folder - without other files. Then run:" - unzip "*.z??.zip" - cat livecd-${{ env.isotag }}-t2.z?? > cd.zip - echo unzip cd.zip - EOF + sudo rm ${{ github.workspace }}/output/*.iso - name: Release if: github.ref == 'refs/heads/kubuntuLTS' uses: softprops/action-gh-release@v2 with: - #files: ${{ github.workspace }}/ISO/*.tar.gz - #files: ${{ github.workspace }}/ISO/*.iso files: ${{ github.workspace }}/output/* tag_name: v${{ env.isotag }} body_path: ${{ github.workspace }}/.github/workflows/instructions.txt diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 80f4515..0000000 --- a/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -language: bash - -os: - - linux - -services: - - docker - -# branches: -# only: -# - master - -stages: - - test - - build_deploy - -jobs: - include: - - stage: test - name: "YamlLint" - script: | - docker run --rm -v $(pwd):/repo -it alpine:latest /bin/sh -c ' - cd /repo - apk add --no-cache python3 py-pip - pip install yamllint - yamllint . - ' - - stage: test - name: "ShellCheck" - script: | - docker run --rm -v $(pwd):/repo -it alpine:latest /bin/sh -c ' - cd /repo - apk add --no-cache shellcheck bash - shellcheck ./*.sh - shellcheck ./files/*.sh - ' - - stage: build_deploy - name: "Build Ubuntu and Deploy to GitHub Releases" - script: ./build_in_docker.sh - deploy: - provider: releases - api_key: "$GITHUB_TOKEN" - file_glob: true - file: "output/*" - skip_cleanup: true - # yamllint disable-line rule:truthy - on: - tags: true diff --git a/01_build_file_system.sh b/01_build_file_system.sh deleted file mode 100755 index b7999a4..0000000 --- a/01_build_file_system.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -set -eu -o pipefail - -echo >&2 "===]> Info: Checkout bootstrap... " -debootstrap \ - --arch=amd64 \ - --variant=minbase \ - noble \ - "${CHROOT_PATH}" \ - http://archive.ubuntu.com/ubuntu/ - -echo >&2 "===]> Info: Creating chroot environment... " -mount --bind /dev "${CHROOT_PATH}/dev" -mount --bind /run "${CHROOT_PATH}/run" - -cp -r "${ROOT_PATH}/files" "${CHROOT_PATH}/tmp/setup_files" -chroot "${CHROOT_PATH}" /bin/bash -c "KERNEL_VERSION=${KERNEL_VERSION} /tmp/setup_files/chroot_build.sh" - -echo >&2 "===]> Info: Cleanup the chroot environment... " -# In docker there is no run? -#umount "${CHROOT_PATH}/run" -umount "${CHROOT_PATH}/dev" - - -## Copy audio config files -#echo >&2 "===]> Info: Copy audio config files... " -#mkdir -p "${CHROOT_PATH}"/usr/share/alsa/cards/ -#cp -fv "${ROOT_PATH}"/files/audio/AppleT2.conf "${CHROOT_PATH}"/usr/share/alsa/cards/AppleT2.conf -#cp -fv "${ROOT_PATH}"/files/audio/apple-t2.conf "${CHROOT_PATH}"/usr/share/pulseaudio/alsa-mixer/profile-sets/apple-t2.conf -#cp -fv "${ROOT_PATH}"/files/audio/91-pulseaudio-custom.rules "${CHROOT_PATH}"/usr/lib/udev/rules.d/91-pulseaudio-custom.rules -#printf "\n load-module module-combine-sink channels=6 channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe" >> /etc/pulse/default.pa -#printf "\ndefault-sample-channels = 6\nremixing-produce-lfe = yes\nremixing-consume-lfe = yes" >> /etc/pulse/daemon.conf - -### Copy grub config without finding macos partition -echo >&2 "===]> Info: Patch Grub... " -cp -rfv "${ROOT_PATH}"/files/grub/30_os-prober "${CHROOT_PATH}"/etc/grub.d/30_os-prober -chmod 755 "${CHROOT_PATH}"/etc/grub.d/30_os-prober diff --git a/01_edit_iso.sh b/01_edit_iso.sh new file mode 100644 index 0000000..618eac6 --- /dev/null +++ b/01_edit_iso.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -eu -o pipefail +# Prepare the ISO Directories +mkdir -p "$ISO_MOUNT_DIR" "$ISO_WORK_DIR" "$CHROOT_DIR" +# Mount the Original ISO and Copy Files +echo "mounting $ISO_IMAGE" +if [ ! -f "$ISO_IMAGE" ]; then + echo "Error: ISO file $ISO_IMAGE not found." + exit 1 +fi +mount -o loop "$(pwd)/$ISO_IMAGE" "$ISO_MOUNT_DIR" +rsync -a "$ISO_MOUNT_DIR/" "$ISO_WORK_DIR" +umount "$ISO_MOUNT_DIR" +unsquashfs -d "$CHROOT_DIR" "$ISO_WORK_DIR/casper/filesystem.squashfs" +rm "$(pwd)/$ISO_IMAGE" + + diff --git a/02_build_image.sh b/02_build_image.sh deleted file mode 100755 index 07d380e..0000000 --- a/02_build_image.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -set -eu -o pipefail - -echo >&2 "===]> Info: Create image directory and populate it... " -cd "${WORKING_PATH}" - -if [ -d "${IMAGE_PATH}" ]; then - rm -rf "${IMAGE_PATH}" -fi - -mkdir -p "${IMAGE_PATH}"/{casper,install,isolinux} -cp "${CHROOT_PATH}"/boot/vmlinuz-"${KERNEL_VERSION}" "${IMAGE_PATH}"/casper/vmlinuz -cp "${CHROOT_PATH}"/boot/initrd.img-"${KERNEL_VERSION}" "${IMAGE_PATH}"/casper/initrd - -echo >&2 "===]> Info: Grub configuration... " -# we add an empty file to use it with the search command in grub later on. -touch "${IMAGE_PATH}"/ubuntu -cp -r "${ROOT_PATH}"/files/preseed "${IMAGE_PATH}"/preseed -cp "${ROOT_PATH}/files/grub/grub.cfg" "${IMAGE_PATH}"/isolinux/grub.cfg - - -echo >&2 "===]> Info: Compress the chroot... " -cd "${WORKING_PATH}" -mksquashfs "${CHROOT_PATH}" "${IMAGE_PATH}"/casper/filesystem.squashfs -printf "%s" "$(du -sx --block-size=1 "${CHROOT_PATH}" | cut -f1)" >"${IMAGE_PATH}"/casper/filesystem.size - -echo >&2 "===]> Info: Create manifest... " -# shellcheck disable=SC2016 -chroot "${CHROOT_PATH}" dpkg-query -W --showformat='${Package} ${Version}\n' | - tee "${IMAGE_PATH}"/casper/filesystem.manifest -cp -v "${IMAGE_PATH}"/casper/filesystem.manifest "${IMAGE_PATH}"/casper/filesystem.manifest-desktop - -REMOVE='ubiquity casper lupin-casper user-setup discover discover-data os-prober laptop-detect' -for i in $REMOVE; do - sed -i "/${i}/d" "${IMAGE_PATH}"/casper/filesystem.manifest-desktop -done - -echo >&2 "===]> Info: Create diskdefines... " -cat <"${IMAGE_PATH}"/README.diskdefines -#define DISKNAME Kubuntu MBP 24.04 LTS "Noble Numbat" - amd64 -#define TYPE binary -#define TYPEbinary 1 -#define ARCH amd64 -#define ARCHamd64 1 -#define DISKNUM 1 -#define DISKNUM1 1 -#define TOTALNUM 0 -#define TOTALNUM0 1 -EOF diff --git a/02_create_iso.sh b/02_create_iso.sh new file mode 100644 index 0000000..a50f432 --- /dev/null +++ b/02_create_iso.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +set -eu -o pipefail +echo >&2 "===]> Info: Getting Kernel version ... " +echo $T2_KERNEL +# Update GRUB Configuration in ISO +echo >&2 "===]> Info: Copying Linux vmlinuz and initrd ... " +cp "$CHROOT_DIR/boot/vmlinuz-$T2_KERNEL" "$ISO_WORK_DIR/casper/vmlinuz" +cp "$CHROOT_DIR/boot/initrd.img-$T2_KERNEL" "$ISO_WORK_DIR/casper/initrd" + +echo >&2 "===]> Info: Modify existing grub.cfg ..." +sed -i 's/--- quiet splash/boot=casper quiet splash intel_iommu=on iommu=pt pcie_ports=native ---/g' "$ISO_WORK_DIR/boot/grub/grub.cfg" + +echo >&2 "===]> Info: Creating EFI image ... " +dd if=/dev/zero of="$ISO_WORK_DIR/EFI/efiboot.img" bs=1M count=10 +mkfs.vfat "$ISO_WORK_DIR/EFI/efiboot.img" + +mkdir -p /mnt/efiboot +mount "$ISO_WORK_DIR/EFI/efiboot.img" /mnt/efiboot +# Create the EFI/boot directory +mkdir -p /mnt/efiboot/EFI/boot +cp "$ISO_WORK_DIR/EFI/boot/grubx64.efi" /mnt/efiboot/EFI/boot/bootx64.efi +# Clean up EFI temp folders +umount /mnt/efiboot +rmdir /mnt/efiboot +echo >&2 "===]> Info: Generating final ISO ... " +(cd "$ISO_WORK_DIR" && find . -type f -print0 | xargs -0 md5sum > md5sum.txt) + +# Ensure the output directory exists +mkdir -p "$(dirname "$ISO_IMAGE_OUTPUT")" + +xorriso -as mkisofs \ + -iso-level 3 \ + -full-iso9660-filenames \ + -volid "T2-KUBUNTU" \ + -eltorito-boot boot/grub/i386-pc/eltorito.img \ + -no-emul-boot \ + -boot-load-size 4 \ + -boot-info-table \ + -eltorito-alt-boot \ + -eltorito-platform efi \ + -eltorito-boot EFI/efiboot.img \ + -no-emul-boot \ + -isohybrid-gpt-basdat \ + -isohybrid-apm-hfsplus \ + -output ${ISO_IMAGE_OUTPUT} \ + ${ISO_WORK_DIR} + +echo >&2 "===]> Info: Custom ISO creation process complete. Find the ISO at ${ISO_IMAGE_OUTPUT} ..." + + diff --git a/03_prepare_iso.sh b/03_prepare_iso.sh deleted file mode 100755 index 5644107..0000000 --- a/03_prepare_iso.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -set -eu -o pipefail - -echo >&2 "===]> Info: Create ISO Image for a LiveCD... " -cd "${IMAGE_PATH}" - -### Create a grub UEFI image -grub-mkstandalone \ - --format=x86_64-efi \ - --output=isolinux/BOOTx64.EFI \ - --locales="" \ - --fonts="" \ - "boot/grub/grub.cfg=isolinux/grub.cfg" - -### Create a FAT16 UEFI boot disk image containing the EFI bootloader -( - cd isolinux && - dd if=/dev/zero of=efiboot.img bs=1M count=10 && - mkfs.vfat efiboot.img && - LC_CTYPE=C mmd -i efiboot.img EFI EFI/BOOT && - LC_CTYPE=C mcopy -i efiboot.img ./BOOTx64.EFI ::EFI/BOOT/ -) - -### Create a grub BIOS image -grub-mkstandalone \ - --format=i386-pc \ - --output=isolinux/core.img \ - --install-modules="linux16 linux normal iso9660 biosdisk memdisk search tar ls" \ - --modules="linux16 linux normal iso9660 biosdisk search" \ - --locales="" \ - --fonts="" \ - "boot/grub/grub.cfg=isolinux/grub.cfg" - -### Combine a bootable grub cdboot.img -cat "/usr/lib/grub/i386-pc/cdboot.img" "${IMAGE_PATH}/isolinux/core.img" \ - >"${IMAGE_PATH}/isolinux/bios.img" diff --git a/04_create_iso.sh b/04_create_iso.sh deleted file mode 100755 index b590347..0000000 --- a/04_create_iso.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -set -eu -o pipefail - -cd "${IMAGE_PATH}" -### Generate md5sum.txt. Generate it two times, to get the own checksum right. -(find . -type f -print0 | xargs -0 md5sum >"${IMAGE_PATH}/md5sum.txt") - - -echo >&2 "===]> Info: Create Isolinux... " -xorriso -as mkisofs \ - -iso-level 3 \ - -full-iso9660-filenames \ - -volid "KUBUNTU_MBP" \ - -b boot/grub/bios.img \ - -no-emul-boot \ - -boot-load-size 4 \ - -boot-info-table \ - -c boot/grub/boot.cat \ - --grub2-boot-info \ - --grub2-mbr "/usr/lib/grub/i386-pc/boot_hybrid.img" \ - -eltorito-alt-boot \ - -e "EFI/efiboot.img" \ - -no-emul-boot \ - -isohybrid-mbr "${ROOT_PATH}/files/isohdpfx.bin" \ - -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \ - -output "${ROOT_PATH}/kubuntu-24.04-${KERNEL_VERSION}.iso" \ - -graft-points \ - "." \ - /boot/grub/bios.img=isolinux/bios.img \ - /EFI/efiboot.img=isolinux/efiboot.img diff --git a/build.sh b/build.sh index d1726a0..c82f4d4 100755 --- a/build.sh +++ b/build.sh @@ -1,96 +1,94 @@ #!/bin/bash -set -eu -o pipefail -ROOT_PATH=$(pwd) -WORKING_PATH=/root/work -CHROOT_PATH="${WORKING_PATH}/chroot" -IMAGE_PATH="${WORKING_PATH}/image" -KERNEL_VERSION=6.11.8 +set -eu -o pipefail +ROOT_PATH=$(pwd)/work +OUTPUT_PATH=$(pwd)/output +ISO_MOUNT_DIR="$ROOT_PATH/kubuntu-original" # Temporary mount point for the original ISO +VER=24.04 +CODENAME=noble +KERNEL_VERSION=6.11.7 PKGREL=1 -sed -i "s/KVER/${KERNEL_VERSION}/g" $(pwd)/files/chroot_build.sh -sed -i "s/PREL/${PKGREL}/g" $(pwd)/files/chroot_build.sh -if [ -d "$WORKING_PATH" ]; then - rm -rf "$WORKING_PATH" -fi -mkdir -p "$WORKING_PATH" -if [ -d "${ROOT_PATH}/output" ]; then - rm -rf "${ROOT_PATH}/output" -fi -mkdir -p "${ROOT_PATH}/output" +ISO_IMAGE=kubuntu-24.04.1-desktop-amd64.iso +ISO_IMAGE_OUTPUT="${OUTPUT_PATH}/kubuntu-${VER}-${KERNEL_VERSION}-t2-${CODENAME}.iso" -echo >&2 "===]> Info: Build dependencies... " -export DEBIAN_FRONTEND=noninteractive -apt-get update -apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ - binutils \ - debootstrap \ - squashfs-tools \ - xorriso \ - grub-pc-bin \ - grub-efi-amd64-bin \ - mtools \ - dosfstools \ - zip \ - isolinux \ - syslinux +ISO_WORK_DIR="$ROOT_PATH/kubuntu-iso" +CHROOT_DIR="$ROOT_PATH/kubuntu-edit" -echo >&2 "===]> Info: Start loop... " -for ALTERNATIVE in t2-noble -do - echo >&2 "===]> Info: Start building ${ALTERNATIVE}... " +echo "ROOT_PATH=$ROOT_PATH" +echo "ISO_MOUNT_DIR=$ISO_MOUNT_DIR" +echo "ISO_WORK_DIR=$ISO_WORK_DIR" +echo "CHROOT_DIR=$CHROOT_DIR" - echo >&2 "===]> Info: Build Kubuntu Noble... " - /bin/bash -c " - ROOT_PATH=${ROOT_PATH} \\ - WORKING_PATH=${WORKING_PATH} \\ - CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\ - IMAGE_PATH=${IMAGE_PATH} \\ - KERNEL_VERSION=${KERNEL_VERSION}-${PKGREL}-${ALTERNATIVE} \\ - ALTERNATIVE=${ALTERNATIVE} \\ - ${ROOT_PATH}/01_build_file_system.sh - " +mkdir -p "$ROOT_PATH" +mkdir -p "$ISO_WORK_DIR" +mkdir -p "$CHROOT_DIR" +mkdir -p "$(dirname "$ISO_IMAGE_OUTPUT")" +touch "$ISO_IMAGE_OUTPUT" - echo >&2 "===]> Info: Build Image Noble... " - /bin/bash -c " - ROOT_PATH=${ROOT_PATH} \\ - WORKING_PATH=${WORKING_PATH} \\ - CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\ - IMAGE_PATH=${IMAGE_PATH} \\ - KERNEL_VERSION=${KERNEL_VERSION}-${PKGREL}-${ALTERNATIVE} \\ - ALTERNATIVE=${ALTERNATIVE} \\ - ${ROOT_PATH}/02_build_image.sh - " +echo >&2 "===]> Info: Installing required packages..." +apt update && apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -y tzdata \ + && apt install -y util-linux rsync squashfs-tools grub-pc-bin grub-common \ + xorriso isolinux grub-efi-amd64-bin mtools dosfstools curl - echo >&2 "===]> Info: Prepare Boot for ISO... " - /bin/bash -c " - IMAGE_PATH=${IMAGE_PATH} \\ - CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\ - ${ROOT_PATH}/03_prepare_iso.sh - " +echo >&2 "===]> Info: Download ISO..." - echo >&2 "===]> Info: Create ISO... " - /bin/bash -c " +curl -L -o "$(pwd)/${ISO_IMAGE}" "https://cdimage.ubuntu.com/kubuntu/releases/${VER}/release/${ISO_IMAGE}" + +# Run entrypoint.sh to extract and customize the ISO +echo >&2 "===]> Info: Starting extraction and customization..." +/bin/bash -c " + ISO_IMAGE=${ISO_IMAGE} \\ + ISO_MOUNT_DIR=${ISO_MOUNT_DIR} \\ + ISO_WORK_DIR=${ISO_WORK_DIR} \\ + CHROOT_DIR=${CHROOT_DIR} \\ ROOT_PATH=${ROOT_PATH} \\ - IMAGE_PATH=${IMAGE_PATH} \\ - CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\ - KERNEL_VERSION=${KERNEL_VERSION}-${ALTERNATIVE} \\ - ALTERNATIVE=${ALTERNATIVE} \\ - ${ROOT_PATH}/04_create_iso.sh - " - livecd_exitcode=$? - if [ "${livecd_exitcode}" -ne 0 ]; then - echo "Error building ${KERNEL_VERSION}-${ALTERNATIVE}" - exit "${livecd_exitcode}" - fi - ## Split iso into multiple parts - github max size of release attachment is 2GB, where ISO is sometimes bigger than that - cd "${ROOT_PATH}" - split -b 1500M -x "${ROOT_PATH}/kubuntu-24.04-${KERNEL_VERSION}-${ALTERNATIVE}.iso" "${ROOT_PATH}/output/kubuntu-24.04-${KERNEL_VERSION}-${ALTERNATIVE}.iso." -done -## Calculate sha256 sums of built ISO -sha256sum "${ROOT_PATH}"/*.iso >"${ROOT_PATH}/output/sha256-kubuntu-24.04" + KERNEL_VERSION=${KERNEL_VERSION} \\ + $(pwd)/01_edit_iso.sh" + +# Enter the Chroot Environment and Apply Customizations +echo >&2 "===]> Info: Creating chroot environment... " +# Mount Required Filesystems for Chroot +mount --bind /dev "${CHROOT_DIR}/dev" +mount --bind /dev/pts "${CHROOT_DIR}/dev/pts" +mount --bind /proc "${CHROOT_DIR}/proc" +mount --bind /sys "${CHROOT_DIR}/sys" -find ./ | grep ".iso" -#find ./ | grep ".zip" +mkdir -p "${CHROOT_DIR}/tmp/setup_files" +#rm -f "${CHROOT_DIR}/etc/resolv.conf" +#make a back up +cp -p "${CHROOT_DIR}/etc/resolv.conf" "${CHROOT_DIR}/etc/resolv.conf.backup" +cp -p /etc/resolv.conf "${CHROOT_DIR}/etc/resolv.conf" +cp "$(pwd)/chroot_iso.sh" "${CHROOT_DIR}/tmp/setup_files" +ls "${CHROOT_DIR}/tmp/setup_files" +echo >&2 "===]> Info: Running chroot environment... " +chroot "${CHROOT_DIR}" /bin/bash -c "KERNEL_VERSION=${KERNEL_VERSION} PKGREL=${PKGREL} /tmp/setup_files/chroot_iso.sh" +echo >&2 "===]> Info: Getting Kernel environment... " +T2_KERNEL=${KERNEL_VERSION}-${PKGREL}-t2-${CODENAME} + +echo >&2 "===]> Info: Cleanup the chroot environment... " +# restore backup +cp -p "${CHROOT_DIR}/etc/resolv.conf.backup" "${CHROOT_DIR}/etc/resolv.conf" +umount "${CHROOT_DIR}/dev/pts" +umount "${CHROOT_DIR}/dev" +umount "${CHROOT_DIR}/proc" +umount "${CHROOT_DIR}/sys" + +echo >&2 "===]> Info: Squashing Kubuntu file system ... " +mksquashfs "$CHROOT_DIR" "$ISO_WORK_DIR/casper/filesystem.squashfs" -comp xz -noappend + +# Run create_iso.sh to generate the new ISO +# echo "Creating the custom ISO..." +echo >&2 "===]> Info: Creating iso ... " +/bin/bash -c " + ISO_WORK_DIR=${ISO_WORK_DIR} \\ + CHROOT_DIR=${CHROOT_DIR} \\ + ISO_IMAGE_OUTPUT=${ISO_IMAGE_OUTPUT} \\ + ROOT_PATH=${ROOT_PATH} \\ + T2_KERNEL=${T2_KERNEL} \\ + $(pwd)/02_create_iso.sh" +# split iso -exit "${livecd_exitcode}" +split -b 1500M -x "${OUTPUT_PATH}/kubuntu-${VER}-${KERNEL_VERSION}-t2-${CODENAME}.iso" "${OUTPUT_PATH}/kubuntu-${VER}-${KERNEL_VERSION}-t2-${CODENAME}.iso." +sha256sum "${OUTPUT_PATH}"/*.iso > "${OUTPUT_PATH}/sha256-kubuntu-${VER}" diff --git a/build_in_docker.sh b/build_in_docker.sh index 3152bd5..9ddf029 100755 --- a/build_in_docker.sh +++ b/build_in_docker.sh @@ -4,7 +4,9 @@ set -eu -o pipefail DOCKER_IMAGE=ubuntu:24.04 +echo "DOCKER_IMAGE=${DOCKER_IMAGE}" docker pull ${DOCKER_IMAGE} + docker run \ --privileged \ --rm \ @@ -12,3 +14,4 @@ docker run \ -v "$(pwd)":/repo \ ${DOCKER_IMAGE} \ /bin/bash -c 'cd /repo && ./build.sh' + diff --git a/chroot_iso.sh b/chroot_iso.sh new file mode 100644 index 0000000..76b20cb --- /dev/null +++ b/chroot_iso.sh @@ -0,0 +1,47 @@ +#!/bin/bash +set -eu -o pipefail + +echo >&2 "===]> Info: Configure and update apt... " + +apt update +apt install -y curl +# Add T2 Repository and Install Packages +CODENAME=$(lsb_release -cs) +curl -s --compressed "https://adityagarg8.github.io/t2-ubuntu-repo/KEY.gpg" | gpg --dearmor | tee /etc/apt/trusted.gpg.d/t2-ubuntu-repo.gpg >/dev/null +curl -s --compressed -o /etc/apt/sources.list.d/t2.list "https://adityagarg8.github.io/t2-ubuntu-repo/t2.list" +echo "deb [signed-by=/etc/apt/trusted.gpg.d/t2-ubuntu-repo.gpg] https://github.com/AdityaGarg8/t2-ubuntu-repo/releases/download/${CODENAME} ./" | tee -a /etc/apt/sources.list.d/t2.list + +apt update + +# Add Kernel Parameters to GRUB for Installed System +sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on iommu=pt pcie_ports=native"/' /etc/default/grub +update-grub +apt install -y apple-t2-audio-config apple-firmware-script +apt install -y linux-t2=${KERNEL_VERSION}-${PKGREL}-${CODENAME} + +# Add udev Rule for AMD GPU Power Management +#cat < /etc/udev/rules.d/30-amdgpu-pm.rules +#KERNEL=="card[012]", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power_dpm_force_performance_level}="low" +#EOF + +KERNEL_VERSION=$(dpkg -l | grep -E "^ii linux-image-[0-9]+\.[0-9]+\.[0-9\.\-]+-generic" | awk '{print $2}' | sed 's/linux-image-\(.*\)-generic/\1/') +#apt purge -y -qq \ +# linux-generic \ +# linux-headers-${KERNEL_VERSION} \ +# linux-headers-${KERNEL_VERSION}-generic \ +# linux-headers-generic \ +# linux-image-${KERNEL_VERSION}-generic \ +# linux-image-generic \ +# linux-modules-${KERNEL_VERSION}-generic \ +# linux-modules-extra-${KERNEL_VERSION}-generic + +# Clean up +#apt-get autoremove -y +apt clean +rm -rf /var/cache/apt/archives/* +rm -rf /tmp/* ~/.bash_history +rm -rf /tmp/setup_files + + + + diff --git a/files/audio/91-pulseaudio-custom.rules b/files/audio/91-pulseaudio-custom.rules deleted file mode 100644 index 33c2d91..0000000 --- a/files/audio/91-pulseaudio-custom.rules +++ /dev/null @@ -1,7 +0,0 @@ -SUBSYSTEM!="sound", GOTO="pulseaudio_end" -ACTION!="change", GOTO="pulseaudio_end" -KERNEL!="card*", GOTO="pulseaudio_end" - -SUBSYSTEMS=="pci", ATTRS{vendor}=="0x106b", ATTRS{device}=="0x1803", ENV{PULSE_PROFILE_SET}="apple-t2.conf" - -LABEL="pulseaudio_end" diff --git a/files/audio/AppleT2.conf b/files/audio/AppleT2.conf deleted file mode 100644 index 527492a..0000000 --- a/files/audio/AppleT2.conf +++ /dev/null @@ -1,103 +0,0 @@ - - -AppleT2.pcm.default { - @args [ CARD ] - @args.CARD { - type string - } - type asym - playback.pcm { - type plug - ttable { - 0.0= 1 - 1.3= 1 - 2.1= 1 - 3.4= 1 - 4.0= 1 - 5.5= 1 - } - slave { - pcm { - type hw - card $CARD - device 0 - } - channels 6 - } - } - capture.pcm { - type plug - slave.pcm { - type hw - card $CARD - device 1 - } - } - hint.device_output 0 - hint.device_input 1 -} - -AppleT2.pcm.front.0 { - @args [ CARD ] - @args.CARD { - type string - } - type asym - playback.pcm { - type plug - ttable { - 0.0= 1 - 1.3= 1 - 2.1= 1 - 3.4= 1 - 4.0= 1 - 5.5= 1 - } - slave { - pcm { - type hw - card $CARD - device 0 - } - channels 6 - } - } - capture.pcm { - type plug - slave.pcm { - type hw - card $CARD - device 1 - } - } - hint.device_output 0 - hint.device_input 1 -} -AppleT2.pcm.front.1 { - @args [ CARD ] - @args.CARD { - type string - } - type asym - playback.pcm { - type hw - card $CARD - device 2 - } - capture.pcm { - type hw - card $CARD - device 3 - } - hint.device_output 2 - hint.device_input 3 -} -AppleT2.pcm.front.2 { - @args [ CARD ] - @args.CARD { - type string - } - type hw - card $CARD - device 4 -} diff --git a/files/audio/apple-t2.conf b/files/audio/apple-t2.conf deleted file mode 100644 index 51045f2..0000000 --- a/files/audio/apple-t2.conf +++ /dev/null @@ -1,55 +0,0 @@ -[General] -auto-profiles = no - -[Mapping builtin-speaker] -description = Built-in Speaker -device-strings = front:%f -paths-output = builtin-speaker-output -channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe -priority = 100 -direction = output - -[Mapping builtin-mic] -description = Built-in Mic -device-strings = front:%f -paths-output = builtin-mic-input -channel-map = left,center,right -priority = 100 -direction = input - -[Mapping codec-output] -description = Headphone -device-strings = front:%f,1 -paths-output = codec-output -channel-map = left,right -priority = 100 -direction = output - -[Mapping codec-input] -description = Headphone Mic -device-strings = front:%f,1 -paths-output = codec-input -channel-map = mono -priority = 100 -direction = input - -[Profile output:builtin-speaker+input:builtin-mic] -description = Built-in Speaker + Built-in Mic -output-mappings = builtin-speaker -input-mappings = builtin-mic -skip-probe = yes - -[Profile output:codec-output+input:builtin-mic] -description = Headphones + Built-in Mic -output-mappings = codec-output -input-mappings = builtin-mic - -[Profile output:codec-output+input:codec-input] -description = Headphones + External Mic -output-mappings = codec-output -input-mappings = codec-input - -[Profile output:builtin-speaker+input:codec-input] -description = Built-in Speaker + External Mic -output-mappings = builtin-speaker -input-mappings = codec-input diff --git a/files/chroot_build.sh b/files/chroot_build.sh deleted file mode 100755 index af8c4b4..0000000 --- a/files/chroot_build.sh +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash - -set -eu -o pipefail - -CODENAME=noble - -echo >&2 "===]> Info: Configure environment... " - -mount none -t proc /proc -mount none -t sysfs /sys -mount none -t devpts /dev/pts - -export HOME=/root -export LC_ALL=C - -echo "kubuntu-${CODENAME}-live" >/etc/hostname - -echo >&2 "===]> Info: Configure and update apt... " - -cat </etc/apt/sources.list -deb http://archive.ubuntu.com/ubuntu/ ${CODENAME} main restricted universe multiverse -deb-src http://archive.ubuntu.com/ubuntu/ ${CODENAME} main restricted universe multiverse -deb http://archive.ubuntu.com/ubuntu/ ${CODENAME}-security main restricted universe multiverse -deb-src http://archive.ubuntu.com/ubuntu/ ${CODENAME}-security main restricted universe multiverse -deb http://archive.ubuntu.com/ubuntu/ ${CODENAME}-updates main restricted universe multiverse -deb-src http://archive.ubuntu.com/ubuntu/ ${CODENAME}-updates main restricted universe multiverse -EOF -apt-get update - -echo >&2 "===]> Info: Install systemd and Ubuntu MBP Repo... " - -apt-get install -y systemd-sysv gnupg curl wget - -mkdir -p /etc/apt/sources.list.d -curl -s --compressed "https://adityagarg8.github.io/t2-ubuntu-repo/KEY.gpg" | gpg --dearmor | tee /etc/apt/trusted.gpg.d/t2-ubuntu-repo.gpg >/dev/null -curl -s --compressed -o /etc/apt/sources.list.d/t2.list "https://adityagarg8.github.io/t2-ubuntu-repo/t2.list" -echo "deb [signed-by=/etc/apt/trusted.gpg.d/t2-ubuntu-repo.gpg] https://github.com/AdityaGarg8/t2-ubuntu-repo/releases/download/${CODENAME} ./" | tee -a /etc/apt/sources.list.d/t2.list -apt-get update - -echo >&2 "===]> Info: Configure machine-id and divert... " - -dbus-uuidgen >/etc/machine-id -ln -fs /etc/machine-id /var/lib/dbus/machine-id -dpkg-divert --local --rename --add /sbin/initctl -ln -s /bin/true /sbin/initctl - -echo >&2 "===]> Info: Install packages needed for Live System... " - -export DEBIAN_FRONTEND=noninteractive -apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ - kde-standard \ - sudo \ - casper \ - discover \ - laptop-detect \ - os-prober \ - network-manager \ - resolvconf \ - net-tools \ - wireless-tools \ - locales \ - initramfs-tools \ - binutils \ - linux-generic \ - linux-headers-generic \ - grub-efi-amd64-signed \ - intel-microcode \ - thermald \ - grub2 \ - nautilus-admin \ - software-properties-common - -#curl -L https://github.com/t2linux/T2-Ubuntu-Kernel/releases/download/vKVER-PREL/linux-headers-KVER-${ALTERNATIVE}_KVER-PREL_amd64.deb > /tmp/headers.deb -#curl -L https://github.com/t2linux/T2-Ubuntu-Kernel/releases/download/vKVER-PREL/linux-image-KVER-${ALTERNATIVE}_KVER-PREL_amd64.deb > /tmp/image.deb -#file /tmp/* -#apt install /tmp/headers.deb /tmp/image.deb - -echo >&2 "===]> Info: Install the T2 kernel... " - -apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ - linux-t2=KVER-PREL-${CODENAME} - -echo >&2 "===]> Info: Install window manager... " - -apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ - plymouth-theme-spinner \ - plymouth-theme-kubuntu-logo \ - plymouth-theme-kubuntu-text \ - plymouth-theme-ubuntu-text \ - kde-plasma-desktop \ - kubuntu-desktop \ - kubuntu-settings-desktop \ - kubuntu-wallpapers \ - kde-plasma-desktop \ - sddm-theme-breeze \ - snapd \ - software-properties-common \ - -echo >&2 "===]> Info: Install Graphical installer... " - -apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ - ubiquity \ - ubiquity-casper \ - ubiquity-frontend-gtk \ - ubiquity-slideshow-kubuntu \ - ubiquity-ubuntu-artwork - -echo >&2 "===]> Info: Install useful applications and sound configuration... " - -apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ - git \ - curl \ - nano \ - make \ - gcc \ - dkms \ - gdisk \ - apple-t2-audio-config \ - apple-firmware-script - -echo >&2 "===]> Info: Change initramfs format (for grub)... " -sed -i "s/COMPRESS=lz4/COMPRESS=gzip/g" "/etc/initramfs-tools/initramfs.conf" - -echo >&2 "===]> Info: Configure drivers... " - -# thunderbolt is working for me. -#printf '\nblacklist thunderbolt' >>/etc/modprobe.d/blacklist.conf - -printf 'apple-bce' >>/etc/modules-load.d/t2.conf -#printf '\n### apple-bce start ###\nsnd\nsnd_pcm\napple-bce\n### apple-bce end ###' >>/etc/initramfs-tools/modules -#printf '\n# display f* key in touchbar\noptions apple-ib-tb fnmode=1\n' >> /etc/modprobe.d/apple-tb.conf -#printf '\n# delay loading of the touchbar driver\ninstall apple-ib-tb /bin/sleep 7; /sbin/modprobe --ignore-install apple-ib-tb' >> /etc/modprobe.d/delay-tb.conf - -echo >&2 "===]> Info: Update initramfs... " - -## Add custom drivers to be loaded at boot -/usr/sbin/depmod -a "${KERNEL_VERSION}" -update-initramfs -u -v -k "${KERNEL_VERSION}" - -echo >&2 "===]> Info: Remove unused applications ... " - -apt-get purge -y -qq \ - transmission-gtk \ - transmission-common \ - gnome-mahjongg \ - gnome-mines \ - gnome-sudoku \ - aisleriot \ - hitori \ - xiterm+thai \ - vim \ - linux-generic \ - linux-headers-6.8.0-31 \ - linux-headers-6.8.0-31-generic \ - linux-headers-generic \ - linux-image-6.8.0-31-generic \ - linux-image-generic \ - linux-modules-6.8.0-31-generic \ - linux-modules-extra-6.8.0-31-generic \ - sddm-theme-debian-maui \ - gedit - -apt-get autoremove -y - -echo >&2 "===]> Info: Reconfigure environment ... " - -locale-gen --purge en_US.UTF-8 en_US -printf 'LANG="C.UTF-8"\nLANGUAGE="C.UTF-8"\n' >/etc/default/locale - -cat </etc/NetworkManager/NetworkManager.conf -[main] -plugins=ifupdown,keyfile - -[ifupdown] -managed=false - -[device] -wifi.scan-rand-mac-address=no -EOF -dpkg-reconfigure network-manager - -echo >&2 "===]> Info: Configure Network Manager to use iwd... " -mkdir -p /etc/NetworkManager/conf.d -printf '#[device]\n#wifi.backend=iwd\n' > /etc/NetworkManager/conf.d/wifi_backend.conf -#systemctl enable iwd.service - -echo >&2 "===]> Info: Cleanup the chroot environment... " - -truncate -s 0 /etc/machine-id -rm /sbin/initctl -dpkg-divert --rename --remove /sbin/initctl -apt-get clean -rm -rf /tmp/* ~/.bash_history -rm -rf /tmp/setup_files - -umount -lf /dev/pts -umount -lf /sys -umount -lf /proc - -export HISTSIZE=0 diff --git a/files/grub/30_os-prober b/files/grub/30_os-prober deleted file mode 100644 index 1ec418d..0000000 --- a/files/grub/30_os-prober +++ /dev/null @@ -1,326 +0,0 @@ -#!/usr/bin/sh -set -e - -# grub-mkconfig helper script. -# Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc. -# -# GRUB is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# GRUB is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GRUB. If not, see . - -prefix="/usr" -exec_prefix="/usr" -datarootdir="/usr/share" - -export TEXTDOMAIN=grub -export TEXTDOMAINDIR="${datarootdir}/locale" - -. "$pkgdatadir/grub-mkconfig_lib" - -if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then - exit 0 -fi - -if [ -z "`which os-prober 2> /dev/null`" ] || [ -z "`which linux-boot-prober 2> /dev/null`" ] ; then - # missing os-prober and/or linux-boot-prober - exit 0 -fi - -OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`" -if [ -z "${OSPROBED}" ] ; then - # empty os-prober output, nothing doing - exit 0 -fi - -osx_entry() { - found_other_os=1 - # TRANSLATORS: it refers on the OS residing on device %s - onstr="$(gettext_printf "(on %s)" "${DEVICE}")" - hints="" - for hint in `"${grub_probe}" --device ${device} --target=efi_hints 2> /dev/null` ; do - hints="${hints} --hint=${hint}" - done - cat << EOF -menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${DEVICE}")' { -EOF - save_default_entry | grub_add_tab - prepare_grub_to_access_device ${DEVICE} | grub_add_tab - cat << EOF - set gfxpayload=keep - load_video - insmod part_gpt - insmod hfsplus - search --no-floppy --fs-uuid --set=root ${hints} $(grub_get_device_id "${DEVICE}") - chainloader (\$root)/System/Library/CoreServices/boot.efi - boot -} -EOF -} - -used_osprober_linux_ids= - -for OS in ${OSPROBED} ; do - DEVICE="`echo ${OS} | cut -d ':' -f 1`" - LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`" - LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`" - BOOT="`echo ${OS} | cut -d ':' -f 4`" - if UUID="`${grub_probe} --target=fs_uuid --device ${DEVICE%@*}`"; then - EXPUUID="$UUID" - - if [ x"${DEVICE#*@}" != x ] ; then - EXPUUID="${EXPUUID}@${DEVICE#*@}" - fi - - if [ "x${GRUB_OS_PROBER_SKIP_LIST}" != "x" ] && [ "x`echo ${GRUB_OS_PROBER_SKIP_LIST} | grep -i -e '\b'${EXPUUID}'\b'`" != "x" ] ; then - echo "Skipped ${LONGNAME} on ${DEVICE} by user request." >&2 - continue - fi - fi - - BTRFS="`echo ${OS} | cut -d ':' -f 5`" - if [ "x$BTRFS" = "xbtrfs" ]; then - BTRFSuuid="`echo ${OS} | cut -d ':' -f 6`" - BTRFSsubvol="`echo ${OS} | cut -d ':' -f 7`" - fi - - if [ -z "${LONGNAME}" ] ; then - LONGNAME="${LABEL}" - fi - - # os-prober returns text string followed by optional counter - CLASS="--class $(echo "${LABEL}" | LC_ALL=C sed 's,[[:digit:]]*$,,' | cut -d' ' -f1 | tr 'A-Z' 'a-z' | LC_ALL=C sed 's,[^[:alnum:]_],_,g')" - - gettext_printf "Found %s on %s\n" "${LONGNAME}" "${DEVICE}" >&2 - - case ${BOOT} in - chain) - found_other_os=1 - - onstr="$(gettext_printf "(on %s)" "${DEVICE}")" - cat << EOF -menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' $CLASS --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' { -EOF - save_default_entry | grub_add_tab - prepare_grub_to_access_device ${DEVICE} | grub_add_tab - - if [ x"`${grub_probe} --device ${DEVICE} --target=partmap`" = xmsdos ]; then - cat << EOF - parttool \${root} hidden- -EOF - fi - - case ${LONGNAME} in - Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*) - ;; - *) - cat << EOF - drivemap -s (hd0) \${root} -EOF - ;; - esac - - cat < /dev/null; do - counter=$((counter+1)); - done - if [ -z "$boot_device_id" ]; then - boot_device_id="$(grub_get_device_id "${DEVICE}")" - fi - used_osprober_linux_ids="$used_osprober_linux_ids 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id'" - - if [ -z "${prepare_boot_cache}" ]; then - prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | grub_add_tab)" - fi - - if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then - cat << EOF -menuentry '$(echo "$OS $onstr" | grub_quote)' $CLASS --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' { -EOF - save_default_entry | grub_add_tab - printf '%s\n' "${prepare_boot_cache}" - cat << EOF - linux ${LKERNEL} ${LPARAMS} -EOF - if [ -n "${LINITRD}" ] ; then - cat << EOF - initrd ${LINITRD} -EOF - fi - cat << EOF -} -EOF - echo "submenu '$(gettext_printf "Advanced options for %s" "${OS} $onstr" | grub_quote)' \$menuentry_id_option 'osprober-gnulinux-advanced-$boot_device_id' {" - is_top_level=false - fi - title="${LLABEL} $onstr" - cat << EOF - menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-$LKERNEL-${recovery_params}-$boot_device_id' { -EOF - save_default_entry | sed -e "s/^/$grub_tab$grub_tab/" - printf '%s\n' "${prepare_boot_cache}" | grub_add_tab - cat << EOF - linux ${LKERNEL} ${LPARAMS} -EOF - if [ -n "${LINITRD}" ] ; then - cat << EOF - initrd ${LINITRD} -EOF - fi - cat << EOF - } -EOF - if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then - replacement_title="$(echo "Advanced options for ${OS} $onstr" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')" - quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)" - title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;" - grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")" - fi - done - if [ x"$is_top_level" != xtrue ]; then - echo '}' - fi - echo "$title_correction_code" - ;; - macosx) - # for subdevice in ${DEVICE%[[:digit:]]*}* ; do - # parttype="`"${grub_probe}" --device ${device} --target=gpt_parttype "${subdevice}" 2> /dev/null`" - # if [[ "$parttype" = "426f6f74-0000-11aa-aa11-00306543ecac" ]]; then - # DEVICE="${subdevice}" osx_entry - # fi - # done - ;; - hurd) - found_other_os=1 - onstr="$(gettext_printf "(on %s)" "${DEVICE}")" - cat << EOF -menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class hurd --class gnu --class os \$menuentry_id_option 'osprober-gnuhurd-/boot/gnumach.gz-false-$(grub_get_device_id "${DEVICE}")' { -EOF - save_default_entry | grub_add_tab - prepare_grub_to_access_device ${DEVICE} | grub_add_tab - grub_device="`${grub_probe} --device ${DEVICE} --target=drive`" - mach_device="`echo "${grub_device}" | sed -e 's/(\(hd.*\),msdos\(.*\))/\1s\2/'`" - grub_fs="`${grub_probe} --device ${DEVICE} --target=fs`" - case "${grub_fs}" in - *fs) hurd_fs="${grub_fs}" ;; - *) hurd_fs="${grub_fs}fs" ;; - esac - cat << EOF - multiboot /boot/gnumach.gz root=device:${mach_device} - module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\ - --multiboot-command-line='\${kernel-command-line}' \\ - --host-priv-port='\${host-port}' \\ - --device-master-port='\${device-port}' \\ - --exec-server-task='\${exec-task}' -T typed '\${root}' \\ - '\$(task-create)' '\$(task-resume)' - module /lib/ld.so.1 exec /hurd/exec '\$(exec-task=task-create)' -} -EOF - ;; - minix) - found_other_os=1 - cat << EOF -menuentry "${LONGNAME} (on ${DEVICE}, Multiboot)" { -EOF - save_default_entry | sed -e "s/^/\t/" - prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/" - cat << EOF - multiboot /boot/image_latest -} -EOF - ;; - *) - case ${DEVICE} in - *.efi) - cat << EOF -menuentry '$(echo "${LONGNAME}" | grub_quote)' { -EOF - save_default_entry | grub_add_tab - cat << EOF - chainloader /EFI/${DEVICE} - boot -} -EOF - ;; - *) - echo -n " " - # TRANSLATORS: %s is replaced by OS name. - gettext_printf "%s is not yet supported by grub-mkconfig.\n" "${LONGNAME}" >&2 - ;; - esac - esac -done - -# We override the results of the menu_auto_hide code here, this is a bit ugly, -# but grub-mkconfig writes out the file linearly, so this is the only way -if [ "${found_other_os}" = "1" ]; then - cat << EOF -# Other OS found, undo autohiding of menu unless menu_auto_hide=2 -if [ "\${orig_timeout_style}" -a "\${menu_auto_hide}" != "2" ]; then - set timeout_style=\${orig_timeout_style} - set timeout=\${orig_timeout} -fi -EOF -fi diff --git a/files/grub/grub.cfg b/files/grub/grub.cfg deleted file mode 100644 index 0e43672..0000000 --- a/files/grub/grub.cfg +++ /dev/null @@ -1,36 +0,0 @@ - -search --set=root --file /ubuntu - -insmod all_video - -set default="0" -set timeout=30 - -menuentry "Try Kubuntu Noble Numbat without installing" { - linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro quiet splash pcie_ports=native intel_iommu=on iommu=pt --- - initrd /casper/initrd -} -menuentry "Try Kubuntu Noble Numbat without installing (Safe Graphics)" { - linux /casper/vmlinuz file=/cdrom/preseed/mbp164.seed boot=casper ro quiet splash nomodeset pcie_ports=native intel_iommu=on iommu=pt --- - initrd /casper/initrd -} -menuentry "Try Kubuntu Noble Numbat without installing (NVMe blacklisted)" { - linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro quiet splash pcie_ports=native intel_iommu=on iommu=pt modprobe.blacklist=nvme --- - initrd /casper/initrd -} -menuentry "Install Kubuntu Noble Numbat" { - linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity quiet splash pcie_ports=native intel_iommu=on iommu=pt --- - initrd /casper/initrd -} -menuentry "Install Kubuntu Noble Numbat (Safe Graphics)" { - linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp164.seed boot=casper only-ubiquity quiet splash nomodeset pcie_ports=native intel_iommu=on iommu=pt --- - initrd /casper/initrd -} -menuentry "Install Kubuntu Noble Numbat (NVMe blacklisted)" { - linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity quiet splash pcie_ports=native intel_iommu=on iommu=pt modprobe.blacklist=nvme --- - initrd /casper/initrd -} -menuentry "Check disc for defects" { - linux /casper/vmlinuz boot=casper integrity-check enforcing=0 efi=noruntime pcie_ports=native --- - initrd /casper/initrd -} diff --git a/files/isohdpfx.bin b/files/isohdpfx.bin deleted file mode 100644 index a87faf5..0000000 Binary files a/files/isohdpfx.bin and /dev/null differ diff --git a/files/preseed/mbp.seed b/files/preseed/mbp.seed deleted file mode 100644 index 861db1a..0000000 --- a/files/preseed/mbp.seed +++ /dev/null @@ -1,11 +0,0 @@ -# Enable extras.ubuntu.com. -# d-i apt-setup/extra boolean true -# Install the Ubuntu desktop. -# tasksel tasksel/first multiselect ubuntu-desktop -# On live DVDs, don't spend huge amounts of time removing substantial -# application packages pulled in by language packs. Given that we clearly -# have the space to include them on the DVD, they're useful and we might as -# well keep them installed. -#ubiquity ubiquity/keep-installed string icedtea6-plugin openoffice.org - -d-i debian-installer/add-kernel-opts string pcie_ports=native intel_iommu=on iommu=pt diff --git a/files/preseed/mbp164.seed b/files/preseed/mbp164.seed deleted file mode 100644 index fd11b65..0000000 --- a/files/preseed/mbp164.seed +++ /dev/null @@ -1,11 +0,0 @@ -# Enable extras.ubuntu.com. -# d-i apt-setup/extra boolean true -# Install the Ubuntu desktop. -# tasksel tasksel/first multiselect ubuntu-desktop -# On live DVDs, don't spend huge amounts of time removing substantial -# application packages pulled in by language packs. Given that we clearly -# have the space to include them on the DVD, they're useful and we might as -# well keep them installed. -#ubiquity ubiquity/keep-installed string icedtea6-plugin openoffice.org - -d-i debian-installer/add-kernel-opts string pcie_ports=native intel_iommu=on iommu=pt nomodeset