Update btrfs-test.sh
This commit is contained in:
parent
ace4fed45c
commit
f75b57a9e2
|
@ -196,63 +196,32 @@ echo
|
|||
|
||||
exit
|
||||
|
||||
# Creating btrfs partition.
|
||||
mkfs.btrfs /dev/mapper/main
|
||||
|
||||
mount /dev/mapper/main /mnt
|
||||
|
||||
btrfs subvolume create /mnt/@root
|
||||
btrfs subvolume create /mnt/@home
|
||||
btrfs subvolume create /mnt/@snapshots
|
||||
|
||||
umount /mnt
|
||||
|
||||
mount -o subvol=@root /dev/mapper/main /mnt
|
||||
mkdir /mnt/home
|
||||
mount -o subvol=@home /dev/mapper/main /mnt/home
|
||||
mkdir /mnt/.snapshots
|
||||
mount -o subvol=@snapshots /dev/mapper/main /mnt/.snapshots
|
||||
|
||||
# Creating physical volume.
|
||||
#echo "Creating physical volume."
|
||||
#pvcreate /dev/mapper/lvm &&
|
||||
#echo
|
||||
|
||||
# Creating volume group "main".
|
||||
#echo "Creating volume group."
|
||||
#vgcreate main /dev/mapper/lvm &&
|
||||
#echo
|
||||
|
||||
# Creating logical volumes.
|
||||
#echo "Creating logical volumes for root and home."
|
||||
#lvcreate -L ${szrt}G -n root main &&
|
||||
#lvcreate -l 100%FREE -n home main &&
|
||||
#echo "Logical volumes successfully created."
|
||||
#echo
|
||||
|
||||
echo "Creating the filesystem."
|
||||
boot=${dev}1
|
||||
mkfs.fat -F 32 -n UEFI /dev/$boot &&
|
||||
echo "Filesystem for boot successfully created."
|
||||
echo
|
||||
|
||||
#mkfs.ext4 -L root /dev/mapper/main-root &&
|
||||
#echo "Filesystem for root successfully created."
|
||||
#echo
|
||||
# Creating btrfs partition.
|
||||
mkfs.btrfs /dev/mapper/main &&
|
||||
|
||||
#mkfs.ext4 -L home /dev/mapper/main-home &&
|
||||
#echo "Filesystem for home successfully created."
|
||||
#echo "Done."
|
||||
#echo
|
||||
mount /dev/mapper/main /mnt &&
|
||||
|
||||
#echo "Mounting.."
|
||||
#mount /dev/mapper/main-root /mnt &&
|
||||
#mkdir /mnt/boot &&
|
||||
#mkdir /mnt/home &&
|
||||
#mount /dev/$boot /mnt/boot &&
|
||||
#mount /dev/mapper/main-home /mnt/home &&
|
||||
#echo "Mounting complete."
|
||||
#echo
|
||||
btrfs subvolume create /mnt/@root &&
|
||||
btrfs subvolume create /mnt/@home &&
|
||||
btrfs subvolume create /mnt/@snapshots &&
|
||||
|
||||
umount /mnt &&
|
||||
|
||||
echo "Mounting.." &&
|
||||
mount -o compress=zstd,subvol=@root /dev/mapper/main /mnt &&
|
||||
mkdir /mnt/home &&
|
||||
mount -o compress=zstd,subvol=@home /dev/mapper/main /mnt/home &&
|
||||
mkdir /mnt/.snapshots &&
|
||||
mount -o compress=zstd,subvol=@snapshots /dev/mapper/main /mnt/.snapshots &&
|
||||
mount /dev/sda2 /mnt/boot &&
|
||||
echo "Mounting complete." &&
|
||||
echo
|
||||
|
||||
lsblk | grep "$dev"
|
||||
echo
|
||||
|
@ -267,7 +236,7 @@ echo
|
|||
# Installing base system.
|
||||
echo "Installing basic packages.."
|
||||
#pacstrap /mnt base base-devel firefox konsole linux linux-firmware linux-zen lvm2 networkmanager nano plasma-desktop sddm sddm-kcm &&
|
||||
pacstrap /mnt base firefox konsole linux linux-firmware linux-zen lvm2 nano networkmanager plasma-desktop sddm sddm-kcm sudo &&
|
||||
pacstrap /mnt base btrfs-progs firefox konsole linux linux-firmware linux-zen lvm2 nano networkmanager plasma-desktop sddm sddm-kcm sudo &&
|
||||
echo "Base system installed."
|
||||
echo
|
||||
|
||||
|
@ -357,8 +326,9 @@ linux /vmlinuz-linux-zen
|
|||
#initrd /amd-ucode.img
|
||||
#initrd /intel-ucode.img
|
||||
initrd /initramfs-linux-zen.img
|
||||
options cryptdevice=/dev/$main:lvm:allow-discards
|
||||
options root=/dev/mapper/main-root rw
|
||||
options cryptdevice=/dev/$main:allow-discards
|
||||
options root=/dev/mapper/main rw
|
||||
options rootflags=subvol=root
|
||||
options lang=de locale=de_DE.UTF-8
|
||||
options init=/usr/lib/systemd/systemd
|
||||
#options loglevel=3
|
||||
|
|
Loading…
Reference in New Issue