From 1d964c7c0b088921142eae5d03e3f28ceb88bd19 Mon Sep 17 00:00:00 2001 From: Bohan Yang Date: Wed, 14 Aug 2019 15:05:43 +0800 Subject: [PATCH] Add --ethn --- README.md | 1 + netboot.sh | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bb437ec..30722cb 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ This script is used to re-install VPS to **Debian 9 (stretch) or 10 (buster)** w - `--gateway` - `--ns "8.8.8.8 8.8.4.4"` - `--hostname debian` + - `--ethn` Disable Consistent Network Device Naming - `--ssh-password` - `--ssh-keys` - `--protocol http` [`http`, `https`, `ftp`] diff --git a/netboot.sh b/netboot.sh index bb3b57d..c368a7c 100644 --- a/netboot.sh +++ b/netboot.sh @@ -62,6 +62,8 @@ while [ $# -gt 0 ]; do DEBI_HOSTNAME=$2 shift ;; + --ethn) + DEBI_KERNEL_PARAMS=' net.ifnames=0 biosdevname=0' --ssh-password) DEBI_SSH=true DEBI_SSH_PASSWORD=$2 @@ -484,7 +486,7 @@ menuentry 'Debian Installer' --id debi { insmod part_msdos insmod part_gpt insmod ext2 -linux $DEBI_NEW_DIR/linux +linux $DEBI_NEW_DIR/linux$DEBI_KERNEL_PARAMS initrd $DEBI_NEW_DIR/initrd.gz } EOF