From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#33639: ISO installer image is broken on i686 Date: Fri, 12 Apr 2019 23:26:28 +0200 Message-ID: <87o95alxtn.fsf@gnu.org> References: <20190409221313.b3uzvcj5bluoygp5@pelzflorian.localdomain> <16217671677318139528@scdbackup.webframe.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:56039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hF3hP-0003X1-J2 for bug-guix@gnu.org; Fri, 12 Apr 2019 17:27:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hF3hO-00034e-Fb for bug-guix@gnu.org; Fri, 12 Apr 2019 17:27:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43355) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hF3hO-00034W-9s for bug-guix@gnu.org; Fri, 12 Apr 2019 17:27:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <16217671677318139528@scdbackup.webframe.org> (Thomas Schmitt's message of "Wed, 10 Apr 2019 13:17:14 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Thomas Schmitt , "\"pelzflorian (Florian Pelz)\"" Cc: bug-xorriso@gnu.org, 33639@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Florian & Thomas, I was able to reproduce the issue: =E2=80=98guix system disk-image --file-system-format=3Diso9660=E2=80=99 would create partly unreadable imag= es. Since this was pretty much like the issue I had encountered with =E2=80=98g= uix system docker-image=E2=80=99, which would produce truncated tarballs, and s= ince calling =E2=80=98sync=E2=80=99 wasn=E2=80=99t enough, I looked at our file = system mount options=E2=80=A6 The attached patch fixes the problem for me. In hindsight, it=E2=80=99s not surprising that =E2=80=9Ccache=3Dloose=E2=80=9D on the /xchg mount point (u= sed to exchange data between the host and the guest) would have this effect. Florian, it would be great if you could confirm. Just apply it on =E2=80=98master=E2=80=99, and then run: ./pre-inst-env guix system disk-image --file-system-format=3Diso9660 \ gnu/system/install.scm Thanks, and apologies for blaming Xorriso, which presumably never had anything to do with it! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index db9b1707d7..22e3fcc522 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -94,6 +94,12 @@ (define %linux-vm-file-systems ;; File systems mounted for 'derivation-in-linux-vm'. These are shared with ;; the host over 9p. + ;; + ;; The 9p documentation says that cache=loose is "intended for exclusive, + ;; read-only mounts", without additional details. It's much faster than the + ;; default cache=none, especially when copying and registering store items. + ;; Thus, use cache=loose, except for /xchg where we want to ensure + ;; consistency. (list (file-system (mount-point (%store-prefix)) (device "store") @@ -102,18 +108,12 @@ (flags '(read-only)) (options "trans=virtio,cache=loose") (check? #f)) - - ;; The 9p documentation says that cache=loose is "intended for - ;; exclusive, read-only mounts", without additional details. In - ;; practice it seems to work well for these, and it's much faster than - ;; the default cache=none, especially when copying and registering - ;; store items. (file-system (mount-point "/xchg") (device "xchg") (type "9p") (needed-for-boot? #t) - (options "trans=virtio,cache=loose") + (options "trans=virtio") (check? #f)) (file-system (mount-point "/tmp") @@ -530,10 +530,7 @@ should set REGISTER-CLOSURES? to #f." #$os #:compressor '(#+(file-append gzip "/bin/gzip") "-9n") #:creation-time (make-time time-utc 0 1) - #:transformations `((,root-directory -> ""))) - - ;; Make sure the tarball is fully written before rebooting. - (sync)))))) + #:transformations `((,root-directory -> "")))))))) (expression->derivation-in-linux-vm name build #:make-disk-image? #f --=-=-=--