mirror of
https://github.com/classy-giraffe/easy-arch.git
synced 2025-11-17 19:40:55 +00:00
Add AppArmor
This commit is contained in:
parent
ca663e6710
commit
0e62ae704e
1 changed files with 5 additions and 1 deletions
|
|
@ -142,7 +142,7 @@ kernel_selector
|
||||||
|
|
||||||
# Pacstrap (setting up a base sytem onto the new root).
|
# Pacstrap (setting up a base sytem onto the new root).
|
||||||
echo "Installing the base system (it may take a while)."
|
echo "Installing the base system (it may take a while)."
|
||||||
pacstrap /mnt base $kernel $microcode linux-firmware btrfs-progs grub grub-btrfs efibootmgr snapper sudo
|
pacstrap /mnt base $kernel $microcode linux-firmware btrfs-progs grub grub-btrfs efibootmgr snapper sudo apparmor
|
||||||
|
|
||||||
network_selector
|
network_selector
|
||||||
|
|
||||||
|
|
@ -178,6 +178,7 @@ sed -i -e 's,modconf block filesystems keyboard,keyboard keymap modconf block en
|
||||||
# Setting up LUKS Keyfile, BTRFS Booting and encryption in GRUB and initramfs.
|
# Setting up LUKS Keyfile, BTRFS Booting and encryption in GRUB and initramfs.
|
||||||
UUID=$(blkid $Cryptroot | cut -f2 -d'"')
|
UUID=$(blkid $Cryptroot | cut -f2 -d'"')
|
||||||
sed -i "s,quiet,quiet cryptdevice=UUID=$UUID:cryptroot root=$BTRFS,g" /mnt/etc/default/grub
|
sed -i "s,quiet,quiet cryptdevice=UUID=$UUID:cryptroot root=$BTRFS,g" /mnt/etc/default/grub
|
||||||
|
sed -i "s#root=/dev/mapper/cryptroot#root=/dev/mapper/cryptroot lsm=lockdown,yama,apparmor,bpf#g" /mnt/etc/default/grub
|
||||||
|
|
||||||
# Security kernel settings.
|
# Security kernel settings.
|
||||||
echo "kernel.kptr_restrict = 2" > /mnt/etc/sysctl.d/51-kptr-restrict.conf
|
echo "kernel.kptr_restrict = 2" > /mnt/etc/sysctl.d/51-kptr-restrict.conf
|
||||||
|
|
@ -223,6 +224,9 @@ arch-chroot /mnt /bin/bash -e <<EOF
|
||||||
echo "Creating GRUB config file."
|
echo "Creating GRUB config file."
|
||||||
grub-mkconfig -o /boot/grub/grub.cfg &>/dev/null
|
grub-mkconfig -o /boot/grub/grub.cfg &>/dev/null
|
||||||
|
|
||||||
|
# Enabling AppArmor
|
||||||
|
systemctl enable apparmor --root=/mnt &>/dev/null
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Setting root password.
|
# Setting root password.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue