From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCiRh-00065w-4j for guix-patches@gnu.org; Mon, 22 May 2017 04:12:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCiRd-0006Ye-Vx for guix-patches@gnu.org; Mon, 22 May 2017 04:12:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:57296) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCiRd-0006Ya-T1 for guix-patches@gnu.org; Mon, 22 May 2017 04:12:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dCiRd-0008BL-O0 for guix-patches@gnu.org; Mon, 22 May 2017 04:12:01 -0400 Subject: bug#26339: [PATCH] doc: Adapt to multiple bootloader support. Resent-Message-ID: References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170516130306.10414-1-m.othacehe@gmail.com> <20170520224926.25c8af21@scratchpost.org> From: Mathieu Othacehe In-reply-to: <20170520224926.25c8af21@scratchpost.org> Date: Mon, 22 May 2017 10:11:38 +0200 Message-ID: <86inktux8l.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Danny Milosavljevic Cc: 26339@debbugs.gnu.org Hi Danny, > From an understanding standpoint I don't think it's that bad. My concern is about the new fields, that might be hard to understand. > > What worries me more is that now AND BEFORE, you can't boot anything other than Linux, no bootsector chainloading or anything. > > I'm not sure what the use case that "menu-entries" is trying to address is, then. I mean both the current generation and previous generations are automatically there and you can't specify any menu-entries but Linux, so what are you gonna specify? Also, already allows overriding kernel-arguments, too. > > Luckily, Tomáš Čech just noticed that "menu-entries" changed, so presumably he uses it. Will ask what use case he has... Based on Tomáš answer, I guess menu-entries are used to boot on other Linux distributions. "reconfigure" is not able to "see" those distributions by himself, so the only way to add them to bootloader configuration is via menu-entries. > >> +(boot-parameters >> (label "The Other Distro") >> - (linux "/boot/old/vmlinux-2.6.32") >> - (linux-arguments '("root=/dev/sda2")) >> + (root-device "my-root") >> + (boot-name 'grub) >> + (store-device "my-root") >> + (store-mount-point "/") >> + (kernel "/boot/old/vmlinux-2.6.32") >> + (kernel-arguments '("root=/dev/sda2")) >> (initrd "/boot/old/initrd")) >> @end example > > This here isn't so bad. > >> +@item @code{root-device} >> +The root device identifier. It has to correspond exactly to the device >> +field of the object representing the OS's root file >> +system, so it might be a device path like @code{"/dev/sda3"}. >> + >> +@item @code{boot-device} > > Did you mean "boot-name" ? Yes it's a mistake :) > >> +The name of the bootloader used to boot this entry (@code{'grub} or >> +@code{'syslinux} for instance). > > This one is a strange implementation detail to expose for menu entries, though. Maybe have operating-system-bootcfg magically complete it if it's unset? Yes I totally agree. Maybe set it to 'unknown by default ? > > Then add here "If in doubt, don't specify it.". Ok. > >> +@item @code{store-device} >> +The device where the kernel and initrd are to be found---i.e., for GRUB >> +@dfn{root} for this menu entry (@pxref{root,,, grub, GNU GRUB manual}). >> + >> +Depending on the bootloader, this may be a file system label (a >> +string), a file system UUID (a bytevector, @pxref{File Systems}), or >> +@code{#f}. If set to @code{#f}, GRUB will search the device containing >> +the file specified by the @code{linux} field (@pxref{search,,, grub, >> +GNU GRUB manual}). It must @emph{not} be an OS device name such as >> +@file{/dev/sda1}. > > Maybe default to #f in in gnu/system.scm ? > > Then add here "If in doubt, don't specify it.". > Ok. >> +@item @code{store-mount-point} >> +The mount point of the above device on the system. You probably want >> +to set it to @code{"/"}. GuixSD uses it to strip the prefix of store >> +file names for systems where @file{/gnu} or @file{/gnu/store} is on a >> +separate partition. > > Maybe default to "/" in > Then add here "If in doubt, don't specify it.". Ok. > > That would make the amount of new fields the user has to specify to one, just "root-device". > Yes seems better. > That said, I'm wondering whether we should keep menu-entries at all (or if we do, maybe make it bootloader-specific like it was? At least then you can add entries that Guix doesn't use already). Let's see what Tomáš says it's for :) I'll propose a new patch. Thanks ! Mathieu