From: Jonathan McHugh <indieterminacy@libre.brussels>
To: help-guix@gnu.org
Subject: Re: Any way to boot Guix with root partition elsewhere?
Date: Mon, 03 May 2021 14:55:22 +0200 [thread overview]
Message-ID: <871raougcl.fsf@libre.brussels> (raw)
In-Reply-To: <CACw=CXNfu=PgZdiDAW32Jj0YyUxaUHFgp27bSkhMgU8t6aqYhg@mail.gmail.com>
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 <vladilen.kozin@gmail.com> 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 <jbranso@dismail.de> wrote:
>>
>> Vladilen Kozin <vladilen.kozin@gmail.com> 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
next prev parent reply other threads:[~2021-05-03 15:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-30 19:19 Any way to boot Guix with root partition elsewhere? Vladilen Kozin
2021-05-01 3:06 ` Joshua Branson
2021-05-01 13:01 ` Vladilen Kozin
2021-05-02 22:08 ` Joshua Branson
2021-05-03 12:55 ` Jonathan McHugh [this message]
2021-05-02 21:16 ` support split /boot partition Vagrant Cascadian
2021-05-02 21:59 ` Vincent Legoll
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871raougcl.fsf@libre.brussels \
--to=indieterminacy@libre.brussels \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).