grub with script, added missing packages, removed omz

This commit is contained in:
2025-10-20 10:48:19 +02:00
parent ec127cc3f0
commit 0d649ef863
2 changed files with 49 additions and 10 deletions

23
grub/grub.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
GRUB_FILE="/etc/default/grub"
# Ensure the file exists before proceeding
if [[ -f "$GRUB_FILE" ]]; then
echo "Updating GRUB timeout to 0..."
# Replace or add the GRUB_TIMEOUT line
if grep -q "^GRUB_TIMEOUT=" "$GRUB_FILE"; then
# Modify existing line
sed -i 's/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=0/' "$GRUB_FILE"
else
# Add it if missing
echo "GRUB_TIMEOUT=0" >> "$GRUB_FILE"
fi
grub-mkconfig -o /boot/grub/grub.cfg
echo "GRUB timeout set to 0 and configuration updated."
else
echo "$GRUB_FILE not found!"
fi