From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Installer, ISO9660, etc. Date: Sun, 09 Jul 2017 22:08:46 +0200 Message-ID: <877ezhv0dt.fsf@gnu.org> References: <20170627221608.A23B52013B@smtp.hushmail.com> <20170628154943.36021286@scratchpost.org> <20170705152024.4dfde1c5@scratchpost.org> <87mv8gbhur.fsf_-_@gnu.org> <20170707181315.2f998f1d@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUIVi-0004Gk-3r for guix-devel@gnu.org; Sun, 09 Jul 2017 16:08:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUIVd-0006Mp-Vq for guix-devel@gnu.org; Sun, 09 Jul 2017 16:08:54 -0400 In-Reply-To: <20170707181315.2f998f1d@scratchpost.org> (Danny Milosavljevic's message of "Fri, 7 Jul 2017 18:13:15 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Danny Milosavljevic skribis: > On Fri, 07 Jul 2017 13:34:52 +0200 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> Danny Milosavljevic skribis: >>=20 >> > 95% done. If would actually work if we came to a consensus about the = volume label (it must be uppercase; see bug# 27520 in guix-patches). Also,= UUID boot support is still mostly missing - same as in the non-iso9660 cas= e.=20=20 > >>I hope I=E2=80=99m not holding anything back in this area! > > Oh, not at all. I'm just not clear on which way we chose (if any?). > > What was the string-upcase solution? Even if it's created with (string-u= pcase "GuixSD") (and it is - if you don't override it) the boot code as it = is now will still fail to find the root - because it matches labels case-se= nsitively. The string-upcase is buried deep within the image creation proc= edure. Right. > Or do you mean I should put (string-upcase "GuixSD") in system-disk-image= in gnu/system/vm.scm as well ? That would work, I guess... although the fi= nished image (iso9660 or not!) would still have "GUIXSD" then. I don't see= that as a big deal, though :) > > There's still the following places: > > ./gnu/build/vm.scm: search --set=3Droot --label gnu-di= sk-image~@ > ./gnu/system/install.scm: (device "gnu-disk-image") > ./gnu/system/vm.scm: "gnu-disk-image") > > Or do you mean we should just match case-insensitively in gnu/build/file-= systems.scm ? > > I.e. use > > (define partition-label-predicate > (partition-predicate read-partition-label string-ci=3D?)) > > That would mean match case-insensitively for both iso9660 and non-iso9660= . I would very much prefer this fix. What about this not-so-bad solution: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 3e722d081..662fd0085 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -335,11 +335,18 @@ the image." system described by OS. Said image can be copied on a USB stick as is. When VOLATILE? is true, the root file system is made volatile; this is useful to USB sticks meant to be read-only." + (define normalize-label + ;; ISO labels are all-caps (case-insensitive), but since + ;; 'find-partition-by-label' is case-sensitive, make it all-caps here. + (if (string=? "iso9660" file-system-type) + string-upcase + identity)) + (define root-label ;; Volume name of the root file system. Since we don't know which device ;; will hold it, we use the volume name to find it (using the UUID would ;; be even better, but somewhat less convenient.) - "gnu-disk-image") + (normalize-label "gnu-disk-image")) (define file-systems-to-keep (remove (lambda (fs) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable That way we preserve case-sensitivity for the other file systems. If that=E2=80=99s fine with you, let=E2=80=99s do that! Longer-term we should probably create records for each file system in (gnu build file-system); this would include, for each file system, the =E2=80=98superblock?=E2=80=99 procedure, the =E2=80=98labe= l=E2=80=99 procedure, and, probably, a =E2=80=98label=3D?=E2=80=99 procedure. Thanks, Ludo=E2=80=99. --=-=-=--