GNU bug report logs - #27735
Unbootable images with GuixSD on... "GuixSD"

Previous Next

Package: guix;

Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>

Date: Mon, 17 Jul 2017 14:48:02 UTC

Severity: normal

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: ludo <at> gnu.org (Ludovic Courtès)
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: dannym <at> scratchpost.org, 27735 <at> debbugs.gnu.org
Subject: bug#27735: Unbootable images with GuixSD on... "GuixSD"
Date: Tue, 18 Jul 2017 20:59:33 +0200
Heya,

Tobias Geerinckx-Rice <me <at> tobias.gr> skribis:

> On 18/07/17 13:49, Ludovic Courtès wrote:
>> What about generating a UUID in a deterministic yet somewhat unique
>> fashion along these lines (untested):
>
> Not great, but I can't think of a better way. :-)

Yup.

>> +  (define root-uuid
>> +    ;; UUID of the root file system, computed in a deterministic fashion.
>> +    (if (string=? "iso9660" file-system-type)
>> +        (let ((pad (compose (cut string-pad <> 2 #\0)
>> +                            number->string)))
>> +          (string->iso9660-uuid
>> +           (string-append "1970-01-01-"
>> +                          (pad (hash name 24))
>> +                          (pad (hash file-system-type 60))
>> +                          (pad (hash (operating-system-host-name os) 60)))))
>> +        (uint-list->bytevector
>> +         (list (hash (string-append file-system-type name)
>> +                     (expt 2 64))
>> +               (hash (operating-system-host-name os)
>> +                     (expt 2 64)))
>> +         (endianness little)
>> +         8)))
>> +
>
> Why not throw SIZE into this mix as well?

Because it can be the symbol 'guess or a number, so that makes things
needlessly complicated IMO.

> When building without ‘--image-size’ (the default nowadays), it's a
> function of the exact size of the entire graph and reasonably sensitive
> to most kinds of input changes.

The actual size is not known until the derivation is built; we don’t
have access to that information here.

>> We cannot use the store file name’s hash, unfortunately, because the
>> UUID has to be given on the “host side.”
>
> That is unfortunate, but a best-effort heuristic will do.

Yeah, still better than a hard-coded label I guess.

Ludo’.




This bug report was last modified 7 years and 348 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.