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 oPjOLqQYkGBNRgAAgWs5BA (envelope-from ) for ; Mon, 03 May 2021 17:37:08 +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 uBd5KqQYkGDrbgAAB5/wlQ (envelope-from ) for ; Mon, 03 May 2021 15:37:08 +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 27546282CA for ; Mon, 3 May 2021 17:37:08 +0200 (CEST) Received: from localhost ([::1]:52094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldad9-0003L9-B7 for larch@yhetil.org; Mon, 03 May 2021 11:37:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldY9B-0004PV-M6 for help-guix@gnu.org; Mon, 03 May 2021 08:58:01 -0400 Received: from libre.brussels ([144.76.234.112]:51602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldY99-0007Uc-64 for help-guix@gnu.org; Mon, 03 May 2021 08:58:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libre.brussels; s=mail; t=1620046674; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HSPApFlEIMqF5JyODae+UQRfpCHCeBD7NtxH7tEmgmY=; b=Pbov/DTR4EsrFA8gml7uQqtGVBmnjxLHSTGDVZrQiW8LcwING+b0jMuWvbjE10hGZphghy VvU1tMbhzFxqUviTV9lfEhSynF5jKU0A9kC6DFY0vs9R7Nv2izRc++GSvrfeAmyEN+Al/D R2bU3vrbUSHRFR3j9gxM5dgbXmfau10= References: <875z038851.fsf@dismail.de> From: Jonathan McHugh To: help-guix@gnu.org Subject: Re: Any way to boot Guix with root partition elsewhere? In-reply-to: Date: Mon, 03 May 2021 14:55:22 +0200 Message-ID: <871raougcl.fsf@libre.brussels> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=144.76.234.112; envelope-from=indieterminacy@libre.brussels; helo=libre.brussels 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 03 May 2021 11:36:07 -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=1620056228; 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=HSPApFlEIMqF5JyODae+UQRfpCHCeBD7NtxH7tEmgmY=; b=TMdWNcCS4+5CWQZ83j4iDdJ7Ua5PbIyZf8rCNIcNZPnQMDyqPuKyDD9OfuuGwdBeqZci0i GfkB21I+V9xR87wLsfAXblZRaF6TzCZthAoWhmBzlnyG55RxuWY24/MRWQLiKD4x1yyM6p 9mtffg25ILKRrM0LOAeANux8H9HcC/5LUjW4wrZjaDBXoZ6gHVd2qijHdiDiFiUwiMEX5Q E0K1m6tJ8mSyMmbG2JQ2x/iFw+MNmN5g5wffoqBp7nk0jr3rNpnE3fxqM+bUy8p4w83fLi hjlhDqaZewTl64mDANfqD7CrVHpmZ1kWsU6P+iiXOtWTWcUPkeP2vMdNvqC5PA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620056228; a=rsa-sha256; cv=none; b=F/T2G518RQtAXU5nFrhcikT6AR0VvVSOm+rcaq/WT0Q+bvPfUGES60Oao+hWIfcKdp7wbp Mo7rHyP+Y/cmZNxP9J5DBPmhMuiGlxR/ZHmd2r68Pvq8HZ7gsEXM4YMU5UtdI21I5NudNl MXuJe2pwtMiSTXpF/UfQQ68b4C0WoHgVc8sV/jb4tS9Q6GKTUEaeyGQrZISDZLDfloyKbn UP8WJUSqBVjs74TUbMTBoXhF28kLNAvH6kF73Ibay7My+mcR4WjBCo9tsxxcZs/OIkwOwA udZTnpW5U4zllEJViE8sHkXhxrsutqMxYc/jL7aaH99//tAU3HAQB74Qb8VkNA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=libre.brussels header.s=mail header.b="Pbov/DTR"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=libre.brussels (policy=none); 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.36 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=libre.brussels header.s=mail header.b="Pbov/DTR"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=libre.brussels (policy=none); 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: 27546282CA X-Spam-Score: -0.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: a0vkakQPX1Fv A shot in the dark - but I know that there have been some activity with regards to using Lua in the kernel: => https://github.com/luainkernel => lwn.net/Articles/830154/ If thats not helpful hopefully it can give you some ideas. Has Guile done much activity interacting with the kernel? Jonathan Vladilen Kozin writes: > 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 -- Jonathan McHugh indieterminacy@libre.brussels