- A clean normally running true virtualization (e.g. KVM) VPS with GRUB2 and VNC access. This script have been tested on SolusVM KVM VPS & Alibaba Cloud ECS with Debian 8/9 & Ubuntu 16.04/18.04.
- A clean normally running true virtualization (e.g. KVM) VPS with GRUB2 and VNC access. This script have been tested on SolusVM KVM VPS & Alibaba Cloud ECS with Debian 9 & Ubuntu 16.04.
- Then check `/etc/default/grub` with your preferred editor (e.g. `nano` or `vi`).
- Then check `/etc/default/grub` with your preferred editor (e.g. `nano` or `vi`).
- Set `GRUB_DEFAULT` to `debian-netboot-installer` select the installer to boot automatically after timeout.
- Set `GRUB_DEFAULT` to `debian-netboot-installer` select the installer to boot automatically after timeout.
- Make sure there's reasonable number for `GRUB_TIMEOUT`**timeout**. You can just set `GRUB_TIMEOUT=30` which will be fine.
- Make sure there's reasonable number for `GRUB_TIMEOUT`**timeout**. You can just set `GRUB_TIMEOUT=10` which will be fine.
- Make sure there's **no**`GRUB_HIDDEN_TIMEOUT_QUIET` and `GRUB_HIDDEN_TIMEOUT`. **Just delete them.**
- Make sure there's **no**`GRUB_HIDDEN_TIMEOUT_QUIET` and `GRUB_HIDDEN_TIMEOUT`. **Just delete them.**
Install dependencies:
Install dependencies:
@ -22,46 +22,55 @@ Replace following `<OPTIONS>` with your options.
sudo sh -c "$(wget -qO- https://github.com/brentybh/debian-netboot/raw/master/netboot.sh)" -- <OPTIONS>
sudo sh -c "$(wget -qO- https://github.com/brentybh/debian-netboot/raw/master/netboot.sh)" -- <OPTIONS>
```
```
**Remember** to enter your current user's password for `sudo` (if need) and then enter the new user's password (if not specified by `-p`).
**Remember** to enter your current user's password for `sudo` (if need) and then enter the new user's password (if not specified by `--password`).
### All Options
### All Options
- `-c CN`~~Debian Installer Country~~ Only useful for the *Chinese Special* settings
- `--template foobar` Selected template (see below)
- `-fqdn debian` FQDN including hostname and domain. Priority: `-fqdn` option > rDNS > `debian` as default.
- `--hostname debian` Hostname. Precedence: provided value > reverse DNS record > the default value `debian`
- `-proto http` Transport protocol for archive mirror only but not security repository (`http`, `https`, `ftp`)
- `--protocol http` Transport protocol to use with the repository mirror (not for the security mirror). Possible values: `http`, `https`, `ftp`, etc.
- `-host deb.debian.org` Host for archive mirror only but not security repository
- `--mirror deb.debian.org` Hostname of the repository mirror (not for the security mirror)
- `-dir /debian` Directory path relative to root of the mirror
- `--directory /debian` Directory of the repository mirror
- `-suite stretch` Suite (`stable`, `testing`, `stretch`, etc.)
- `--suite stretch` Selected suite to install (`stable`, `testing`, `stretch`, etc.)
- `-u debian` Username of admin account with sudo privilege
- `--username debian` Username of the administrator account with sudo privilege
- `-p secret` Password of the account **(if not specified, it will be asked interactively)**
- `--password secret` Password of the account **(if not specified, it will be asked interactively)**
- `-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 http://security.debian.org/debian-security` Custom URL for security repository mirror
- `--security-mirror http://security.debian.org/debian-security` Specify a URL for the security mirror or set to `true` to use the same mirror as the repository mirror instead of the default one
- `-fs ext4` Filesystem for partition
- `--filesystem ext4` Filesystem for partition
- `-crypto` Full disk encryption (Can't be fully automated at current time. Need VNC connection to go through the steps)
- `--disk-encryption` Enable full disk encryption. Since it can't be fully automated currently, you'll need physical console (VNC) access to go through the steps
- `-ip 192.168.1.42` Configure network manually with an IP address **(the following** `-cidr`**,** `-gw`**and**`-dns` **options only work when an IP address is specified)**
- `--ip 12.34.56.78` Configure network manually with an IP address **(the following** `-cidr`**,** `-gw`**and**`-dns` **options only work when an IP address is specified)**
- `-cidr 255.255.255.0` Netmask for manual network configuration
- `--netmask 255.255.255.0` Netmask for manual network configuration
- `-gw 192.168.1.1` Gateway for manual network configuration
- `--gateway 12.34.56.1` Gateway for manual network configuration
- `-ns "8.8.8.8 8.8.4.4"` DNS for manual network configuration
- `--dns "1.1.1.1 1.0.0.1"` DNS for manual network configuration
- `-add "ca-certificates curl fail2ban openssl whois"` Include individual additional packages to install
- `--include "ca-certificates curl fail2ban openssl whois"` Include 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.
- `--manual` Manually configure user account and disk partition, etc. Network connection, the repository and security mirrors, time zone and NTP server are already auto-configured
- `-ssh-pubkey https://example.com/id_rsa.pub` Enable network console and specify **SSH public key for SSH access during install process**. You can login with `installer` user and check system logs. You can't access with password if a public key is provided here.
- `--ssh-password installerSecret` Enable SSH access to the installer with a password. You can login to `installer` user and continue installation manually or just check system logs.
- `-dry-run` Generate `preseed.cfg` and save to current dir but don't actually do anything
- `--ssh-keys https://example.com/.ssh/authorized_keys` Enable SSH access to the installer with a URL of the file contains authorized public keys. (see above) You can't access with password if authorized public keys are provided here.
- `-manually` Manually configure user account and disk partition, etc. (Network, repository mirror & time related settings will be auto-configured)
- `--dry-run` Generate `preseed.cfg` and save to current directory but don't actually do anything
- `-arch amd64` Specify architecture (useful under CentOS)
- `--architecture amd64` Specify an architecture (useful under CentOS)
- `-lvm` Use `/` as the boot root path for the `grub.cfg` instead of `/boot`, useful under LVM partition disks
- `--boot-partition` Use `/` as the boot directory for the GRUB boot entry instead of `/boot`, useful under LVM machines with an independent boot partition
### Chinese Special
### Templates
If `-c CN` is used, Chinese Special options will be setup for good connectivity and experience against GFW.
You can select a template for quickly applying options. All custom settings will override template values.
- Default archive mirror is `https://chinanet.mirrors.ustc.edu.cn/debian`.
#### `china`
- Default security mirror is `https://chinanet.mirrors.ustc.edu.cn/debian-security`.
- Default time zone is `Asia/Shanghai`.
- `--protocol https`
- Default NTP server is `cn.ntp.org.cn`.
- `--mirror chinanet.mirrors.ustc.edu.cn`
- Default DNS is `156.154.70.5 156.154.71.5`.
- `--security-mirror true`
- All custom settings will override above defaults.