Force lowmem (fixes #45) (#66)

* Add --force-lowmem

* Fix
pull/67/head
Brent, Bohan Yang 3 years ago committed by GitHub
parent 7e0f88b8e6
commit ff0a4904d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      README.md
  2. 8
      debi.sh

@ -147,6 +147,7 @@ Otherwise, you can run this command to revert all changes made by the script:
* `--firmware` Load additional [non-free firmwares](https://wiki.debian.org/Firmware#Firmware_during_the_installation)
* `--no-force-efi-extra-removable` [See](https://wiki.debian.org/UEFI#Force_grub-efi_installation_to_the_removable_media_path)
* `--grub-timeout 5` How many seconds the GRUB menu shows before entering the installer
* `--force-lowmem <integer>` Valid values: 0, 1, 2. Force [low memory level](https://salsa.debian.org/installer-team/lowmem). Useful if your machine has memory less than 500M where level 2 is set (see issue #45). `--force-lowmem 1` may solve it.
* `--dry-run` Print generated preseed and GRUB entry without downloading the installer and actually saving them
### Presets

@ -228,6 +228,7 @@ install_recommends=true
install='ca-certificates libpam-systemd'
upgrade=
kernel_params=
force_lowmem=
bbr=false
ssh_port=
hold=false
@ -348,6 +349,11 @@ while [ $# -gt 0 ]; do
--no-part|--no-disk-partitioning)
disk_partitioning=false
;;
--force-lowmem)
[ "$2" != 0 ] && [ "$2" != 1 ] && [ "$2" != 2 ] && err 'Low memory level can only be 0, 1 or 2'
force_lowmem=$2
shift
;;
--disk)
disk=$2
shift
@ -822,6 +828,8 @@ installer_directory=$(grub2-mkrelpath "$mkrelpath" 2> /dev/null) || {
kernel_params="$kernel_params lowmem/low=1"
[ -n "$force_lowmem" ] && kernel_params="$kernel_params lowmem=+$force_lowmem"
initrd="$installer_directory/initrd.gz"
[ "$firmware" = true ] && initrd="$initrd $installer_directory/firmware.cpio.gz"

Loading…
Cancel
Save