Advertisement
Morkeleb

PikaOS4 BTRFS Subvolumes

Nov 7th, 2024 (edited)
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.97 KB | Software | 0 0
  1. # I created paritions manually with the tool available through the installer
  2. # This is the overview of them (though after I did the actual install to see also where it mounted what)
  3. pikaos@pikaos:~$ lsblk -o name,size,fstype,label,mountpoint,UUID
  4. NAME     SIZE FSTYPE   LABEL       MOUNTPOINT                                UUID
  5. loop0      3G squashfs             /usr/lib/live/mount/rootfs/filesystem.squ
  6. sda      240G                                                                
  7. ├─sda1   100M vfat     WINDOWS EFI /boot/efi                                 F765-E8AC
  8. ├─sda2    60G ntfs     Windows                                               0F92C14A06C486F3
  9. ├─sda3   500M vfat     LINUX_EFI   /media/pikaos/installation/boot/efi       F762-00A9
  10. ├─sda4  1000M ext4     PikaOS      /media/pikaos/installation/boot           209aacb7-cfe9-4b41-8429-ca6976a41f8e
  11. └─sda5 178.4G btrfs                /media/pikaos/installation                d1655934-1d5e-4378-aeaa-b7be50fc0d6b
  12. sr0      3.2G iso9660  PikaOS 4    /usr/lib/live/mount/medium                2024-11-05-10-16-20-00
  13. zram0    256M                      [SWAP]
  14.  
  15. # create subvolumes
  16. sudo mkdir /mnt
  17. sudo mount -o subvolid=5 /dev/sda5 /mnt
  18. sudo btrfs subvolume create /mnt/@d
  19. sudo btrfs subvolume create /mnt/@home
  20. sudo btrfs sub create /mnt/@cache
  21. sudo btrfs sub create /mnt/@log
  22. sudo btrfs sub create /mnt/@tmp
  23.  
  24. pikaos@pikaos:~$ sudo btrfs subvolume list /mnt
  25. ID 256 gen 8 top level 5 path @
  26. ID 257 gen 8 top level 5 path @home
  27. ID 258 gen 9 top level 5 path @tmp
  28. ID 259 gen 9 top level 5 path @log
  29. ID 260 gen 9 top level 5 path @cache
  30.  
  31. # here I installed Pika OS 4
  32. # I just selected sda3 as EFI, sda4 as Boot and sda5 as root parition
  33. # And continued with the installation
  34.  
  35. # It went fine but the installer did not seem to detect the subvolumes:
  36. pikaos@pikaos:~$ cat /mnt/etc/fstab
  37. # /etc/fstab: static file system information.
  38. #
  39. # Use 'blkid' to print the universally unique identifier for a
  40. # device; this may be used with UUID= as a more robust way to name devices
  41. # that works even if disks are added and removed. See fstab(5).
  42. #
  43. # <file system> <mount point>   <type>  <options>       <dump>  <pass>
  44. # /dev/sda5
  45. UUID=d1655934-1d5e-4378-aeaa-b7be50fc0d6b       /               btrfs           rw,relatime,ssd,discard=async,space_cache=v2,subvol=/    0 0
  46.  
  47. # /dev/sda4 LABEL=PikaOS
  48. UUID=209aacb7-cfe9-4b41-8429-ca6976a41f8e       /boot           ext4            rw,relatime     0 2
  49.  
  50. # /dev/sda3 LABEL=LINUX_EFI
  51. UUID=F762-00A9          /boot/efi       vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro    0 2
  52.  
  53. # /dev/sda4 LABEL=PikaOS
  54. UUID=209aacb7-cfe9-4b41-8429-ca6976a41f8e       /boot           ext4            rw,relatime     0 2
  55.  
  56. # /dev/sda3 LABEL=LINUX_EFI
  57. UUID=F762-00A9          /boot/efi       vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro    0 2
  58.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement