restored remote URL

This commit is contained in:
Ubuntu 2020-11-22 10:45:09 +00:00
parent 4e63fa26bf
commit 0b15928285
2 changed files with 13 additions and 13 deletions

View File

@ -58,7 +58,7 @@ mkdir $PROJECTPATH/ubuntu-overssh-iso
cp -rT /mnt/ubuntu-overssh-iso $PROJECTPATH/ubuntu-overssh-iso cp -rT /mnt/ubuntu-overssh-iso $PROJECTPATH/ubuntu-overssh-iso
# create preseed # create preseed
#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 150/g' $PROJECTPATH/ubuntu-overssh-iso/prompt.cfg sed -i 's/timeout 0/timeout 150/g' $PROJECTPATH/ubuntu-overssh-iso/prompt.cfg
@ -69,16 +69,16 @@ sed -i 's/timeout 0/timeout 150/g' $PROJECTPATH/ubuntu-overssh-iso/isolinux.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 debian-installer/locale=en_US debian-installer/language=en debian-installer/country=$COUNTRY debian-installer/locale=en_US.UTF-8 netcfg/choose_interface=auto hw-detect/load_firmware=true anna/choose_modules=network-console network-console/password=$PASSWORD network-console/password-again=$PASSWORD #g" $PROJECTPATH/ubuntu-overssh-iso/txt.cfg sed -i "s#append #append priority=critical auto=true preseed/url=$PRESEED_URL debian-installer/locale=en_US debian-installer/language=en debian-installer/country=$COUNTRY debian-installer/locale=en_US.UTF-8 netcfg/choose_interface=auto hw-detect/load_firmware=true anna/choose_modules=network-console #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 #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
mkisofs -D -r -V UBUNTU_SERVER -cache-inodes -J -l -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o $PROJECTPATH/ubuntu-overssh-reinstall.iso $PROJECTPATH/ubuntu-overssh-iso mkisofs -D -r -V UBUNTU_SERVER -cache-inodes -J -l -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o $PROJECTPATH/ubuntu-overssh-reinstall.iso $PROJECTPATH/ubuntu-overssh-iso

14
grub.sh
View File

@ -78,10 +78,10 @@ sed -i "s/GRUB_DEFAULT=0/GRUB_DEFAULT='$BOOTABLEGRUBNAME'/g" /etc/default/grub
update-grub update-grub
#echo "1. Upload 'preseed.cfg' file for $PRESEED_URL" echo "1. Upload 'preseed.cfg' file for $PRESEED_URL"
#echo " ==================================== " echo " ==================================== "
#cat $PROJECTPATH/preseed.cfg cat $PROJECTPATH/preseed.cfg
#echo " ==================================== " echo " ==================================== "
echo "1. Reboot current machine and wait to init to ssh installer" echo "2. Reboot current machine and wait to init to ssh installer"
echo "2. Connect using ssh client ssh installer@$INTERFACE_IP" echo "3. Connect using ssh client ssh installer@$INTERFACE_IP"
echo "3. Your password is $PASSWORD" echo "4. Your password is $PASSWORD"