GNU bug report logs -
#41350
[PATCH 0/3] Use native qemu to build vm-image.
Previous Next
Reported by: Jan Nieuwenhuizen <janneke <at> gnu.org>
Date: Sun, 17 May 2020 10:02:01 UTC
Severity: normal
Tags: patch
Done: Mathieu Othacehe <othacehe <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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"
--
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
This bug report was last modified 2 years and 313 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.