mirror of
https://github.com/bohanyang/debi.git
synced 2026-09-27 06:26:15 +00:00
Add grub timeout option
This commit is contained in:
@@ -72,6 +72,7 @@ This script is written to reinstall a VPS/virtual machine to Debian 10 Buster.
|
|||||||
* `--boot-partition` Should be used if `/boot` directory is mounted from a dedicated partition like a LVM setup
|
* `--boot-partition` Should be used if `/boot` directory is mounted from a dedicated partition like a LVM setup
|
||||||
* `--firmware` Load additional [non-free firmwares](https://wiki.debian.org/Firmware#Firmware_during_the_installation)
|
* `--firmware` Load additional [non-free firmwares](https://wiki.debian.org/Firmware#Firmware_during_the_installation)
|
||||||
* `--force-efi-extra-removable` [See](https://wiki.debian.org/UEFI#Force_grub-efi_installation_to_the_removable_media_path). **Useful on Oracle Cloud**
|
* `--force-efi-extra-removable` [See](https://wiki.debian.org/UEFI#Force_grub-efi_installation_to_the_removable_media_path). **Useful on Oracle Cloud**
|
||||||
|
* `--grub-timeout 5` How many seconds the GRUB menu shows **before entering the installer**
|
||||||
* `--dry-run` Print generated preseed and GRUB entry without downloading the installer and actually saving them
|
* `--dry-run` Print generated preseed and GRUB entry without downloading the installer and actually saving them
|
||||||
|
|
||||||
## Presets
|
## Presets
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ architecture=
|
|||||||
boot_directory=/boot/
|
boot_directory=/boot/
|
||||||
firmware=false
|
firmware=false
|
||||||
force_efi_extra_removable=false
|
force_efi_extra_removable=false
|
||||||
|
grub_timeout=5
|
||||||
dry_run=false
|
dry_run=false
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
@@ -228,6 +229,10 @@ while [ $# -gt 0 ]; do
|
|||||||
--force-efi-extra-removable)
|
--force-efi-extra-removable)
|
||||||
force_efi_extra_removable=true
|
force_efi_extra_removable=true
|
||||||
;;
|
;;
|
||||||
|
--grub-timeout)
|
||||||
|
grub_timeout=$2
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--dry-run)
|
--dry-run)
|
||||||
dry_run=true
|
dry_run=true
|
||||||
;;
|
;;
|
||||||
@@ -557,9 +562,9 @@ if [ "$dry_run" != true ]; then
|
|||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
mkdir -p /etc/default/grub.d
|
mkdir -p /etc/default/grub.d
|
||||||
tee /etc/default/grub.d/zz-debi.cfg 1>&2 << 'EOF'
|
tee /etc/default/grub.d/zz-debi.cfg 1>&2 << EOF
|
||||||
GRUB_DEFAULT=debi
|
GRUB_DEFAULT=debi
|
||||||
GRUB_TIMEOUT=5
|
GRUB_TIMEOUT=$grub_timeout
|
||||||
GRUB_TIMEOUT_STYLE=menu
|
GRUB_TIMEOUT_STYLE=menu
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user