Compare commits

..

No commits in common. "c4f6079077fc5ba7cb72dabd94ee864b87968004" and "086917deece353c29d34a35b15f3a54be18d7717" have entirely different histories.

4 changed files with 52 additions and 37 deletions

View File

@ -17,24 +17,9 @@ insmod ext2
set timeout=10
### END /etc/grub.d/00_header ###
search --no-floppy --set=root -l 'Fedora-Cinn-Live-44'
insmod gfxterm
terminal_output gfxterm
set color_normal=blue/white
set color_highlight=white/blue
search --no-floppy --set=root -l 'Fedora-E-dvd-x86_64-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
@ -45,3 +30,8 @@ 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
}

View File

@ -14,24 +14,14 @@ insmod chain
set timeout=10
### END /etc/grub.d/00_header ###
search --no-floppy --set=root -l 'Fedora-Cinn-Live-44'
insmod gfxterm
terminal_output gfxterm
set color_normal=blue/white
set color_highlight=white/blue
search --no-floppy --set=root -l 'Fedora-E-dvd-x86_64-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
}

View File

@ -8,6 +8,7 @@ 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"
@ -26,7 +27,7 @@ check_input() {
}
check_dependencies() {
for cmd in xorriso; do
for cmd in rsync xorriso; do
if ! command -v "$cmd" >/dev/null 2>&1; then
echo "Error: missing dependency: $cmd"
exit 1
@ -40,9 +41,26 @@ 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..."
xorriso -indev "$SOURCE_ISO" -osirrox on -extract / "$WORK_DIR" >/dev/null
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
}
patch_grub() {
@ -92,8 +110,10 @@ main() {
create_iso
echo
echo "Build complete."
echo "Build preparation complete."
echo "Work dir: $WORK_DIR"
echo
echo "ISO creation will be added in the next step."
}
main "$@"

View File

@ -17,14 +17,29 @@ 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 "Extracting ISO contents..."
xorriso -indev "$SOURCE_ISO" -osirrox on -extract / "$WORK_DIR" >/dev/null
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 "Done."