drive setup added

This commit is contained in:
Nicolas 2022-03-16 20:53:18 +01:00
parent cf44be168e
commit 4934347636
1 changed files with 11 additions and 1 deletions

View File

@ -17,6 +17,8 @@
#Verify user information:
# finger vivek
#echo "/dev/bcache0 /mnt/bcache ext4 rw 0 0" | tee -a /etc/fstab > /dev/null
apt-get update && \
apt-get install -y bcache-tools && \
@ -28,4 +30,12 @@ make-bcache -C /dev/sdd -B /dev/sdb --discard --writeback && \
mkfs.ext4 /dev/bcache0 && \
mkdir /mnt/bcache && \
mount /dev/bcache0 /mnt/bcache && \
mkdir /mnt/bcache/home && \
echo "/dev/bcache0 /mnt/bcache ext4 rw 0 0" >> /etc/fstab
if [ $? -eq 0 ]; then
echo "#" >> /etc/default/useradd
echo "# Modifications:" >> /etc/default/useradd
echo "HOME=/mnt/bcache/home" >> /etc/default/useradd
fi