mirror of
https://github.com/tommytran732/Arch-Setup-Script
synced 2024-11-09 12:11:33 -05:00
Update install.sh
This commit is contained in:
parent
52f69f8ac8
commit
e9a5bae6c0
18
install.sh
18
install.sh
@ -112,17 +112,15 @@ echo "Creating BTRFS subvolumes."
|
|||||||
btrfs su cr /mnt/@ &>/dev/null
|
btrfs su cr /mnt/@ &>/dev/null
|
||||||
btrfs su cr /mnt/@boot &>/dev/null
|
btrfs su cr /mnt/@boot &>/dev/null
|
||||||
btrfs su cr /mnt/@home &>/dev/null
|
btrfs su cr /mnt/@home &>/dev/null
|
||||||
btrfs su cr /mnt/@snapshots &>/dev/null
|
|
||||||
btrfs su cr /mnt/@var &>/dev/null
|
btrfs su cr /mnt/@var &>/dev/null
|
||||||
|
|
||||||
# Mounting the newly created subvolumes.
|
# Mounting the newly created subvolumes.
|
||||||
umount /mnt
|
umount /mnt
|
||||||
echo "Mounting the newly created subvolumes."
|
echo "Mounting the newly created subvolumes."
|
||||||
mount -o ssd,noatime,space_cache,compress=zstd,subvol=@ $BTRFS /mnt
|
mount -o ssd,noatime,space_cache,compress=zstd,subvol=@ $BTRFS /mnt
|
||||||
mkdir -p /mnt/{home,.snapshots,var,boot}
|
mkdir -p /mnt/{home,var,boot}
|
||||||
mount -o ssd,noatime,space_cache,compress=zstd,subvol=@boot $BTRFS /mnt/boot
|
mount -o ssd,noatime,space_cache,compress=zstd,subvol=@boot $BTRFS /mnt/boot
|
||||||
mount -o ssd,noatime,space_cache,compress=zstd,subvol=@home $BTRFS /mnt/home
|
mount -o ssd,noatime,space_cache,compress=zstd,subvol=@home $BTRFS /mnt/home
|
||||||
mount -o ssd,noatime,space_cache,compress=zstd,subvol=@snapshots $BTRFS /mnt/.snapshots
|
|
||||||
mount -o ssd,noatime,space_cache,nodatacow,subvol=@var $BTRFS /mnt/var/
|
mount -o ssd,noatime,space_cache,nodatacow,subvol=@var $BTRFS /mnt/var/
|
||||||
mkdir -p /mnt/boot/efi
|
mkdir -p /mnt/boot/efi
|
||||||
mount $ESP /mnt/boot/efi
|
mount $ESP /mnt/boot/efi
|
||||||
@ -187,15 +185,6 @@ arch-chroot /mnt /bin/bash -e <<EOF
|
|||||||
echo "Creating a new initramfs."
|
echo "Creating a new initramfs."
|
||||||
mkinitcpio -P &>/dev/null
|
mkinitcpio -P &>/dev/null
|
||||||
|
|
||||||
# Snapper configuration
|
|
||||||
umount /.snapshots
|
|
||||||
rm -r /.snapshots
|
|
||||||
snapper --no-dbus -c root create-config /
|
|
||||||
btrfs subvolume delete /.snapshots &>/dev/null
|
|
||||||
mkdir /.snapshots
|
|
||||||
mount -a
|
|
||||||
chmod 750 /.snapshots
|
|
||||||
|
|
||||||
# Installing GRUB.
|
# Installing GRUB.
|
||||||
echo "Installing GRUB on /boot."
|
echo "Installing GRUB on /boot."
|
||||||
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB &>/dev/null
|
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB &>/dev/null
|
||||||
@ -232,10 +221,5 @@ sed -i 's/022/077/g' /etc/profile
|
|||||||
echo "" >> /etc/bash.bashrc
|
echo "" >> /etc/bash.bashrc
|
||||||
echo "umask 077" >> /etc/bash.bashrc
|
echo "umask 077" >> /etc/bash.bashrc
|
||||||
|
|
||||||
# Enabling Snapper automatic snapshots.
|
|
||||||
echo "Enabling Snapper."
|
|
||||||
systemctl enable snapper-timeline.timer --root=/mnt &>/dev/null
|
|
||||||
systemctl enable snapper-cleanup.timer --root=/mnt &>/dev/null
|
|
||||||
|
|
||||||
echo "Done, you may now wish to reboot (further changes can be done by chrooting into /mnt)."
|
echo "Done, you may now wish to reboot (further changes can be done by chrooting into /mnt)."
|
||||||
exit
|
exit
|
||||||
|
Loading…
Reference in New Issue
Block a user