[lxc-devel] [distrobuilder/master] image: Tweak squashfs options

monstermunchkin on Github lxc-bot at linuxcontainers.org
Mon Jul 22 15:25:29 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190722/c1451802/attachment.bin>
-------------- next part --------------
From 52c8460e81f8810ae70ac87c880010b0406995b9 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Mon, 22 Jul 2019 17:24:24 +0200
Subject: [PATCH] image: Tweak squashfs options

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 image/lxd.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/image/lxd.go b/image/lxd.go
index ac8b21d..6d43b9c 100644
--- a/image/lxd.go
+++ b/image/lxd.go
@@ -93,7 +93,8 @@ func (l *LXDImage) Build(unified bool, compression string) error {
 	} else {
 		// Create rootfs as squashfs.
 		err = shared.RunCommand("mksquashfs", l.sourceDir,
-			filepath.Join(l.targetDir, "rootfs.squashfs"), "-noappend")
+			filepath.Join(l.targetDir, "rootfs.squashfs"), "-noappend", "-comp",
+			"xz", "-b", "1M", "-no-progress", "-no-recovery")
 		if err != nil {
 			return err
 		}


More information about the lxc-devel mailing list