Hallo DJKUhpisse,
folgendes hat bei mir jetzt einwandfrei funktioniert. Der Trick ist, das ich für den PXE-Server die richtigen Einstellungen in der /etc/systemd/resolve.conf hinterlege und diese nach dem start per Cornjob wieder entferne. Getestet habe ich das mit Linux Mint 19 und Lubuntu 1804. Ebenfalls funktioniert alles wie gewünscht, wenn man von PXE bootet, das System auf die Festplatte installiert und dann von dort aus startet. Ich schreibe das einmal etwas ausführlicher, damit jemand anderes eine vollständige Anleitung hat, ein ISO-Image auf einem PXE-Server bereit zu stellen und komfortabel nutzen zu können.
DVD entpacken und bereitstellen
mount /home/Benutzer/Downloads/linuxmint-19-cinnamon-64bit-v2.iso /mnt cp -R /mnt /data/tftp/linuxmint umount /mnt
Vorraussetzungen installieren (Genisoimage braucht man nur, wenn man am Schluss auch eine DVD brennen möchte.)
apt-get install squashfs-tools genisoimage
Squashfs-Datei öffnen und den Inhalt in die Datei /tmp/ubuntu-fs.ext2 kopieren
mount -t squashfs -o loop,ro /data/tftp/linuxmint/casper/filesystem.squashfs /mnt dd if=/dev/zero of="/tmp/ubuntu-fs.ext2" bs=1M count=10000 mke2fs /tmp/ubuntu-fs.ext2 mkdir /tmp/new mount -o loop /tmp/ubuntu-fs.ext2 /tmp/new cp -a /mnt/. /tmp/new umount /mnt
Anpassungen für die Netzwerkkonfiguration
nano /tmp/new/etc/NetworkManager/NetworkManager.conf # managed auf true setzen
nano /tmp/new/etc/systemd/resolved.conf # DNS und Domains für die eigenen Bedürfnisse für das Netzwerkes des PXE-Servers konfigurieren
nano /tmp/new/etc/crontab # In Zeile 15 folgendes eintragen: @reboot root sed -i '15s/.*/#DNS=/' /etc/systemd/resolved.conf ; sed -i '17s/.*/#Domains=/' /etc/systemd/resolved.conf ; sed -i '15s/.*/#/' /etc/crontab
Livesystem offnen und nach eigenen Wünschen anpassen / erweitern
cp /etc/resolv.conf /tmp/new/etc/ mount -t proc -o bind /proc /tmp/new/proc mount -o bind /dev/pts /tmp/new/dev/pts chroot /tmp/new /bin/bash
System Updaten
apt-get update apt-get upgrade -y
Standardtools installieren
apt-get install aptitude mc htop nano torbrowser-launcher -y
Aufräumen
apt-get autoremove apt-get autoclean apt-get clean
Livesystem schliessen
exit umount /tmp/new/proc umount /tmp/new/dev/pts rm /tmp/new/etc/resolv.conf
Dateisystem aufräumen
dd if=/dev/zero of=/tmp/new/dummyfile rm /tmp/new/dummyfile
Neue Datei filesystem.squashfs erzeugen
rm /data/tftp/filesystem.squashfs_old mv /data/tftp/linuxmint/casper/filesystem.squashfs /data/tftp/filesystem.squashfs_old cd /tmp/new mksquashfs . /data/tftp/linuxmint/casper/filesystem.squashfs -comp xz cd / umount /tmp/new rm -r /tmp/new
Neue Checksummen erstellen
cd /data/tftp/linuxmint sudo find . -type f -print0 |xargs -0 md5sum |sudo tee md5sum.txt
Ggf. DVD brennen (Nur zur Vollständigkeit für jemand anderen interessierten. Die Netzwerkanpassungen machen aber in diesem Fall wenig Sinn ...)
cd /data/tftp/linuxmint sudo genisoimage \ -o ubuntu-new.iso \ -b isolinux/isolinux.bin \ -c isolinux/boot.cat \ -no-emul-boot \ -boot-load-size 4 \ -boot-info-table \ -r \ -V "Custom Ubuntu Live CD" \ -cache-inodes \ -J \ -l \ ubuntu-livecd
Ich hoffe, dass das auch noch jemand anderen weiterhilft.
Viele Grüße
Michael