0

I have two partition one with system and other partition with home and data. I found this question that have solution to my problem, but I'm not sure how exactly to apply it to my system, what I'm most unsure of is how should I edit /etc/fstab file.

I copied the usr,tmp and var folders using the cp -a command to /home/sys folder.

I now booted a live distribution so I can rename the original folders(which I will delete when everything works) and edit the /etc/fstab. But that's, where I got stuck. The content of the file is:

UUID=90e62a50-2160-429c-b411-522762406e8f swap swap defaults 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 / btrfs defaults 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /boot/grub2/i386-pc btrfs subvol=@/boot/grub2/i386-pc 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /boot/grub2/x86_64-efi btrfs subvol=@/boot/grub2/x86_64-efi 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /opt btrfs subvol=@/opt 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /srv btrfs subvol=@/srv 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /tmp btrfs subvol=@/tmp 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /usr/local btrfs subvol=@/usr/local 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /var/crash btrfs subvol=@/var/crash 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /var/lib/libvirt/images btrfs subvol=@/var/lib/libvirt/images 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /var/lib/mailman btrfs subvol=@/var/lib/mailman 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /var/lib/mariadb btrfs subvol=@/var/lib/mariadb 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /var/lib/mysql btrfs subvol=@/var/lib/mysql 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /var/lib/named btrfs subvol=@/var/lib/named 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /var/lib/pgsql btrfs subvol=@/var/lib/pgsql 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /var/log btrfs subvol=@/var/log 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /var/opt btrfs subvol=@/var/opt 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /var/spool btrfs subvol=@/var/spool 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /var/tmp btrfs subvol=@/var/tmp 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /.snapshots btrfs subvol=@/.snapshots 0 0
UUID=16bb63e7-2cb4-4866-ba7c-dc3db7ab8579 /home xfs defaults 1 2
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /var/lib/machines btrfs subvol=@/var/lib/machines 0 0

Can someone help me edit the file?

Edit: I tried to edit the file myself, but it didn't work, the system didn't boot.

UUID=90e62a50-2160-429c-b411-522762406e8f swap swap defaults 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 / btrfs defaults 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /boot/grub2/i386-pc btrfs subvol=@/boot/grub2/i386-pc 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /boot/grub2/x86_64-efi btrfs subvol=@/boot/grub2/x86_64-efi 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /opt btrfs subvol=@/opt 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /srv btrfs subvol=@/srv 0 0
UUID=dc5e9885-8e7d-45e2-8a4d-ea065000a505 /.snapshots btrfs subvol=@/.snapshots 0 0
UUID=16bb63e7-2cb4-4866-ba7c-dc3db7ab8579 /home xfs defaults 1 2
/home/sys/var /var auto defaults 0 2
/home/sys/tmp /tmp auto defaults 0 2
/home/sys/usr /usr auto defaults 0 2

By reading the journal it looked it couldn't find the 'device' /home/sys/var.

Edit 2: Added bind option as suggested by Emanuel Rosa, but system still doesn't boot. It is now stuck at black screen with sh-4.3# with blinking cursor.

2
  • My only caution is that depending on your kernel you may not be able to compress the /boot directory since the kernel needs to be able to read that at boot time. After being burned once, I've been, perhaps unnecessarily, keeping /boot as it's own ext4 partition.
    – rickhg12hs
    Commented Nov 6, 2020 at 23:44
  • For the /home/sys/* directories you need to use bind: /home/sys/var /var xfs defaults,bind 0 0 Commented Nov 8, 2020 at 6:50

0

You must log in to answer this question.

Browse other questions tagged .