fix
This commit is contained in:
parent
a43a3d8218
commit
03a8ee9833
60
debian.sh
60
debian.sh
@ -345,23 +345,46 @@ kernel-packages() {
|
||||
/usr/bin/apt install --reinstall -y linux-image-$(ls /lib/modules/) grub-efi efibootmgr plymouth plymouth-themes btrfs-progs cryptsetup-initramfs linux-image-amd64 linux-headers-amd64 firmware-iwlwifi firmware-linux firmware-linux-nonfree
|
||||
}
|
||||
|
||||
bootloader() {
|
||||
rm -rf /boot/grub/themes
|
||||
mkdir /boot/grub/themes
|
||||
tar xf /etc/default/debian.tar -C /boot/grub/themes/
|
||||
plymouth-set-default-theme -R spacefun
|
||||
echo "$ROOT_MAPPER_NAME UUID=$(/sbin/blkid | grep $BTRFS | cut -d '"' -f2) none luks" >/etc/crypttab
|
||||
if [ "$AUTO_DECRYPT" == "True" ]; then
|
||||
decryptBoot
|
||||
secure-boot() {
|
||||
if [ -z "$1" ]; then
|
||||
clear
|
||||
echo
|
||||
echo "Error: No Disk specified!"
|
||||
echo
|
||||
else
|
||||
clear
|
||||
echo
|
||||
echo "Disabling Automatic Password Decryption for Hard Disk....."
|
||||
echo
|
||||
AUTO_DECRYPT='False'
|
||||
bootloader "$1"
|
||||
fi
|
||||
/sbin/update-initramfs -c -k all
|
||||
echo "GRUB_CMDLINE_LINUX_DEFAULT=\"quiet splash\"" >/etc/default/grub
|
||||
echo "GRUB_CMDLINE_LINUX=cryptdevice=UUID=$(/sbin/blkid | grep $BTRFS | cut -d '"' -f2):$ROOT_MAPPER_NAME root=UUID=$(/sbin/blkid | grep $ROOT_MAPPER_NAME | cut -d '"' -f4) rootflags=subvol@${ROOT_NAME} mitigations=-off" >>/etc/default/grub
|
||||
echo "GRUB_ENABLE_CRYPTODISK=y" >>/etc/default/grub
|
||||
echo "GRUB_DISABLE_OS_PROBER=false" >>/etc/default/grub
|
||||
echo "GRUB_THEME=/boot/grub/themes/theme.txt" >>/etc/default/grub
|
||||
/sbin/grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debian
|
||||
/sbin/update-grub
|
||||
}
|
||||
|
||||
bootloader() {
|
||||
if [ -z "$1" ]; then
|
||||
echo
|
||||
echo "Error: No Disk specified!"
|
||||
echo
|
||||
else
|
||||
rm -rf /boot/grub/themes
|
||||
mkdir /boot/grub/themes
|
||||
tar xf /etc/default/debian.tar -C /boot/grub/themes/
|
||||
plymouth-set-default-theme -R spacefun
|
||||
echo "$ROOT_MAPPER_NAME UUID=$(/sbin/blkid | grep $BTRFS | cut -d '"' -f2) none luks" >/etc/crypttab
|
||||
if [ "$AUTO_DECRYPT" == "True" ]; then
|
||||
decryptBoot
|
||||
fi
|
||||
/sbin/update-initramfs -c -k all
|
||||
echo "GRUB_CMDLINE_LINUX_DEFAULT=\"quiet splash\"" >/etc/default/grub
|
||||
echo "GRUB_CMDLINE_LINUX=cryptdevice=UUID=$(/sbin/blkid | grep $BTRFS | cut -d '"' -f2):$ROOT_MAPPER_NAME root=UUID=$(/sbin/blkid | grep $ROOT_MAPPER_NAME | cut -d '"' -f4) rootflags=subvol@${ROOT_NAME} mitigations=-off" >>/etc/default/grub
|
||||
echo "GRUB_ENABLE_CRYPTODISK=y" >>/etc/default/grub
|
||||
echo "GRUB_DISABLE_OS_PROBER=false" >>/etc/default/grub
|
||||
echo "GRUB_THEME=/boot/grub/themes/theme.txt" >>/etc/default/grub
|
||||
/sbin/grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debian
|
||||
/sbin/update-grub
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function setup_script() {
|
||||
@ -561,6 +584,7 @@ show-help() {
|
||||
echo "./debian.sh install [disk]"
|
||||
echo "./debian.sh backup [device name] [home]"
|
||||
echo "./debian.sh restore [disk] [backup name] [home] [tar dir]"
|
||||
echo "./debian.sh secure-boot [disk]"
|
||||
echo "./debian.sh chroot [disk]"
|
||||
echo "./debian.sh wifi"
|
||||
echo "./debian.sh bootloader [disk]"
|
||||
@ -595,9 +619,11 @@ elif [ "$1" = "accounts" ]; then
|
||||
elif [ "$1" = "flatpaks" ]; then
|
||||
flatpaks
|
||||
elif [ "$1" = "bootloader" ]; then
|
||||
bootloader "$1"
|
||||
bootloader "$2"
|
||||
elif [ "$1" = "snapshot" ]; then
|
||||
snapshots
|
||||
elif [ "$1" = "secure-boot" ]; then
|
||||
secure-boot "$2"
|
||||
elif [ "$1" = "backup" ]; then
|
||||
os-backup "$2" "$3"
|
||||
elif [ "$1" = "server-config" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user