Compare commits
2 Commits
086917deec
...
c4f6079077
| Author | SHA1 | Date | |
|---|---|---|---|
| c4f6079077 | |||
| 804827c5a9 |
@ -17,9 +17,24 @@ 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'
|
||||
|
||||
insmod gfxterm
|
||||
terminal_output gfxterm
|
||||
set color_normal=blue/white
|
||||
set color_highlight=white/blue
|
||||
|
||||
### 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 +45,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
|
||||
}
|
||||
|
||||
@ -14,14 +14,24 @@ 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'
|
||||
|
||||
insmod gfxterm
|
||||
terminal_output gfxterm
|
||||
set color_normal=blue/white
|
||||
set color_highlight=white/blue
|
||||
|
||||
### 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
|
||||
}
|
||||
|
||||
@ -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 "$@"
|
||||
|
||||
@ -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."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user