Commit 7957e95e authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

Add debian 12 and configure hydro66 server in Lille office

parent 96cbe629
......@@ -20,6 +20,16 @@ then
ln -s debian-installer/amd64/grubx64.efi
fi
}
download_debian_12_if_needed() {
if [ ! -d debian-installer ]
then
rm -f netboot.tar.gz
rm -f grubx64.efi
wget http://ftp.debian.org/debian/dists/bookworm/main/installer-amd64/current/images/netboot/netboot.tar.gz
tar -xzvf netboot.tar.gz
ln -s debian-installer/amd64/grubx64.efi
fi
}
download_sysrescuecd_if_needed() {
if [ ! -f sysresccd/sysresccd/pkglist.x86_64.txt ]
then
......@@ -52,8 +62,7 @@ download_ubuntu_22_if_needed() {
download_debian_10_if_needed
if [ ! -d ubuntu-installer ]
then
rm -f netboot.tar.gz
wget https://releases.ubuntu.com/22.04.4/ubuntu-22.04.4-live-server-amd64.iso
[ -f ubuntu-22.04.4-live-server-amd64.iso ] || wget https://old-releases.ubuntu.com/releases/jammy/ubuntu-22.04.4-live-server-amd64.iso
mkdir ubuntu-installer
mount -o loop ubuntu-22.04.4-live-server-amd64.iso ubuntu-installer
fi
......
......@@ -5,15 +5,15 @@ SCRIPT_DIR=$(realpath `dirname "$0"`)
cd $SCRIPT_DIR
. $SCRIPT_DIR/../download_boot_systems.sh
download_debian_10_if_needed
download_sysrescuecd_if_needed
download_debian_12_if_needed
#download_sysrescuecd_if_needed
#UPDATE THOSE VARIABLES DEPENDING ON YOUR SITE
MY_IF_NAME=VLAN100
MY_IP_ADDR=10.0.45.1
MY_IF_NAME=eth0
MY_IP_ADDR=192.168.46.2
DHCP_RANGE=10.0.45.100,static,255.255.255.0
ROUTER_ADDR=10.0.45.1
DNS_SERVER=1.2.4.8
ROUTER_ADDR=192.168.46.2
DNS_SERVER=1.1.1.1
#This is to make linux output visible in IPMI SOL. Remove if you are using a graphical card.
common=console=ttyS1,57600
......
......@@ -5,7 +5,7 @@ SCRIPT_DIR=$(realpath `dirname "$0"`)
cd $SCRIPT_DIR
. $SCRIPT_DIR/../download_boot_systems.sh
download_debian_11_if_needed
download_debian_12_if_needed
download_ubuntu_22_if_needed
#download_sysrescuecd_if_needed
......@@ -30,6 +30,14 @@ elif [ \$net_default_mac = 00:22:4d:da:ca:87 ];
then
set hostname=lille-edu-capri-001
set interface=eno1
elif [ \$net_default_mac = 00:22:4d:dd:65:2c ];
then
set hostname=hydro66-capri-001
set interface=eno1
elif [ \$net_default_mac = 00:22:4d:dd:64:72 ];
then
set hostname=hydro66-capri-002
set interface=eno1
elif [ \$net_default_mac = 00:22:4d:da:ca:a7 ];
then
set hostname=lille-edu-capri-002
......@@ -84,7 +92,7 @@ EOF
) >debian-installer/amd64/grub/grub.cfg
for hostname in lille-edu-leopard-000 lille-edu-tiogapass-001 lille-edu-capri-001 lille-edu-capri-002 lille-edu-tiogapass-003 lille-edu-tiogapass-004
for hostname in lille-edu-leopard-000 lille-edu-tiogapass-001 lille-edu-capri-001 lille-edu-capri-002 lille-edu-tiogapass-003 lille-edu-tiogapass-004 hydro66-capri-001 hydro66-capri-002
do
mkdir -p $hostname
cat > $hostname/interfaces <<EOF
......@@ -152,3 +160,7 @@ exec dnsmasq -d --port=0 --log-dhcp \
--dhcp-host=4c:38:d5:1e:ef:f0,192.168.46.136,1h \
--dhcp-host=4c:38:d5:1d:ac:59,192.168.46.137,1h \
--dhcp-host=4c:38:d5:1d:ac:5a,192.168.46.138,1h \
--dhcp-host=00:22:4d:dd:65:2d,192.168.46.139,1h \
--dhcp-host=00:22:4d:dd:65:2c,192.168.46.140,1h \
--dhcp-host=00:22:4d:dd:64:73,192.168.46.141,1h \
--dhcp-host=00:22:4d:dd:64:72,192.168.46.142,1h \
......@@ -33,7 +33,7 @@ d-i pkgsel/include string ssh aptitude bwm-ng ca-certificates dbus-user-session
# - enable page up/down to search the history
d-i preseed/late_command string set -e; \
cd /target/root; sed -i /^mesg/q .profile; \
mkdir -m 0700 .ssh; cd .ssh; tftp -g -r authorized_keys 192.168.46.2; \
mkdir -m 0700 -p .ssh; cd .ssh; tftp -g -r authorized_keys 192.168.46.2; \
cd ../../etc; rm -f grub.d/30_otheros; echo LANG=C.UTF-8 >default/locale; \
sed -i '/history-search-/s/# //' inputrc; \
cd network; tftp -g -r `hostname`/interfaces 192.168.46.2; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment