Added this repo
This commit is contained in:
49
common/create-iso-preseed/create-iso-preseed.sh
Executable file
49
common/create-iso-preseed/create-iso-preseed.sh
Executable file
@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
orig_iso='/mini.iso'
|
||||
iso_mnt='/mnt/iso'
|
||||
new_files='/mnt/iso_new'
|
||||
new_iso='/debian-12-my-preseed-amd64.iso'
|
||||
mbr_template='/mnt/iso_new/isohdpfx.bin'
|
||||
|
||||
|
||||
wget https://deb.debian.org/debian/dists/bookworm/main/installer-amd64/current/images/netboot/mini.iso -O /mini.iso
|
||||
|
||||
mkdir $iso_mnt
|
||||
mkdir $new_files
|
||||
|
||||
mount -o loop /mini.iso $iso_mnt
|
||||
cp -vRTa $iso_mnt $new_files
|
||||
umount $iso_mnt
|
||||
|
||||
sed 's/\/linux vga=788 --- quiet/\/linux vga=788 ipv6.disable=1 auto=true netcfg\/dhcp_timeout=30 priority=critical locale=en_US preseed\/url=http:\/\/aassdd.ru\/.my-preseed\/debian\/preseed.cfg ---/' -i $new_files/boot/grub/grub.cfg
|
||||
sed 's/append vga=788 initrd=initrd.gz --- quiet/append vga=788 initrd=initrd.gz ipv6.disable=1 auto=true netcfg\/dhcp_timeout=30 priority=critical locale=en_US preseed\/url=http:\/\/aassdd.ru\/.my-preseed\/debian\/preseed.cfg ---/' -i $new_files/txt.cfg
|
||||
|
||||
# ************************
|
||||
# ************************
|
||||
|
||||
# Extract MBR template file to disk
|
||||
dd if="$orig_iso" bs=1 count=432 of="$mbr_template"
|
||||
|
||||
# Create the new ISO image
|
||||
xorriso -as mkisofs \
|
||||
-r -V 'Debian my preseed amd64 n' \
|
||||
-o "$new_iso" \
|
||||
-J -J -joliet-long -cache-inodes \
|
||||
-isohybrid-mbr "$mbr_template" \
|
||||
-b isolinux.bin \
|
||||
-c boot.cat \
|
||||
-boot-load-size 4 -boot-info-table -no-emul-boot \
|
||||
-eltorito-alt-boot \
|
||||
-e boot/grub/efi.img \
|
||||
-no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \
|
||||
"$new_files"
|
||||
# ************************
|
||||
# ************************
|
||||
|
||||
rm -fr $orig_iso
|
||||
rm -fr $iso_mnt
|
||||
rm -fr $new_files
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user