refining scripts, adding winpe boot

This commit is contained in:
root 2023-04-13 12:28:53 +00:00
parent 454bce2beb
commit a5e1720463
8 changed files with 78 additions and 9 deletions

View File

@ -10,7 +10,9 @@ mkdir -p ${TFTP}/pxelinux.cfg
# copy Files from the Resource-Dir to the correct places:
cp ./resources/lighttpd.conf /etc/lighttpd/lighttpd.conf
cp ./resources/exports /etc/exports
cp ./resources/default-minimal ${TFTP}/pxelinux.cfg/default
if ! [ -e ${TFTP}/pxelinux.cfg/default ]; then
cp ./resources/default-minimal ${TFTP}/pxelinux.cfg/default
fi
cp ./resources/splash.png ${TFTP}/
cp -a /usr/lib/syslinux/modules/bios ${TFTP}/

View File

@ -2,16 +2,38 @@
. ./settings.sh
# Download Debian Packages
# Download & Install Debian Packages
apt update
apt install -y samba genisoimage wimtools cabextract
# setup temp-dirs:
# configure Packages
cp ./resources/smb.conf /etc/samba/
# setup dirs:
mkdir -p ./non-free/windows
mkdir -p ./temp/waik
# restart services
systemctl restart smbd
# Download Windows Stuff:
WAIKURL="https://download.microsoft.com/download/8/E/9/8E9BBC64-E6F8-457C-9B8D-F6C9A16E6D6A/KB3AIK_EN.iso"
FILENAME="./temp/KB3AIK_EN.iso"
if ! [ -e $FILENAME ]; then
wget -nc -O $FILENAME $WAIKURL
fi
if [ -e $FILENAME ]; then
7z x -aos -o./temp/waik $FILENAME
fi
# Create winpe.iso
if ! [ -e ./non-free/windows/winpe.iso ]; then
if [ -e ./temp/waik/WinPE.cab ]; then
mkwinpeimg --iso --arch=amd64 --waik-dir=./temp/waik ./non-free/windows/winpe.iso
fi
fi
# copy files to tftp server
cp -av ./non-free/windows ${TFTP}/non-free/

11
generate-minimal-menu.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
. ./settings.sh
echo "Generating PXE Menu..."
cat ./resources/default-minimal | \
sed -e "s/__NFSSERVERIP__/${NFSSERVERIP}/g" \
-e "s/__MENUTITLE__/${MENUTUTLE}/g" \
-e "s/__MENUBACKGROUND__/${MENUBACKGROUND}/g" > ${TFTP}/pxelinux.cfg/default
./configure-debian-system.sh

View File

@ -110,7 +110,7 @@ label -
MENU DISABLE
MENU BEGIN
MENU LABEL * Debian Installer...
MENU LABEL * Linux Installer...
LABEL deb12
MENU LABEL * Debian 12 Installer 64Bit Textmodus
@ -134,6 +134,19 @@ MENU BEGIN
MENU EXIT
MENU END
MENU BEGIN
MENU LABEL * Windows Installer...
LABEL win10
MENU LABEL * Windows 10
KERNEL memdisk
INITRD non-free/windows/winpe.iso
APPEND iso raw
LABEL zurueck...
MENU EXIT
MENU END
label -
MENU LABEL Boot- & System-Tools: --------------------
MENU DISABLE

View File

@ -3,8 +3,8 @@ path bios
default bios/vesamenu.c32
TIMEOUT 300
MENU TITLE PXE Bootserver
MENU BACKGROUND splash.png
MENU TITLE PXE __MENUTITLE__
MENU BACKGROUND __MENUBACKGROUND__
LABEL disk0
localboot 0
@ -22,5 +22,9 @@ LABEL demo
KERNEL ipxe.lkrn dhcp && chain http://boot.ipxe.org/demo/boot.php
LABEL fdos
MENU LABEL * iPXE FreeDOS over HTTP
MENU LABEL * iPXE FreeDOS over HTTP and Internet
KERNEL ipxe.lkrn dhcp && sanboot http://boot.ipxe.org/freedos/fdfullcd.iso
LABEL fdos
MENU LABEL * iPXE FreeDOS over HTTP Local Server
KERNEL ipxe.lkrn dhcp && sanboot http://__NFSSERVERIP__/free/FD13LIVE.iso

16
resources/smb.conf Normal file
View File

@ -0,0 +1,16 @@
[global]
workgroup = PXE
map to guest = bad user
usershare allow guests = yes
[tftp]
browsable = true
read only = yes
guest ok = yes
path = /srv/tftp
[windows]
browsable = true
read only = yes
guest ok = yes
path = /srv/tftp/non-free/windows

View File

@ -8,8 +8,9 @@
# 2. configure debian system
./configure-debian-system.sh
# 3. configure full system, copy some stuff (not the non-free...)
./config-full.sh
# 3. configure full system menu
./generate-full-menu.sh
#./generate-minimal-menu.sh
# 4. download free stuff (knoppix...)
./download-free.sh