configured for DHCP and local preseed.cfg
This commit is contained in:
parent
4357bb406a
commit
d445a64bd0
8
.gitignore
vendored
Normal file
8
.gitignore
vendored
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
grub.backup
|
||||||
|
ubuntu-*
|
||||||
|
|
||||||
|
*.iso
|
||||||
|
|
||||||
|
config
|
||||||
|
|
||||||
|
preseed.cfg
|
|
@ -61,21 +61,22 @@ cp -rT /mnt/ubuntu-overssh-iso $PROJECTPATH/ubuntu-overssh-iso
|
||||||
cp $PROJECTPATH/preseed.cfg.template $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
cp $PROJECTPATH/preseed.cfg.template $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
||||||
|
|
||||||
# replace vairables
|
# replace vairables
|
||||||
sed -i 's/timeout 0/timeout 300/g' $PROJECTPATH/ubuntu-overssh-iso/prompt.cfg
|
sed -i 's/timeout 0/timeout 150/g' $PROJECTPATH/ubuntu-overssh-iso/prompt.cfg
|
||||||
sed -i 's/timeout 0/timeout 300/g' $PROJECTPATH/ubuntu-overssh-iso/isolinux.cfg
|
sed -i 's/timeout 0/timeout 150/g' $PROJECTPATH/ubuntu-overssh-iso/isolinux.cfg
|
||||||
|
|
||||||
sed -i "s/INTERFACE_DEV/$INTERFACE_DEV/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
#sed -i "s/INTERFACE_DEV/$INTERFACE_DEV/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
||||||
sed -i "s/INTERFACE_IP/$INTERFACE_IP/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
#sed -i "s/INTERFACE_IP/$INTERFACE_IP/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
||||||
sed -i "s/INTERFACE_NAMESERVERS/$INTERFACE_NAMESERVERS/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
#sed -i "s/INTERFACE_NAMESERVERS/$INTERFACE_NAMESERVERS/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
||||||
sed -i "s/INTERFACE_NETMASK/$INTERFACE_NETMASK/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
#sed -i "s/INTERFACE_NETMASK/$INTERFACE_NETMASK/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
||||||
sed -i "s/INTERFACE_GATEWAY/$INTERFACE_GATEWAY/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
#sed -i "s/INTERFACE_GATEWAY/$INTERFACE_GATEWAY/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
||||||
sed -i "s/COUNTRY_LOWER/$COUNTRY_LOWER/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
sed -i "s/COUNTRY_LOWER/$COUNTRY_LOWER/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
||||||
sed -i "s/COUNTRY/$COUNTRY/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
sed -i "s/COUNTRY/$COUNTRY/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
||||||
sed -i "s/HOSTNAME/$HOSTNAME/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
#sed -i "s/HOSTNAME/$HOSTNAME/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
||||||
sed -i "s/DOMAIN/$DOMAIN/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
#sed -i "s/DOMAIN/$DOMAIN/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
||||||
sed -i "s/PASSWORD/$PASSWORD/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
sed -i "s/PASSWORD/$PASSWORD/g" $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg
|
||||||
|
|
||||||
sed -i "s#append #append priority=critical auto=true preseed/url=$PRESEED_URL netcfg/hostname=$HOSTNAME netcfg/domain=$DOMAIN interface=$INTERFACE_DEV netcfg/disable_dhcp=true netcfg/get_ipaddress=$INTERFACE_IP netcfg/get_netmask=$INTERFACE_NETMASK netcfg/get_gateway=$INTERFACE_GATEWAY netcfg/get_nameservers=$INTERFACE_NAMESERVERS #g" $PROJECTPATH/ubuntu-overssh-iso/txt.cfg
|
sed -i "s#append #append priority=critical auto=true #g" $PROJECTPATH/ubuntu-overssh-iso/txt.cfg
|
||||||
|
#sed -i "s#append #append priority=critical auto=true preseed/url=$PRESEED_URL netcfg/hostname=$HOSTNAME netcfg/domain=$DOMAIN interface=$INTERFACE_DEV netcfg/disable_dhcp=true netcfg/get_ipaddress=$INTERFACE_IP netcfg/get_netmask=$INTERFACE_NETMASK netcfg/get_gateway=$INTERFACE_GATEWAY netcfg/get_nameservers=$INTERFACE_NAMESERVERS #g" $PROJECTPATH/ubuntu-overssh-iso/txt.cfg
|
||||||
|
|
||||||
cp $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg $PROJECTPATH/preseed.cfg
|
cp $PROJECTPATH/ubuntu-overssh-iso/preseed.cfg $PROJECTPATH/preseed.cfg
|
||||||
|
|
||||||
|
|
|
@ -2,18 +2,18 @@ d-i debian-installer/locale string en_US
|
||||||
d-i debian-installer/language string en
|
d-i debian-installer/language string en
|
||||||
d-i debian-installer/country string COUNTRY
|
d-i debian-installer/country string COUNTRY
|
||||||
d-i debian-installer/locale string en_US.UTF-8
|
d-i debian-installer/locale string en_US.UTF-8
|
||||||
d-i netcfg/choose_interface select INTERFACE_DEV
|
d-i netcfg/choose_interface select auto
|
||||||
d-i netcfg/link_wait_timeout string 1
|
d-i netcfg/link_wait_timeout string 1
|
||||||
d-i netcfg/disable_autoconfig boolean true
|
#d-i netcfg/disable_autoconfig boolean true
|
||||||
d-i netcfg/dhcp_failed note
|
#d-i netcfg/dhcp_failed note
|
||||||
d-i netcfg/dhcp_options select Configure network manually
|
#d-i netcfg/dhcp_options select Configure network manually
|
||||||
d-i netcfg/get_ipaddress string INTERFACE_IP
|
#d-i netcfg/get_ipaddress string INTERFACE_IP
|
||||||
d-i netcfg/get_netmask string INTERFACE_NETMASK
|
#d-i netcfg/get_netmask string INTERFACE_NETMASK
|
||||||
d-i netcfg/get_gateway string INTERFACE_GATEWAY
|
#d-i netcfg/get_gateway string INTERFACE_GATEWAY
|
||||||
d-i netcfg/get_nameservers string INTERFACE_NAMESERVERS
|
#d-i netcfg/get_nameservers string INTERFACE_NAMESERVERS
|
||||||
d-i netcfg/confirm_static boolean true
|
#d-i netcfg/confirm_static boolean true
|
||||||
d-i netcfg/hostname string HOSTNAME
|
#d-i netcfg/hostname string HOSTNAME
|
||||||
d-i netcfg/domain string DOMAIN
|
#d-i netcfg/domain string DOMAIN
|
||||||
d-i netcfg/wireless_wep string
|
d-i netcfg/wireless_wep string
|
||||||
d-i hw-detect/load_firmware boolean true
|
d-i hw-detect/load_firmware boolean true
|
||||||
d-i anna/choose_modules string network-console
|
d-i anna/choose_modules string network-console
|
||||||
|
|
Loading…
Reference in New Issue
Block a user