ADD EDIT + TOOLS

This commit is contained in:
2025-11-21 12:34:11 +01:00
parent 16fc39c343
commit 57e8203eb2
11 changed files with 741 additions and 527 deletions

View File

@@ -3,12 +3,12 @@
# sudo apt install -y wget git xorriso isolinux p7zip-full fakeroot binutils
# DVD ISO Base offline
DEBIAN_ISO_URL=https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/
GET_ISO_NAME=$(curl -s https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/ | grep -oP 'debian-\d+(?:\.\d+)+-amd64-DVD-1\.iso' | head -n 1)
#DEBIAN_ISO_URL=https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/
#GET_ISO_NAME=$(curl -s https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/ | grep -oP 'debian-\d+(?:\.\d+)+-amd64-DVD-1\.iso' | head -n 1)
# NetInstall iso
#DEBIAN_ISO_URL=https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/
#GET_ISO_NAME=$(curl -s https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/ | grep -oP 'debian-\d+(?:\.\d+)+-amd64-netinst\.iso' | head -n 1)
# NetInstall ISO
DEBIAN_ISO_URL=https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/
GET_ISO_NAME=$(curl -s https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/ | grep -oP 'debian-\d+(?:\.\d+)+-amd64-netinst\.iso' | head -n 1)
#
PRESEED_ISO_NAME=DanOS-Debian
#WORK_DIR=$(pwd) #BRUGES IKKE MERE
@@ -17,6 +17,9 @@ ISO_WORK_TMP=iso-extract
# Setup the environment for creating the new ISO version.
function setup() {
sudo apt update && sudo apt install -y wget git xorriso isolinux p7zip-full fakeroot binutils
if [ -f source-debian.iso ]; then
rm source-debian.iso
fi
if [ ! -f source-debian.iso ]; then
wget -O source-debian.iso $DEBIAN_ISO_URL/"$GET_ISO_NAME"
fi
@@ -24,11 +27,18 @@ function setup() {
sudo chmod -R +w $ISO_WORK_TMP
sudo cp preseed-user.cfg $ISO_WORK_TMP/preseed.cfg || exit 1
sudo cp -rfup src/ iso-extract/ || exit 1
sudo cp src/grub/splash.png $ISO_WORK_TMP/isolinux/splash.png || exit 1
sudo cp install-danos.sh $ISO_WORK_TMP/install.sh || exit 1
sudo sed -i 's/append vga/append auto=true priority=critical vga/' $ISO_WORK_TMP/isolinux/gtk.cfg
sudo sed -i 's/append vga/append auto=true vga/' $ISO_WORK_TMP/isolinux/gtk.cfg
sudo sed -i '/spkgtk\.cfg/d; /spk\.cfg/d' $ISO_WORK_TMP/isolinux/menu.cfg
sudo sed -i 's/--- quiet/--- quiet file=\/cdrom\/preseed.cfg/' $ISO_WORK_TMP/isolinux/gtk.cfg
sudo sed -i '0,/--- quiet/ s/--- quiet/auto=true priority=critical file=\/cdrom\/preseed.cfg --- quiet/' $ISO_WORK_TMP/boot/grub/grub.cfg
#sudo sed -i '0,/--- quiet/ s/--- quiet/auto=true file=\/cdrom\/preseed.cfg --- quiet/' $ISO_WORK_TMP/boot/grub/grub.cfg
sudo sed -i '0,/--- quiet/ s/--- quiet/auto=true priority=high file=\/cdrom\/preseed.cfg --- quiet/' $ISO_WORK_TMP/boot/grub/grub.cfg
sudo sed -i '/set theme=\/boot\/grub\/theme\/1/a set default=0' $ISO_WORK_TMP/boot/grub/grub.cfg
sudo sed -i '/set theme=\/boot\/grub\/theme\/1/a set timeout=7' $ISO_WORK_TMP/boot/grub/grub.cfg
if [ -f source-debian.iso ]; then
rm source-debian.iso
fi
#sudo mkdir -p $ISO_WORK_TMP/var/cache/apt/archives
#sudo apt reinstall --download-only -y -o Dir::Cache="./" -o Dir::Cache::archives="iso-extract/src/packages/" \
# wget curl git xdg-utils xdg-user-dirs build-essential htop dkms cmake plymouth plymouth-themes power-profiles-daemon wayland-protocols wayland-utils wlr-randr libwlroots-0.18
@@ -43,7 +53,7 @@ function make() {
sudo cp -fu install-danos.sh $ISO_WORK_TMP/install.sh || exit 1
sudo cp preseed-user.cfg $ISO_WORK_TMP/preseed.cfg || exit 1
if [ -f $PRESEED_ISO_NAME.iso ]; then rm $PRESEED_ISO_NAME.iso; fi
xorriso -as mkisofs -o $PRESEED_ISO_NAME.iso -V "Debian DanOS" -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat $ISO_WORK_TMP
xorriso -as mkisofs -o $PRESEED_ISO_NAME.iso -V "DANOS_DEBIAN" -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat $ISO_WORK_TMP
ls -lah ./*.iso
else