1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
~ # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 193.5M 384.0K 193.1M 0% /run
devtmpfs 952.7M 0 952.7M 0% /dev
/dev/sr0 754.0M 754.0M 0 100% /cdrom
none 256.0K 59.7K 191.3K 24% /sys/firmware/efi/efivars
/dev/nvme0n1p2 19.5G 5.8M 19.0G 0% /target
/dev/nvme0n1p1 475.1M 4.0K 475.1M 0% /target/boot/efi
/dev/sda1 15.0G 5.8M 14.5G 0% /target/home
~ # mount
rootfs on / type rootfs (rw,size=1981544k,nr_inodes=243887,inode64)
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=198156k,mode=755,inode64)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=975552k,nr_inodes=243888,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sr0 on /cdrom type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8)
none on /sys/firmware/efi/efivars type efivarfs (rw,relatime)
/dev/nvme0n1p2 on /target type btrfs (rw,relatime,ssd,space_cache=v2,subvolid=256,subvol=/@rootfs)
/dev/nvme0n1p1 on /target/boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/sda1 on /target/home type btrfs (rw,relatime,space_cache=v2,subvolid=5,subvol=/)
~ # umount /target/boot/efi/
~ # umount /target/home/
~ # umount /target/
~ # mount /dev/nvme0n1p2 /mnt
~ # cd /mnt
/mnt # ls
@rootfs
/mnt # mv @rootfs/ @
/mnt # cd ..
~ # umount /mnt
~ # mount /dev/sda /mnt/
/mnt # btrfs subvolume create @home
Create subvolume './@home'
~ # mount -o rw,noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@ /dev/nvme0n1p2 /target/
~ # mount -o rw,noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@home /dev/sda1 /target/home
~ # mount /dev/nvme0n1p1 /target/boot/efi/
~ # mount
rootfs on / type rootfs (rw,size=1981544k,nr_inodes=243887,inode64)
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=198156k,mode=755,inode64)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=975552k,nr_inodes=243888,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sr0 on /cdrom type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8)
none on /sys/firmware/efi/efivars type efivarfs (rw,relatime)
/dev/nvme0n1p2 on /target type btrfs (rw,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=256,subvol=/@)
/dev/sda1 on /target/home type btrfs (rw,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=257,subvol=/@home)
/dev/nvme0n1p1 on /target/boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
~ # blkid -s UUID -o value /dev/sda1
01a3963f-b962-4122-ba2f-f24d2e62a2c6

nano /target/etc/fstab
GNU nano 8.4 /target/etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# systemd generates mount units based on this file, see systemd.mount(5).
# Please run 'systemctl daemon-reload' after making changes here.
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p2 during installation
UUID=15b751be-3db8-4f76-9382-2fa180be8ee2 / btrfs rw,noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@ 0 0
UUID=01a3963f-b962-4122-ba2f-f24d2e62a2c6 /home btrfs rw,noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@home 0 0
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=BD69-DDD3 /boot/efi vfat umask=0077 0 1
# /home was on /dev/sda1 during installation
UUID=01a3963f-b962-4122-ba2f-f24d2e62a2c6 /home btrfs defaults 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0

1
2
3
4
5
6
7
8
sudo apt update
sudo apt install zram-tools
sudo nano /etc/default/zramswap
# ALGO=lz4
# PERCENT=25%

sudo apt install kde-plasma-desktop
sudo apt install timeshift
1
2
3
4
5
6
7
8
9
10
11
sudo apt install build-essential inotify-tools

cd /usr/src/
sudo git clone https://github.com/Antynea/grub-btrfs.git
sudo make install

sudo systemctl edit --full grub-btrfsd
# ExecStart=/usr/bin/grub-btrfsd --syslog --timeshift-auto

sudo systemctl enable grub-btrfsd
sudo systemctl start grub-btrfsd