unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* problem with commit abae042
       [not found]   ` <20170415184756.10b178be@scratchpost.org>
@ 2017-04-15 18:17     ` Mathieu Othacehe
  2017-04-15 18:56       ` Danny Milosavljevic
                         ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mathieu Othacehe @ 2017-04-15 18:17 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 26339, guix-devel


I think there's a problem with commit abae042 :

* profile-grub-entries become unused and is still present.
* When using switch-generation, operating-system-bootcfg is not
* called. So, the kernel arguments are not correctly set (--root,
* --system and --load), and the resulting entries in grub.cfg are broken.

Mathieu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: problem with commit abae042
  2017-04-15 18:17     ` problem with commit abae042 Mathieu Othacehe
@ 2017-04-15 18:56       ` Danny Milosavljevic
  2017-04-15 19:13         ` Mathieu Othacehe
  2017-04-15 19:50       ` bootloader and kernel arguments "--root", "--system", "--load" Danny Milosavljevic
  2017-04-15 23:18       ` bug#26339: problem with commit abae042 Leo Famulari
  2 siblings, 1 reply; 6+ messages in thread
From: Danny Milosavljevic @ 2017-04-15 18:56 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 26339, guix-devel

Hi,

On Sat, 15 Apr 2017 20:17:59 +0200
Mathieu Othacehe <m.othacehe@gmail.com> wrote:

> I think there's a problem with commit abae042 :
> 
> * profile-grub-entries become unused and is still present.

I know, I can't remove it without review, far too dangerous.

> * When using switch-generation, operating-system-bootcfg is not
> * called. So, the kernel arguments are not correctly set (--root,
> * --system and --load), and the resulting entries in grub.cfg are broken.

Yes, indeed.  I'm working on it.  If I can't get it to work today I'll back it out again.

Too bad this is such a huge changeset - it's quite difficult to find a safe path.

Do you have an idea how to fix it? 

Would it be good to press forward with the other patches or should I back it out?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: problem with commit abae042
  2017-04-15 18:56       ` Danny Milosavljevic
@ 2017-04-15 19:13         ` Mathieu Othacehe
  0 siblings, 0 replies; 6+ messages in thread
From: Mathieu Othacehe @ 2017-04-15 19:13 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 26339, guix-devel


> Too bad this is such a huge changeset - it's quite difficult to find a safe path.

Yes, and my split between commit isn't great, sorry about that.

> Do you have an idea how to fix it? 

Nothing trivial. Plus I didn't notice before that
profile-bootloader-entries and operating-system-bootcfg had parts that
could have been factorized.

>
> Would it be good to press forward with the other patches or should I back it out?

Maybe the safer approch would be to revert this commit. I'll publish new
patches and try to find a better approach for
profile-bootloader-entries, if you're ok ?

Thank you,

Mathieu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bootloader and kernel arguments "--root", "--system", "--load"
  2017-04-15 18:17     ` problem with commit abae042 Mathieu Othacehe
  2017-04-15 18:56       ` Danny Milosavljevic
@ 2017-04-15 19:50       ` Danny Milosavljevic
  2017-04-15 23:18       ` bug#26339: problem with commit abae042 Leo Famulari
  2 siblings, 0 replies; 6+ messages in thread
From: Danny Milosavljevic @ 2017-04-15 19:50 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 26339, guix-devel

Ok, I'm in the process of reverting the patches to grub.

------

Problem analysis:

- (profile-boot-parameters ...) doesn't pick up the correct kernel-arguments.  It's reading them from a parameters file for the system generation back then, for example from /gnu/store/x8ymiksnhfyvjdi8ms38ysc4yr92lyk9-system/parameters, which contains:

(boot-parameters
  (version 0)
  (label "GNU with Linux-Libre 4.5.1 (beta)")
  (root-device "/dev/sda1")
  (kernel "/gnu/store/h977riqrp7c3w2v0mcpp48ldcapy09gx-linux-libre-4.5.1")
  (kernel-arguments ("crashkernel=256M" "modprobe.blacklist=pcspkr,snd_pcsp" "quiet" "acpi_osi=Linux" "clocksource=acpi_pm"))
  (initrd (string-append "/gnu/store/8w1abpwlhnilibiamcp6j01rhjh9k5ix-base-initrd" "/initrd")))

, which indeed doesn't contain the correct kernel arguments for it to boot.

Why not?  Shouldn't we just store the correct arguments in there eventually?

Those kernel arguments should include (in the front):

linux-arguments
        let root = (boot-parameters-root-device params) or #f
        let root-device = (if (bytevector? root) (uuid->string root) root)
        let system = "/gnu/store/x8ymiksnhfyvjdi8ms38ysc4yr92lyk9-system" in
        "--root=<root-device>"
        "--system=<system>"
        "--load=<system>/boot"
.

Or is it something grub-specific?

Or is it because we don't know system's own hash value in order to be able to write it there?

Would it be good to (later) replace the kernel-arguments accessor by a procedure that also takes system and root and prepends them on-the-fly?

i.e.

(define (boot-parameters-all-kernel-arguments params system root)
  (cons
    (string-append "--root=" root)
    (cons
      (string-append "--system=" system)
      ... load etc
      (boot-parameters-kernel-arguments params))))

... and only use this one, never boot-parameters-kernel-arguments anywhere else?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bug#26339: problem with commit abae042
  2017-04-15 18:17     ` problem with commit abae042 Mathieu Othacehe
  2017-04-15 18:56       ` Danny Milosavljevic
  2017-04-15 19:50       ` bootloader and kernel arguments "--root", "--system", "--load" Danny Milosavljevic
@ 2017-04-15 23:18       ` Leo Famulari
  2017-04-15 23:22         ` Danny Milosavljevic
  2 siblings, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2017-04-15 23:18 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 26339, guix-devel

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

On Sat, Apr 15, 2017 at 08:17:59PM +0200, Mathieu Othacehe wrote:
> 
> I think there's a problem with commit abae042 :
> 
> * profile-grub-entries become unused and is still present.
> * When using switch-generation, operating-system-bootcfg is not
> * called. So, the kernel arguments are not correctly set (--root,
> * --system and --load), and the resulting entries in grub.cfg are broken.

This should be reverted immediately, since the master branch is what
users get from `guix pull`, so we really must not break it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bug#26339: problem with commit abae042
  2017-04-15 23:18       ` bug#26339: problem with commit abae042 Leo Famulari
@ 2017-04-15 23:22         ` Danny Milosavljevic
  0 siblings, 0 replies; 6+ messages in thread
From: Danny Milosavljevic @ 2017-04-15 23:22 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 26339, guix-devel

It has been reverted.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-15 23:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20170402135242.2958-1-m.othacehe@gmail.com>
     [not found] ` <20170402135242.2958-17-m.othacehe@gmail.com>
     [not found]   ` <20170415184756.10b178be@scratchpost.org>
2017-04-15 18:17     ` problem with commit abae042 Mathieu Othacehe
2017-04-15 18:56       ` Danny Milosavljevic
2017-04-15 19:13         ` Mathieu Othacehe
2017-04-15 19:50       ` bootloader and kernel arguments "--root", "--system", "--load" Danny Milosavljevic
2017-04-15 23:18       ` bug#26339: problem with commit abae042 Leo Famulari
2017-04-15 23:22         ` Danny Milosavljevic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).