So i am trying to write a script for hardening Ubuntu based on CIS benchmarks, this is what recommended for /var:CIS benchmark details
for testing purpose i have installed a new Ubuntu 22.04 in Vbox,
findmnt --kernel /var
has no output, so /var is not mounted.
My question is how do I mount /var as a separate partition, i have tried adding /dev/sda3 /var ext4 defaults 2 2
to the /etc/fstab
file and run mount -a
command to mount /var
, this does not give any error and also shows in the list when i run findmnt --kernel
, but when i reboot the system, the OS crashes.
Please help me in implementing this.
sudo parted -l
i only get/dev/sda
partion and it will remove the OS if i partiton this for mounting /var @Raffa – goose57 Dec 26 '23 at 04:44