mirror of
https://github.com/tommytran732/Arch-Setup-Script
synced 2024-11-21 17:11:34 -05:00
Update install.sh
This commit is contained in:
parent
64e63a39f1
commit
2cf7ba80b3
23
install.sh
23
install.sh
@ -90,8 +90,9 @@ mount $BTRFS /mnt
|
||||
echo "Creating BTRFS subvolumes."
|
||||
btrfs subvolume create /mnt/@ &>/dev/null
|
||||
btrfs subvolume create /mnt/@/.snapshots &>/dev/null
|
||||
mkdir /mnt/@/.snapshots/0 &>/dev/null
|
||||
mkdir -p /mnt/@/.snapshots/1 &>/dev/null
|
||||
btrfs subvolume create /mnt/@/.snapshots/1/snapshot &>/dev/null
|
||||
mkdir -p /mnt/@/boot
|
||||
btrfs subvolume create /mnt/@/boot/grub/ &>/dev/null
|
||||
btrfs subvolume create /mnt/@/home &>/dev/null
|
||||
btrfs subvolume create /mnt/@/root &>/dev/null
|
||||
@ -113,9 +114,20 @@ chattr +C /mnt/@/var_crash
|
||||
chattr +C /mnt/@/var_cache
|
||||
chattr +C /mnt/@/var_tmp
|
||||
chattr +C /mnt/@/var_spool
|
||||
chattr +C /mnt/@/var_lib_libvirt_iamges
|
||||
chattr +C /mnt/@/var_lib_libvirt_images
|
||||
btrfs subvolume set-default $(btrfs subvolume list /mnt | grep "@/.snapshots/1/snapshot" | grep -oP '(?<=ID )[0-9]+') /mnt
|
||||
|
||||
cat << EOF >> /mnt/@/.snapshots/1/info.xml
|
||||
<?xml version="1.0"?>
|
||||
<snapshot>
|
||||
<type>single</type>
|
||||
<num>1</num>
|
||||
<description>First Root Filesystem</description>
|
||||
</snapshot>
|
||||
EOF
|
||||
|
||||
chmod 600 /mnt/@/.snapshots/1/info.xml
|
||||
|
||||
# Mounting the newly created subvolumes.
|
||||
umount /mnt
|
||||
echo "Mounting the newly created subvolumes."
|
||||
@ -138,6 +150,8 @@ mount -o ssd,noatime,space_cache,compress=zstd:15,subvol=@/var_lib_libvirt_image
|
||||
mkdir -p /mnt/boot/efi
|
||||
mount $ESP /mnt/boot/efi
|
||||
|
||||
|
||||
|
||||
kernel_selector
|
||||
|
||||
# Pacstrap (setting up a base sytem onto the new root).
|
||||
@ -232,8 +246,9 @@ arch-chroot /mnt /bin/bash -e <<EOF
|
||||
# Installing GRUB.
|
||||
echo "Installing GRUB on /boot."
|
||||
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB &>/dev/null
|
||||
sed -i 's#"rootflags=subvol=${rootsubvol}##g' /etc/grub.d/10_linux
|
||||
sed -i 's#"rootflags=subvol=${rootsubvol}##g' /etc/grub.d/20_linux_xen
|
||||
sed -i 's#"rootflags=subvol=${rootsubvol}"##g' /etc/grub.d/10_linux
|
||||
sed -i 's#"rootflags=subvol=${rootsubvol}"##g' /etc/grub.d/20_linux_xen
|
||||
pacman -S --noconfirm snap-pac
|
||||
|
||||
# Creating grub config file.
|
||||
echo "Creating GRUB config file."
|
||||
|
Loading…
Reference in New Issue
Block a user