Reinstall Ubuntu remotely using SSH
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
560 B

5 years ago
5 years ago
5 years ago
3 years ago
5 years ago
  1. #!/bin/bash
  2. # country
  3. COUNTRY='IR'
  4. # network: check network before create iso file
  5. INTERFACE_DEV='eth0'
  6. INTERFACE_IP='10.1.1.100'
  7. INTERFACE_NETMASK='255.255.255.0'
  8. INTERFACE_GATEWAY='10.1.1.1'
  9. INTERFACE_NAMESERVERS='4.2.2.4'
  10. # preseed file: upload created preseed.cfg to your own host before reboot system
  11. PRESEED_URL="http://yourserver.tld/preseed.cfg"
  12. # ssh installer password
  13. PASSWORD="tHISiSpASSWORD"
  14. # hostname and domain
  15. HOSTNAME="${INTERFACE_IP//\./\-}"
  16. DOMAIN="example.tld"
  17. # lowercase of country code dont change it
  18. COUNTRY_LOWER="${COUNTRY,,}"