<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Thanks a lot for your input Robert,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Too bad, I didn't think about this superuser limitation. It would have been a really useful buildroot output.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">In that case, I will give your script a try.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thank you</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Robert Heywood <robert.heywood@codethink.co.uk><br>
<b>Sent:</b> January 23, 2019 4:44:42 AM<br>
<b>To:</b> Peter Korsgaard; Gervais, Francois<br>
<b>Cc:</b> buildroot@busybox.net<br>
<b>Subject:</b> Re: btrfs filesystem image as subvolume</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi all.<br>
<br>
I wanted the same kind of functionality, but found that mkfs.btrfs doesn't <br>
support much more than dumping the files into the root of the filesystem.<br>
As a workaround, I made a script that mounts the filesystem, creates the <br>
subvolume and uses btrfs-send to create the stream.<br>
<br>
Sadly it requires root access, so it's not something that can be added to <br>
buildroot. However, you're welcome to use the script if you want :)<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_robjh_buildroot-2Ddev_blob_robjh-2Dtmpfiles_robjh_make-5Fbtrfs-5Fstream.sh&d=DwICaQ&c=tvvHx3uC0XdtgG-ImPDjfM0QnakIsmmGcwejQDVxD-g&r=G3HxHlWbpios6mQS7YUj_ICsYvxAzbjryvMxyUQ7Mso&m=RdpATESXfxVKQQJznVe_7qw6k-ANfDtCrwJT0MhIFsA&s=3V9oKBq7rxLqcrf3JIBDk22u4pP_IDTOFoffRmPieMw&e=">https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_robjh_buildroot-2Ddev_blob_robjh-2Dtmpfiles_robjh_make-5Fbtrfs-5Fstream.sh&d=DwICaQ&c=tvvHx3uC0XdtgG-ImPDjfM0QnakIsmmGcwejQDVxD-g&r=G3HxHlWbpios6mQS7YUj_ICsYvxAzbjryvMxyUQ7Mso&m=RdpATESXfxVKQQJznVe_7qw6k-ANfDtCrwJT0MhIFsA&s=3V9oKBq7rxLqcrf3JIBDk22u4pP_IDTOFoffRmPieMw&e=</a><br>
<br>
run it from your buildroot directory with sudo.<br>
It'll produce ./output/images/os.btrfss, which you can use with btrfs-receive.<br>
<br>
You might also want to look at this script, which uses the os.btrfss file to <br>
create a btrfs filesystem on a flash drive, with my desired layout. and with <br>
compression enabled;<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_robjh_buildroot-2Ddev_blob_robjh-2Dtmpfiles_robjh_prep-5Fsd.sh&d=DwICaQ&c=tvvHx3uC0XdtgG-ImPDjfM0QnakIsmmGcwejQDVxD-g&r=G3HxHlWbpios6mQS7YUj_ICsYvxAzbjryvMxyUQ7Mso&m=RdpATESXfxVKQQJznVe_7qw6k-ANfDtCrwJT0MhIFsA&s=IZuvvxl42Wylzoav0LmUMJfs0aKv8VB5n1CV8b2Y600&e=">https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_robjh_buildroot-2Ddev_blob_robjh-2Dtmpfiles_robjh_prep-5Fsd.sh&d=DwICaQ&c=tvvHx3uC0XdtgG-ImPDjfM0QnakIsmmGcwejQDVxD-g&r=G3HxHlWbpios6mQS7YUj_ICsYvxAzbjryvMxyUQ7Mso&m=RdpATESXfxVKQQJznVe_7qw6k-ANfDtCrwJT0MhIFsA&s=IZuvvxl42Wylzoav0LmUMJfs0aKv8VB5n1CV8b2Y600&e=</a><br>
<br>
I hope this helps.<br>
<br>
kind regards, rob.<br>
<br>
On 23/01/2019 09:26, Peter Korsgaard wrote:<br>
>>>>>> "Gervais," == Gervais, Francois <FGervais@distech-controls.com> writes:<br>
> <br>
> Hi,<br>
> <br>
>   > Hi,<br>
>   > I tried the btrfs filesystem image and it works fine however in my<br>
>   > use-case I'd like to have only the subvolume and not the whole btrfs<br>
>   > filesystem.<br>
> <br>
>   > Basically the output of "btrfs send".<br>
> <br>
>   > I'd first like to make sure this is not possible today and discuss some<br>
>   > high level guidelines you would like me to follow when I implement<br>
>   > the feature.<br>
> <br>
>   > Should I add a sub-option to the "btrfs root filesystem" menu?<br>
>   > Should if have it's own "Filesystem images" entry?<br>
> <br>
> Adding Robert who contributed the btrfs support. Robert, any feedback on<br>
> this?<br>
> <br>
<br>
-- <br>
Robert Heywood, Codethink Ltd.<br>
<blink>Privacy policy; <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.codethink.co.uk_privacy.html&d=DwICaQ&c=tvvHx3uC0XdtgG-ImPDjfM0QnakIsmmGcwejQDVxD-g&r=G3HxHlWbpios6mQS7YUj_ICsYvxAzbjryvMxyUQ7Mso&m=RdpATESXfxVKQQJznVe_7qw6k-ANfDtCrwJT0MhIFsA&s=-U9tssz2CxIl9yle9dhShM-tx-Zg8OEGzG77dUgcF1U&e=</blink">
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.codethink.co.uk_privacy.html&d=DwICaQ&c=tvvHx3uC0XdtgG-ImPDjfM0QnakIsmmGcwejQDVxD-g&r=G3HxHlWbpios6mQS7YUj_ICsYvxAzbjryvMxyUQ7Mso&m=RdpATESXfxVKQQJznVe_7qw6k-ANfDtCrwJT0MhIFsA&s=-U9tssz2CxIl9yle9dhShM-tx-Zg8OEGzG77dUgcF1U&e=</blink</a>><br>
</div>
</span></font></div>
</body>
</html>