From 89efbba2405e48cbfb916e4d5e109fabb0d501c9 Mon Sep 17 00:00:00 2001 From: cyteen Date: Mon, 16 Mar 2026 00:33:26 +0000 Subject: [PATCH] Renamed to put them in the grub namespace. --- 001_docker_grub-commandline.sh | 30 ------------------------------ 001_grub_gfxmode.sh | 19 ------------------- 001_prevent_udev_net-rename.sh | 8 -------- 010_console-blanking.sh | 7 ------- 4 files changed, 64 deletions(-) delete mode 100755 001_docker_grub-commandline.sh delete mode 100755 001_grub_gfxmode.sh delete mode 100755 001_prevent_udev_net-rename.sh delete mode 100644 010_console-blanking.sh diff --git a/001_docker_grub-commandline.sh b/001_docker_grub-commandline.sh deleted file mode 100755 index 029821c..0000000 --- a/001_docker_grub-commandline.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -# https://fabianlee.org/2020/01/18/docker-placing-limits-on-container-memory-using-cgroups/ - -# Internally Docker uses cgroups to limit memory resources, and in its simplest form is exposed as the flags “-m” and “–memory-swap” when bringing up a docker container. - -# sudo docker run -it -m 8m --memory-swap 8m alpine:latest /bin/sh - -# If you see the message above, or “WARNING: Your kernel does not support cgroup swap limit.”, -# then modify “/etc/default/grub” as below: - -## Docker likes kernel swappiness support (on reboot) -bash -c "$(perl -p -i -e 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="cgroup_enable=memory"/g' /etc/default/grub)" - -#Now that your server supports swap limit capabilities in your docker run command you can use --memory-swappiness=0 and set --memory-swap equal to --memory. You also need to set -Des.bootstrap.mlockall=true on the docker run commandline. - -# eg. -# https://stefanprodan.com/2016/elasticsearch-cluster-with-docker/ - -# docker run -d -p 9200:9200 \ -# --name es-t0 \ -# --network es-net \ -# -v "$PWD/storage":/usr/share/elasticsearch/data \ -# --cap-add=IPC_LOCK --ulimit nofile=65536:65536 --ulimit memlock=-1:-1 \ -# --memory="2g" --memory-swap="2g" --memory-swappiness=0 \ -# -e ES_HEAP_SIZE="1g" \ -# es-t \ -# -Des.bootstrap.mlockall=true \ -# -Des.network.host=_eth0_ \ -# -Des.discovery.zen.ping.multicast.enabled=false diff --git a/001_grub_gfxmode.sh b/001_grub_gfxmode.sh deleted file mode 100755 index 2fa5d39..0000000 --- a/001_grub_gfxmode.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -# test script for 256 color on the fb console. https://www.robmeerman.co.uk/unix/256colours -#wget -c -O /var/tmp/256color.pl https://gist.githubusercontent.com/hSATAC/1095100/raw/ee5b4d79aee151248bdafa8b8412497a5a688d42/256color.pl - -# supported modes can be found at the grub console with 'vbeinfo' or 'videoinfo -# 0x17d 1920x1200x32 vga=381 -# 0x17c 1920x1200x8 vga=380 - -## Add this to the /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT -gfxmode="1920x1200x32,1920x1200x8" -sed -i "s|^\(GRUB_GFXMODE=\).*|\1\"$gfxmode\"|" /etc/default/grub -sed -i '/^GRUB_GFXMODE=.*/ s/.*/&\nGRUB_GFXPAYLOAD_LINUX=\"keep\"/' /etc/default/grub - - -# DEPRICATED: vesafb requires a vga= on the kernel commandline. -#sed -i 's,^\(GRUB_CMDLINE_LINUX=\).*,\1'\"vga=381\"',' /etc/default/grub - -mount /boot/grub -update-grub diff --git a/001_prevent_udev_net-rename.sh b/001_prevent_udev_net-rename.sh deleted file mode 100755 index 161072b..0000000 --- a/001_prevent_udev_net-rename.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# prevent renaming of network interfaces by udev -#ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules - -## Add this to the /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT -#sed -i 's,^\(GRUB_CMDLINE_LINUX=\).*,\1'\"net.ifnames=0\"',' /etc/default/grub - - diff --git a/010_console-blanking.sh b/010_console-blanking.sh deleted file mode 100644 index 1f0f5e4..0000000 --- a/010_console-blanking.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env zsh - -# NEWARG="processor.ignore_ppc=1" -NEWARG="consoleblank=3" -sed -i -E "s|^(GRUB_CMDLINE_LINUX_DEFAULT=\"[^\"]*)\"|\1 ${NEWARG}\"|" /etc/default/grub -update_grub -