diff --git a/grub/EFI-BOOT-grub.cfg b/grub/EFI-BOOT-grub.cfg index ef25812..d146db4 100644 --- a/grub/EFI-BOOT-grub.cfg +++ b/grub/EFI-BOOT-grub.cfg @@ -17,9 +17,19 @@ insmod ext2 set timeout=10 ### END /etc/grub.d/00_header ### -search --no-floppy --set=root -l 'Fedora-E-dvd-x86_64-44' +search --no-floppy --set=root -l 'Fedora-Cinn-Live-44' ### BEGIN /etc/grub.d/10_linux ### +menuentry 'Tuxflotte Provisioning (automatisch)' --class fedora --class gnu-linux --class gnu --class os { + linux /boot/x86_64/loader/linux quiet rhgb root=live:CDLABEL=Fedora-Cinn-Live-44 rd.live.image tuxflotte.mode=auto + initrd /boot/x86_64/loader/initrd +} + +menuentry 'Tuxflotte Provisioning (interaktiv)' --class fedora --class gnu-linux --class gnu --class os { + linux /boot/x86_64/loader/linux quiet rhgb root=live:CDLABEL=Fedora-Cinn-Live-44 rd.live.image tuxflotte.mode=interactive + initrd /boot/x86_64/loader/initrd +} + menuentry 'Lokales UEFI-System booten' --class hdd --class os { insmod part_gpt insmod fat @@ -30,8 +40,3 @@ menuentry 'Lokales UEFI-System booten' --class hdd --class os { chainloader ($local_efi)/EFI/fedora/shimx64.efi boot } - -menuentry 'Tuxflotte Provisioning - Fedora Workstation' --class fedora --class gnu-linux --class gnu --class os { - linux /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Fedora-E-dvd-x86_64-44 inst.ks=https://anode.tuxflotte.de/installers/fedora-workstation/ks.cfg ip=dhcp quiet - initrd /images/pxeboot/initrd.img -} diff --git a/grub/boot-grub2-grub.cfg b/grub/boot-grub2-grub.cfg index 5a97002..52eb39b 100644 --- a/grub/boot-grub2-grub.cfg +++ b/grub/boot-grub2-grub.cfg @@ -14,14 +14,19 @@ insmod chain set timeout=10 ### END /etc/grub.d/00_header ### -search --no-floppy --set=root -l 'Fedora-E-dvd-x86_64-44' +search --no-floppy --set=root -l 'Fedora-Cinn-Live-44' ### BEGIN /etc/grub.d/10_linux ### +menuentry 'Tuxflotte Provisioning (automatisch)' --class fedora --class gnu-linux --class gnu --class os { + linux /boot/x86_64/loader/linux quiet rhgb root=live:CDLABEL=Fedora-Cinn-Live-44 rd.live.image tuxflotte.mode=auto + initrd /boot/x86_64/loader/initrd +} + +menuentry 'Tuxflotte Provisioning (interaktiv)' --class fedora --class gnu-linux --class gnu --class os { + linux /boot/x86_64/loader/linux quiet rhgb root=live:CDLABEL=Fedora-Cinn-Live-44 rd.live.image tuxflotte.mode=interactive + initrd /boot/x86_64/loader/initrd +} + menuentry 'Von erster lokaler Festplatte booten' --class hdd --class os { chainloader (hd0)+1 } - -menuentry 'Tuxflotte Provisioning - Fedora Workstation' --class fedora --class gnu-linux --class gnu --class os { - linux /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Fedora-E-dvd-x86_64-44 inst.ks=https://anode.tuxflotte.de/installers/fedora-workstation/ks.cfg ip=dhcp quiet - initrd /images/pxeboot/initrd.img -} diff --git a/scripts/build.sh b/scripts/build.sh index f7d5dfa..bd5d368 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -8,7 +8,6 @@ BASE_DIR="$(cd "$REPO_DIR/.." && pwd)" BUILD_DIR="$BASE_DIR/build" WORK_DIR="$BUILD_DIR/work" OUTPUT_DIR="$BUILD_DIR/output" -MOUNT_DIR="/mnt/fedora-iso" usage() { echo "Usage: $0 /path/to/source.iso" @@ -27,7 +26,7 @@ check_input() { } check_dependencies() { - for cmd in rsync xorriso; do + for cmd in xorriso; do if ! command -v "$cmd" >/dev/null 2>&1; then echo "Error: missing dependency: $cmd" exit 1 @@ -41,26 +40,9 @@ prepare_dirs() { mkdir -p "$WORK_DIR" } -mount_iso() { - sudo mkdir -p "$MOUNT_DIR" - sudo mount -o loop "$SOURCE_ISO" "$MOUNT_DIR" -} - -unmount_iso() { - sudo umount "$MOUNT_DIR" || true -} - extract_iso() { echo "Extracting ISO..." - mount_iso - - trap unmount_iso EXIT - - sudo rsync -a "$MOUNT_DIR"/ "$WORK_DIR"/ - sudo chown -R "$(id -u):$(id -g)" "$WORK_DIR" - - unmount_iso - trap - EXIT + xorriso -indev "$SOURCE_ISO" -osirrox on -extract / "$WORK_DIR" >/dev/null } patch_grub() { @@ -110,10 +92,8 @@ main() { create_iso echo - echo "Build preparation complete." + echo "Build complete." echo "Work dir: $WORK_DIR" - echo - echo "ISO creation will be added in the next step." } main "$@" diff --git a/scripts/extract.sh b/scripts/extract.sh index 9238f37..6b96d37 100755 --- a/scripts/extract.sh +++ b/scripts/extract.sh @@ -17,29 +17,14 @@ REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" BASE_DIR="$(cd "$REPO_DIR/.." && pwd)" BUILD_DIR="$BASE_DIR/build" WORK_DIR="$BUILD_DIR/work" -MOUNT_DIR="/mnt/fedora-iso" echo "Source ISO: $SOURCE_ISO" echo "Work dir: $WORK_DIR" -sudo mkdir -p "$MOUNT_DIR" - rm -rf "$WORK_DIR" mkdir -p "$WORK_DIR" -echo "Mounting ISO..." -sudo mount -o loop "$SOURCE_ISO" "$MOUNT_DIR" - -cleanup() { - echo "Unmounting ISO..." - sudo umount "$MOUNT_DIR" || true -} -trap cleanup EXIT - -echo "Copying ISO contents..." -sudo rsync -a "$MOUNT_DIR"/ "$WORK_DIR"/ - -echo "Fixing ownership..." -sudo chown -R "$(id -u):$(id -g)" "$WORK_DIR" +echo "Extracting ISO contents..." +xorriso -indev "$SOURCE_ISO" -osirrox on -extract / "$WORK_DIR" >/dev/null echo "Done."