mirror of
https://github.com/bohanyang/debi.git
synced 2026-09-27 06:26:15 +00:00
Update default options
This commit is contained in:
@@ -29,33 +29,33 @@ sudo sh -c "$(wget -O - https://github.com/brentybh/debian-netboot/raw/master/ne
|
|||||||
### All Options
|
### All Options
|
||||||
|
|
||||||
- `-c US` Debian Installer Country
|
- `-c US` Debian Installer Country
|
||||||
- `-fqdn localhost.localdomain` FQDN including hostname and domain
|
- `-fqdn unassigned-hostname.unassigned-domain` FQDN including hostname and domain
|
||||||
- `-proto https` Transport protocol for archive mirror only but not security repository (`http`, `https`, `ftp`)
|
- `-proto http` Transport protocol for archive mirror only but not security repository (`http`, `https`, `ftp`)
|
||||||
- `-host dpvctowv9b08b.cloudfront.net` Host for archive mirror only but not security repository
|
- `-host deb.debian.org` Host for archive mirror only but not security repository
|
||||||
- `-dir /debian` Directory path relative to root of the mirror
|
- `-dir /debian` Directory path relative to root of the mirror
|
||||||
- `-suite stretch` Suite (`stable`, `testing`, `stretch`, etc.)
|
- `-suite stretch` Suite (`stable`, `testing`, `stretch`, etc.)
|
||||||
- `-u ubuntu` Username of admin account with sudo privilege
|
- `-u debian` Username of admin account with sudo privilege
|
||||||
- `-p secret` Password of the account **(if not specified, it will be asked interactively)**
|
- `-p secret` Password of the account **(if not specified, it will be asked interactively)**
|
||||||
- `-tz UTC` [Time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)
|
- `-tz UTC` [Time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)
|
||||||
- `-ntp time.google.com` NTP server
|
- `-ntp pool.ntp.org` NTP server
|
||||||
- `-upgrade full-upgrade` Whether to upgrade packages after debootstrap (`none`, `safe-upgrade`, `full-upgrade`)
|
- `-upgrade full-upgrade` Whether to upgrade packages after debootstrap (`none`, `safe-upgrade`, `full-upgrade`)
|
||||||
- `-s https://dpvctowv9b08b.cloudfront.net/debian-security` Custom URL for security repository mirror
|
- `-s http://security.debian.org/debian-security` Custom URL for security repository mirror
|
||||||
- `-ip 1.2.3.4` Configure network manually with an IP address (following options only work when IP address specified)
|
- `-ip 192.168.1.42` Configure network manually with an IP address (following options only work when IP address specified)
|
||||||
- `-cidr 255.255.255.0` Netmask for manual network configuration
|
- `-cidr 255.255.255.0` Netmask for manual network configuration
|
||||||
- `-gw 1.2.3.1` Gateway for manual network configuration
|
- `-gw 192.168.1.1` Gateway for manual network configuration
|
||||||
- `-ns "1.1.1.1 156.154.70.5 8.8.8.8"` DNS for manual network configuration
|
- `-ns "8.8.8.8 8.8.4.4"` DNS for manual network configuration
|
||||||
- `-add "ca-certificates curl openssl"` Include individual additional packages to install
|
- `-add "ca-certificates curl fail2ban openssl whois"` Include individual additional packages to install
|
||||||
- `-ssh secret` Enable network console and specify **password for SSH access during install process**. You can login with `installer` user and check system logs.
|
- `-ssh secret` Enable network console and specify **password for SSH access during install process**. You can login with `installer` user and check system logs.
|
||||||
|
|
||||||
### Chinese Special
|
### Chinese Special
|
||||||
|
|
||||||
If `-c CN` is used, Chinese Special options will be setup for good connectivity and experience against GFW.
|
If `-c CN` is used, Chinese Special options will be setup for good connectivity and experience against GFW.
|
||||||
|
|
||||||
- Default archive mirror is `https://chinanet.mirrors.ustc.edu.cn/debian`.
|
- Default archive mirror is `http://ftp.cn.debian.org/debian`.
|
||||||
- Default security mirror is `https://chinanet.mirrors.ustc.edu.cn/debian-security`.
|
- Default security mirror is `http://ftp.cn.debian.org/debian-security`.
|
||||||
- Default time zone is `Asia/Shanghai`.
|
- Default time zone is `Asia/Shanghai`.
|
||||||
- Default NTP server is `ntp1.aliyun.com`.
|
- Default NTP server is `cn.ntp.org.cn`.
|
||||||
- Default DNS is `1.2.4.8 119.29.29.29`.
|
- Default DNS is `156.154.70.5 156.154.71.5`.
|
||||||
- All custom settings will override above defaults.
|
- All custom settings will override above defaults.
|
||||||
|
|
||||||
## Step 3. Entering Debian Installer
|
## Step 3. Entering Debian Installer
|
||||||
|
|||||||
+12
-12
@@ -101,28 +101,28 @@ done
|
|||||||
|
|
||||||
case "$COUNTRY" in
|
case "$COUNTRY" in
|
||||||
CN)
|
CN)
|
||||||
PROTO=${PROTO:-https}
|
PROTO=${PROTO:-http}
|
||||||
HOST=${HOST:-chinanet.mirrors.ustc.edu.cn}
|
HOST=${HOST:-ftp.cn.debian.org}
|
||||||
TIME_ZONE=${TIME_ZONE:-Asia/Shanghai}
|
TIME_ZONE=${TIME_ZONE:-Asia/Shanghai}
|
||||||
NTP=${NTP:-ntp1.aliyun.com}
|
NTP=${NTP:-cn.ntp.org.cn}
|
||||||
SECURITY=${SECURITY:-true}
|
SECURITY=${SECURITY:-true}
|
||||||
DNS=${DNS:-1.2.4.8 119.29.29.29}
|
DNS=${DNS:-156.154.70.5 156.154.71.5}
|
||||||
esac
|
esac
|
||||||
|
|
||||||
COUNTRY=${COUNTRY:-US}
|
COUNTRY=${COUNTRY:-US}
|
||||||
PROTO=${PROTO:-https}
|
PROTO=${PROTO:-http}
|
||||||
HOST=${HOST:-dpvctowv9b08b.cloudfront.net}
|
HOST=${HOST:-deb.debian.org}
|
||||||
DIR=${DIR:-/debian}
|
DIR=${DIR:-/debian}
|
||||||
ARCH=$(dpkg --print-architecture)
|
ARCH=$(dpkg --print-architecture)
|
||||||
SUITE=${SUITE:-stretch}
|
SUITE=${SUITE:-stretch}
|
||||||
ADMIN=${ADMIN:-ubuntu}
|
ADMIN=${ADMIN:-debian}
|
||||||
TIME_ZONE=${TIME_ZONE:-UTC}
|
TIME_ZONE=${TIME_ZONE:-UTC}
|
||||||
NTP=${NTP:-time.google.com}
|
NTP=${NTP:-pool.ntp.org}
|
||||||
UPGRADE=${UPGRADE:-full-upgrade}
|
UPGRADE=${UPGRADE:-full-upgrade}
|
||||||
DNS=${DNS:-1.1.1.1 156.154.70.5 8.8.8.8}
|
DNS=${DNS:-8.8.8.8 8.8.4.4}
|
||||||
|
|
||||||
if [ -z "$SECURITY" ]; then
|
if [ -z "$SECURITY" ]; then
|
||||||
SECURITY=https://dpvctowv9b08b.cloudfront.net/debian-security
|
SECURITY=http://security.debian.org/debian-security
|
||||||
else
|
else
|
||||||
if [ "$SECURITY" = true ]; then
|
if [ "$SECURITY" = true ]; then
|
||||||
SECURITY=$PROTO://$HOST${DIR%/*}/debian-security
|
SECURITY=$PROTO://$HOST${DIR%/*}/debian-security
|
||||||
@@ -192,8 +192,8 @@ if [ -n "$IP_ADDR" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cat >> preseed.cfg << EOF
|
cat >> preseed.cfg << EOF
|
||||||
d-i netcfg/get_hostname string localhost
|
d-i netcfg/get_hostname string unassigned-hostname
|
||||||
d-i netcfg/get_domain string localdomain
|
d-i netcfg/get_domain string unassigned-domain
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ -n "$FQDN" ]; then
|
if [ -n "$FQDN" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user