From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MNKAMWfgjmBXQQEAgWs5BA (envelope-from ) for ; Sun, 02 May 2021 19:24:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id MAcoLWfgjmBfaAAAB5/wlQ (envelope-from ) for ; Sun, 02 May 2021 17:24:55 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1661713365 for ; Sun, 2 May 2021 19:24:55 +0200 (CEST) Received: from localhost ([::1]:50980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldFpu-0000Sc-8G for larch@yhetil.org; Sun, 02 May 2021 13:24:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcpFc-00086z-Uu for help-guix@gnu.org; Sat, 01 May 2021 09:01:40 -0400 Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]:38710) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcpFY-00061M-UX for help-guix@gnu.org; Sat, 01 May 2021 09:01:40 -0400 Received: by mail-io1-xd2f.google.com with SMTP id q25so528154iog.5 for ; Sat, 01 May 2021 06:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=KXuEj23pJY9KyU0wYj87wogDzqp0rpR9wTKIUcoJKjE=; b=CSn5fsMum8TgMOMdg8t+CuPmh3NalnWBDS21jghoaK9JvIVKi04/8sOijKsJGHJt9u 8HPnbNDGjfrAhBa23w/ycDTmTPcRzrG/4Da+oOGwuTKItVqF4MbMB8fEsv0T468qWflY p3hxbBHHzHaLuXk7tuLaVGXdrFlJihNwwZ77/kPaaDUtdf94QVIy7uWTir/tTalk00mx jgKBYVhPIeDGhpi9CNxC/QyEWToqamCkebQDs8GtOEkaYWiPN18mBtWTKaeomD2zrXyl 3uW4Fpi36FTitWUV2JhNr9iJEvAdUuJtLv2TXnCDPjrBknJOZubG9B5L500lykdHxVTX itxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=KXuEj23pJY9KyU0wYj87wogDzqp0rpR9wTKIUcoJKjE=; b=nKhE3C3CGCmZExgWTmEOrXR82AcuIPwbxp7ejyI2q1ESxkjnjE7AsQbppQqVfLTbfa lKri4Kw9RKIwL2TDNZ3sjh27CcjoOqf7qCKTJiK35JSW9VD72htKmwCrn6woLtQt8PrU vOYSuuBBSVkDqRur9EGg0mS+zQG4ktjRrR4znWhThwvn8PlcW27FCq6FQ1OMuoPlXLuh rcyhSMr++ARNzLtHLNyfYObK8ip34GIH04Nbrnoa4/BUQi7O9SeCgPWW1V2N5swLKHyX lr90zBKSDksNC8kwO8rON5ZESvZPir2ugzFHAiCehGpVhuR9e5V+iThmk+76yTs8EL8h bapw== X-Gm-Message-State: AOAM531xEvX4agnJFyZVWu3SF+1+M4+8bjxqjxfIT2T3vw8KYqG4b/XX G8OpNEsWwlSqkoX/pHfbFI5WaFRG739NpiRfiIc= X-Google-Smtp-Source: ABdhPJxX5Bnjh7i/z33f145hs59/j9jMERxGYIT7brdJR7AqAxY2X6T0QIbiFA36YWH0WawzDRC/m0b9pfqyjU6Mbrk= X-Received: by 2002:a5d:924b:: with SMTP id e11mr7591999iol.133.1619874095616; Sat, 01 May 2021 06:01:35 -0700 (PDT) MIME-Version: 1.0 References: <875z038851.fsf@dismail.de> In-Reply-To: <875z038851.fsf@dismail.de> From: Vladilen Kozin Date: Sat, 1 May 2021 14:01:22 +0100 Message-ID: Subject: Re: Any way to boot Guix with root partition elsewhere? To: Vladilen Kozin , help-guix@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::d2f; envelope-from=vladilen.kozin@gmail.com; helo=mail-io1-xd2f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 02 May 2021 13:24:46 -0400 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619976295; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=KXuEj23pJY9KyU0wYj87wogDzqp0rpR9wTKIUcoJKjE=; b=DVyoGb+Gr4MvLRETHmfkBPWLh5bLgjdXt0ba0o2+YB6rYPyV8aeVP2j7SwG1K62CVOlrqf wAZrqAU3cgvuas5S0wxHZL4xc5qKjRTr4+umQ96NlrtloXhT+YD2+gtMlJ/ttEIPHsV/uS +dGWnM9q0ChYLozMMcYWjKe6n6wnUqLR5V1OY/F/zEwBKf86cOX8g/K6uD7m7F9zP8t7HA nQO+AF9EEqifXAK0K/Fz5A18n/Ojd1p86L73H5CG2dcMmU7Ce5J6ZqlEE8jKO3lq5FxASs nD1ji6J530r5UHXVihTQtfP4UUAQUC+cGMTLH18JlUT9zgLRLp39tdALihocAQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619976295; a=rsa-sha256; cv=none; b=J1gENfzXL/CJfjo4OSwAYX5IEdkg+vYcgrcIcfmcDv2vo5XNTWA2gjjcEtywYO/7rQ7Q+D tU2m+L6v4uMxzhi1PX6bQVPcGYsGdenAQFKtKCQSHNAbvOTkNO4DzSAJOLsNIhT4vh0HlA aVz75iLmmJeVPc/cNI1MYvzBr123iXrTOK9qIMFf7QXr6m3rOk6MSCPTjh9UlcMV0YxeXC Duzqbl9AacYJx1Wj8Vix0oKidxGIeZZ0+4CKTjoNse0Q1tlPuIPNf/oplQPbFMxzT7bMio zSblMnG4DA6tdWAptNoO1KZpCo73/ij7PiAIjGappq1sUAeJzJSN8RVH5YZ5rQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=CSn5fsMu; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: 0.34 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=CSn5fsMu; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 1661713365 X-Spam-Score: 0.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: N8eQIJyi6jWu Well, I went ahead and asked the help-grub@gnu.org but I'm thinking it maybe difficult or impossible to solve. There may actually be the "Guix" way to solve this. Here are my current thoughts. Problem (not specific to Guix): - we install Guix onto NVMe SSD drive that's plugged via PCIe adaptor, - BIOS doesn't make those available to boot, - so you can't boot directly off of that SSD, - but worse, Grub on any visible drive e.g. USB won't find that SSD either. IIUC what "solutions" I've seen, they amount to booting off e.g. USB stick where you have your /boot/grub with grub.cfg BUT with actual kernel and initrd you want to boot copied over from that SSD drive AND with whatever kernel parameters your installation suggested. So, I think roughly this amounts to copying your Guix system's current kernel and initrd over to USB stick as well as its /boot/grub/grub.cfg and maybe tweaking it a bit to point to this copied kernel. Or smth like that. This obviously defeats the main value proposition of Guix, cause suddenly no "boot into another system instance", no "roll back". IMO good solution would be to have Grub load just enough of whatever kernel is doing to find that drive and make its contents available. I doubt one can do that, but maybe one can boot into some kernel and initrd and then "chain" load the Grub on that SSD? I've no clue how to do that, but I'm sure its possible: kernel is code running in memory, surely it can "load" and "pass control" over to Grub or smth. If anyone knows, do tell. Guix way of solving this could be by coding the above step explicitly into your config.scm, so that your `guix system reconfigure` having built everything, copies new kernel and initrd over to USB drive in addition to earlier kernels etc along with appropriate grub.cfg (essentially mirroring that bit of your OS on the SSD). Brittle, but at least you have your earlier systems etc etc. The whole "boot" business is at the edge of my understanding of how systems bootstrap and OMG this whole territory is full of arcane sacred knowledge spread all over the interwebs and most of what you find is nonsense. Once people who actually know how the sausage is made retire or die, our civilization is doomed :( On Sat, 1 May 2021 at 04:07, Joshua Branson wrote: > > Vladilen Kozin writes: > > > Hello guix. > > > > Is there a way out of this predicament? I can see two options. > > (1) can some Linux distro/bootloader do the FreeBSD trick: start on > > USB but then chain-boot Guix off that SSD? IIUC grub's chain-boot is > > of no help here, cause it simply won't even see that drive; > > (2) install and run Guix off USB but somehow ensure that "IO heavy" > > bits are mounted from that SSD. There's gotta be some (file-systems > > ...) combined with the way I `guix system init config.scm /mnt` (or > > rather what else I mount under /mnt where) that would achieve this? > > Hmm. I'm way out of my depth here... > > I think number 1 is your "best" bet. I've no idea how to do that. > > Number 2 is probably your "easiest" option. /boot/ should be put on the > usb, and I suppose that the / should be on the SSD...You would install > this way. That's probably how I'd do it. Or rather that is how I would > try to do it. :) > > > This is probably a silly idea...would linuxboot.org help? You use linux > to boot? > > > Another silly idea...could you embed linux in your flashrom? I think > that osboot.org is planning on embedding linux in the flashrom...That > would be pretty awesome. My flashrom is only 8MB though... > > > Best of luck! > > Joshua > > -- > Joshua Branson (joshuaBPMan in #guix) > Sent from Emacs and Gnus > https://gnucode.me > https://video.hardlimit.com/accounts/joshua_branson/video-channels > https://propernaming.org > "You can have whatever you want, as long as you help > enough other people get what they want." - Zig Ziglar -- Best regards Vlad Kozin