You are not logged in.

#1 2016-02-28 11:59:20

robg
Member
Registered: 2015-03-05
Posts: 219

[Solved] systemd-boot compressed root subvolume

Does systemd-boot support booting from a compressed root subvolume? On the wiki page the following is stated:

If booting a btrfs subvolume as root, amend the options line with rootflags=subvol=<root subvolume>. In the example below, root has been mounted as a btrfs subvolume called 'ROOT'

$esp/loader/entries/arch-btrfs-subvol.conf
title          Arch Linux
linux          /vmlinuz-linux
initrd         /initramfs-linux.img
options        root=PARTUUID=14420948-2cea-4de7-b042-40f67c618660 rw rootflags=subvol=ROOT

However, no information on whether this works in case of compression is provided.

Consider the following installation procedure:

mkfs.btrfs /dev/sdaX
mount /dev/sdaX /mnt
btrfs subvolume create /mnt/root
umount /mnt
mount -o relatime,ssd,compress=lzo,space_cache,subvol=root /dev/sdaX /mnt
btrfs subvolume create /mnt/home
btrfs subvolume create /mnt/usr
btrfs subvolume create /mnt/var
mkdir /mnt/boot
mount $esp /mnt/boot
...
move on, pacstrap, genfstab, e.t.c.
...
bootctl install
...
Append "rootflags=subvol=root" to "options" in "$esp/loader/entries/arch-entry.conf"
...
finish up, networking, passwd, e.t.c.

Would this work?

Last edited by robg (2016-03-03 18:02:02)

Offline

#2 2016-03-03 18:01:47

robg
Member
Registered: 2015-03-05
Posts: 219

Re: [Solved] systemd-boot compressed root subvolume

Confirmation: It works according to the outline in the initial post.

Offline

#3 2016-03-03 18:16:05

robg
Member
Registered: 2015-03-05
Posts: 219

Re: [Solved] systemd-boot compressed root subvolume

Follow-Up Remark: I'd like to add my findings to the wiki but before doing so: Is this piece of information actually worth adding or is there any obvious reason it should work that I missed in the first place?

Offline

#4 2016-03-04 08:30:54

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [Solved] systemd-boot compressed root subvolume

When I installed, it didn't even cross my mind that there might be a problem.

What I worried about was to make sure that the files of the base packages put onto the volume are also compressed, not just the later packages you install after restarting into the system that has the flags in /etc/fstab.

Offline

#5 2016-03-04 08:36:12

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [Solved] systemd-boot compressed root subvolume

You can, of course, mention it on the wiki page. You can also discuss this on the wiki first, every page has a discussion page.

Offline

Board footer

Powered by FluxBB