From patchwork Mon May 25 15:46:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 22352 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9FBA527BBE3; Mon, 25 May 2020 16:58:50 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 2BDC827BBE1 for ; Mon, 25 May 2020 16:58:50 +0100 (BST) Received: from localhost ([::1]:50376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdFV3-0003Ua-M9 for patchwork@mira.cbaines.net; Mon, 25 May 2020 11:58:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdFJe-0006yc-En for guix-patches@gnu.org; Mon, 25 May 2020 11:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58907) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdFJe-0007qT-58 for guix-patches@gnu.org; Mon, 25 May 2020 11:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jdFJe-0007nw-44 for guix-patches@gnu.org; Mon, 25 May 2020 11:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41350] [PATCH v2 3/3] system: vm: Build vm-image using native qemu, for the Hurd. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 May 2020 15:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41350 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mathieu Othacehe Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , 41350@debbugs.gnu.org Received: via spool by 41350-submit@debbugs.gnu.org id=B41350.159042160029968 (code B ref 41350); Mon, 25 May 2020 15:47:02 +0000 Received: (at 41350) by debbugs.gnu.org; 25 May 2020 15:46:40 +0000 Received: from localhost ([127.0.0.1]:42220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdFJH-0007nI-Nf for submit@debbugs.gnu.org; Mon, 25 May 2020 11:46:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdFJF-0007n3-ER for 41350@debbugs.gnu.org; Mon, 25 May 2020 11:46:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51358) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdFJ9-0007cF-FM; Mon, 25 May 2020 11:46:31 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=56108 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jdFJ6-0001qy-Ei; Mon, 25 May 2020 11:46:28 -0400 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <20200519072302.9202-1-janneke@gnu.org> <20200519072302.9202-3-janneke@gnu.org> <87blmkthg0.fsf@gnu.org> <87367r57b4.fsf@gnu.org> <87v9kmilze.fsf@gnu.org> <87k112qxly.fsf@gnu.org> <87pnat37ia.fsf@gnu.org> <87k111ilj0.fsf@gnu.org> <87a71x8ldi.fsf@gnu.org> <87ftbpfbjl.fsf@gnu.org> <874ks52n3o.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Mon, 25 May 2020 17:46:26 +0200 In-Reply-To: <874ks52n3o.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Sun, 24 May 2020 20:40:11 +0200") Message-ID: <87d06sc90t.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Jan Nieuwenhuizen writes: Hello Mathieu, Ludo', >>> The most interesting differences I see are wrt Grub, e.g. >>> >>> -/mnt/boot/grub/fonts >>> -/mnt/boot/grub/fonts/unicode.pf2 >>> >>> could that still play a role? I'm having a look why this could be missing. >> >> It's because I just copy "lib/grub" folder in (gnu bootloader grub). I >> should also do that for the fonts I guess. But I doubt the issue comes >> from here. > > Meanwhile I tried adding that by hand; indeed that's not it. As discussed on IRC (thanks!!), I bisected it down to a problem with the file /servers/exec. I suspected translator magic...but luckily Ludo insisted he thinks that /servers/exec only needs to exist. So, using current wip-hurd-vm, I tried this script: --8<---------------cut here---------------start------------->8--- set -ex cp -f $(./pre-inst-env guix system disk-image --no-grafts --target=i586-pc-gnu gnu/system/examples/bare-hurd.tmpl) /tmp/disk-image.img sudo losetup -P /dev/loop0 /tmp/disk-image.img sudo mount /dev/loop0p1 /mnt ls -l /mnt/servers/exec sudo rm -f /mnt/servers/exec sudo touch /mnt/servers/exec ls -l /mnt/servers/exec sudo umount /mnt sudo losetup -d /dev/loop0 --8<---------------cut here---------------end--------------->8--- ...which indeed produces a working VM! Turns out that creating /servers/exec in the store gets hard-linked/deduplicated or something...look: --8<---------------cut here---------------start------------->8--- + ls -l /mnt/servers/exec -r--r--r-- 17 root root 0 Jan 1 1970 /mnt/servers/exec + sudo rm -f /mnt/servers/exec + sudo touch /mnt/servers/exec + ls -l /mnt/servers/exec -rw-r--r-- 1 root root 0 May 25 17:16 /mnt/servers/exec --8<---------------cut here---------------end--------------->8--- The "fix" is just going from 17 to 1 link. Doh' So, another "fix" is the diff below but I did not want to commit and push that yet. Can we prevent creation of hard links in another way? Greetings, Janneke $ git diff diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 7dd509d0d9..dfad83aa05 100644 --- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -337,6 +337,7 @@ one specific hardware device. These we have to create." (for-each (lambda (file) (call-with-output-file (scope file) (lambda (port) + (display file port) ;hack to avoid hard-linking (chmod port #o666)))) '("dev/null" "dev/zero" @@ -350,6 +351,7 @@ one specific hardware device. These we have to create." (for-each (lambda (file) (call-with-output-file (scope (string-append "servers/" file)) (lambda (port) + (display file port) ;hack to avoid hard-linking (chmod port #o444)))) '("startup" "exec"