git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormail_redacted_for_web 2020-03-09 15:48:20 +0100
committermail_redacted_for_web 2020-03-09 15:48:20 +0100
commit92d09f370f1ebd0a27abda0a463df953d4b79ef0 (patch)
tree68183db1a5eab962aee90d3a22b81e78e4c58cca
downloaddebian-serial-isos-92d09f370f1ebd0a27abda0a463df953d4b79ef0.tar.bz2
InComm
-rw-r--r--.gitignore22
-rw-r--r--README.md6
-rw-r--r--debian-10.3.0/.readme2
-rw-r--r--debian-10.3.0/dst/.readme1
-rw-r--r--debian-10.3.0/src/.readme2
-rwxr-xr-xdiff/gen15
-rw-r--r--diff/isolinux.diff40
-rw-r--r--diff/isolinux/adtxt.cfg9
-rw-r--r--diff/isolinux/adtxt.cfg.old9
-rw-r--r--diff/isolinux/isolinux.cfg9
-rw-r--r--diff/isolinux/isolinux.cfg.old7
-rw-r--r--diff/isolinux/txt.cfg4
-rw-r--r--diff/isolinux/txt.cfg.old4
-rwxr-xr-xgen47
14 files changed, 177 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..efa21af
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,22 @@
+debian-*/src/*.inf
+debian-*/src/boot
+debian-*/src/css
+debian-*/src/debian
+debian-*/src/dists
+debian-*/src/doc
+debian-*/src/EFI
+debian-*/src/firmware
+debian-*/src/g2ldr
+debian-*/src/g2ldr.mbr
+debian-*/src/install
+debian-*/src/install.amd
+debian-*/src/isolinux
+debian-*/src/*.txt
+debian-*/src/pics
+debian-*/src/pool
+debian-*/src/*.html
+debian-*/src/*.source
+debian-*/src/setup.exe
+debian-*/src/tools
+debian-*/src/*.ini
+debian-*/dst/*.iso
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..cc3b3c1
--- /dev/null
+++ b/README.md
@@ -0,0 +1,6 @@
+# Content
+
+Ad hoc folder. Contains files for a semi-automatic generation of a Debian ISO
+capable of serial console boot.
+
+Proper readme and scripting and stuff to follow.
diff --git a/debian-10.3.0/.readme b/debian-10.3.0/.readme
new file mode 100644
index 0000000..1ace5fd
--- /dev/null
+++ b/debian-10.3.0/.readme
@@ -0,0 +1,2 @@
+This is an example folder. This folder would be parsed, and so would be any sibling folder (i.e. no
+parent and no child).
diff --git a/debian-10.3.0/dst/.readme b/debian-10.3.0/dst/.readme
new file mode 100644
index 0000000..ec3be39
--- /dev/null
+++ b/debian-10.3.0/dst/.readme
@@ -0,0 +1 @@
+This is where all resulting ISOs will be placed.
diff --git a/debian-10.3.0/src/.readme b/debian-10.3.0/src/.readme
new file mode 100644
index 0000000..15169e8
--- /dev/null
+++ b/debian-10.3.0/src/.readme
@@ -0,0 +1,2 @@
+Here you should put the entirety of the Debian installer ISO you wish to modify.
+Of course extracted, i.e. this folder = ISO root folder.
diff --git a/diff/gen b/diff/gen
new file mode 100755
index 0000000..7e46c46
--- /dev/null
+++ b/diff/gen
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+(
+ cd isolinux||exit 2
+ true>../isolinux.diff||exit 4
+ for i in *.cfg;do
+ echo "# diff -u $i.old $i >> ../isolinux.diff" >> ../isolinux.diff||exit 8
+ diff -u "$i".old "$i" >> ../isolinux.diff
+ case "$?" in
+ 0) printf "No change for %b.\n" "$i";;
+ 1) printf "Logged changes for %b.\n" "$i";;
+ *) printf "Something broke with $b!" >&2 "$i";exit 8;;
+ esac
+ done
+)
diff --git a/diff/isolinux.diff b/diff/isolinux.diff
new file mode 100644
index 0000000..6e3698c
--- /dev/null
+++ b/diff/isolinux.diff
@@ -0,0 +1,40 @@
+# diff -u adtxt.cfg.old adtxt.cfg >> ../isolinux.diff
+--- adtxt.cfg.old 2020-03-09 15:14:03.119906371 +0100
++++ adtxt.cfg 2020-03-09 15:16:59.396154323 +0100
+@@ -1,9 +1,9 @@
+ label expert
+ menu label E^xpert install
+ kernel /install.amd/vmlinuz
+- append priority=low vga=788 initrd=/install.amd/initrd.gz ---
++ append priority=low vga=off console=ttyS0,115200n8 initrd=/install.amd/initrd.gz --- console=ttyS0,115200n8
+ include rqtxt.cfg
+ label auto
+ menu label ^Automated install
+ kernel /install.amd/vmlinuz
+- append auto=true priority=critical vga=788 initrd=/install.amd/initrd.gz --- quiet
++ append auto=true priority=critical vga=off console=ttyS0,115200n8 initrd=/install.amd/initrd.gz --- quiet console=ttyS0,115200n8
+# diff -u isolinux.cfg.old isolinux.cfg >> ../isolinux.diff
+--- isolinux.cfg.old 2020-03-09 15:14:03.119906371 +0100
++++ isolinux.cfg 2020-03-09 15:17:37.284207617 +0100
+@@ -1,7 +1,9 @@
+ # D-I config version 2.0
+ # search path for the c32 support libraries (libcom32, libutil etc.)
++serial 0 115200
++console 0
+ path
+ include menu.cfg
+-default vesamenu.c32
+-prompt 0
+-timeout 0
++#default vesamenu.c32
++#prompt 0
++#timeout 0
+# diff -u txt.cfg.old txt.cfg >> ../isolinux.diff
+--- txt.cfg.old 2020-03-09 15:14:03.119906371 +0100
++++ txt.cfg 2020-03-09 15:18:11.084255160 +0100
+@@ -1,4 +1,4 @@
+ label install
+ menu label ^Install
+ kernel /install.amd/vmlinuz
+- append vga=788 initrd=/install.amd/initrd.gz --- quiet
++ append vga=off console=ttyS0,115200n8 initrd=/install.amd/initrd.gz --- quiet console=ttyS0,115200n8
diff --git a/diff/isolinux/adtxt.cfg b/diff/isolinux/adtxt.cfg
new file mode 100644
index 0000000..a69d388
--- /dev/null
+++ b/diff/isolinux/adtxt.cfg
@@ -0,0 +1,9 @@
+label expert
+ menu label E^xpert install
+ kernel /install.amd/vmlinuz
+ append priority=low vga=off console=ttyS0,115200n8 initrd=/install.amd/initrd.gz --- console=ttyS0,115200n8
+include rqtxt.cfg
+label auto
+ menu label ^Automated install
+ kernel /install.amd/vmlinuz
+ append auto=true priority=critical vga=off console=ttyS0,115200n8 initrd=/install.amd/initrd.gz --- quiet console=ttyS0,115200n8
diff --git a/diff/isolinux/adtxt.cfg.old b/diff/isolinux/adtxt.cfg.old
new file mode 100644
index 0000000..75d348c
--- /dev/null
+++ b/diff/isolinux/adtxt.cfg.old
@@ -0,0 +1,9 @@
+label expert
+ menu label E^xpert install
+ kernel /install.amd/vmlinuz
+ append priority=low vga=788 initrd=/install.amd/initrd.gz ---
+include rqtxt.cfg
+label auto
+ menu label ^Automated install
+ kernel /install.amd/vmlinuz
+ append auto=true priority=critical vga=788 initrd=/install.amd/initrd.gz --- quiet
diff --git a/diff/isolinux/isolinux.cfg b/diff/isolinux/isolinux.cfg
new file mode 100644
index 0000000..ae6f3a1
--- /dev/null
+++ b/diff/isolinux/isolinux.cfg
@@ -0,0 +1,9 @@
+# D-I config version 2.0
+# search path for the c32 support libraries (libcom32, libutil etc.)
+serial 0 115200
+console 0
+path
+include menu.cfg
+#default vesamenu.c32
+#prompt 0
+#timeout 0
diff --git a/diff/isolinux/isolinux.cfg.old b/diff/isolinux/isolinux.cfg.old
new file mode 100644
index 0000000..e5d0290
--- /dev/null
+++ b/diff/isolinux/isolinux.cfg.old
@@ -0,0 +1,7 @@
+# D-I config version 2.0
+# search path for the c32 support libraries (libcom32, libutil etc.)
+path
+include menu.cfg
+default vesamenu.c32
+prompt 0
+timeout 0
diff --git a/diff/isolinux/txt.cfg b/diff/isolinux/txt.cfg
new file mode 100644
index 0000000..d08328f
--- /dev/null
+++ b/diff/isolinux/txt.cfg
@@ -0,0 +1,4 @@
+label install
+ menu label ^Install
+ kernel /install.amd/vmlinuz
+ append vga=off console=ttyS0,115200n8 initrd=/install.amd/initrd.gz --- quiet console=ttyS0,115200n8
diff --git a/diff/isolinux/txt.cfg.old b/diff/isolinux/txt.cfg.old
new file mode 100644
index 0000000..4bec49c
--- /dev/null
+++ b/diff/isolinux/txt.cfg.old
@@ -0,0 +1,4 @@
+label install
+ menu label ^Install
+ kernel /install.amd/vmlinuz
+ append vga=788 initrd=/install.amd/initrd.gz --- quiet
diff --git a/gen b/gen
new file mode 100755
index 0000000..6729b72
--- /dev/null
+++ b/gen
@@ -0,0 +1,47 @@
+#!/usr/bin/env bash
+# vim:tabstop=4:syntax=sh
+# export SHELLCHECK_OPTS='--exclude=SC2128,SC2164'
+
+# define things
+
+# location of isohdpfx.bin:
+PFXB="/usr/lib/ISOLINUX/isohdpfx.bin"
+
+# script from here
+
+RETVAL=0
+DIRS=( $(find . -maxdepth 1 -mindepth 1 -type d|grep -vP '/diff[^/]*'|awk -F/ '{print $NF}') )
+# shellcheck disable=SC2128
+[ -z "$DIRS" ]&&exit 1
+
+for i in "${DIRS[@]}";do
+ ISOVERSTR="$(echo "$i"|sed 's/debian/Debian/;s/-//')"
+ # shellcheck disable=SC2128,SC2164
+ (
+ cd "$i/src" 2>/dev/null
+ [ "$?" -ne 0 ]&&printf "%b not accessible!\n" "$i/src" >&2&&exit 2
+ xorriso -as mkisofs -r -J -joliet-long -l -cache-inodes -isohybrid-mbr "$PFXB"\
+ -partition_offset 16 -A "$ISOVERSTR" -b isolinux/isolinux.bin -c isolinux/boot.cat\
+ -no-emul-boot -boot-load-size 4 -boot-info-table -o "$i"-serial-install.iso ../src/
+ case "$?" in
+ 0);;
+ *) printf "Creation of %b failed!" "$i-serial-install.iso" >&2;exit 4;;
+ esac
+ mv -v "$i"-serial-install.iso ../dst/
+ case "$?" in
+ 0);;
+ *) printf "Move of %b failed!" "$i-serial-install.iso" >&2;exit 8;;
+ esac
+ );LRV="$?"
+ case "$LRV" in
+ 0);;
+ *)
+ case "$RETVAL" in
+ 0) RETVAL="$((100+LRV))";;
+ *) RETVAL=$((RETVAL+LRV));;
+ esac
+ ;;
+ esac
+done
+
+exit "$RETVAL"