help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any way to boot Guix with root partition elsewhere?


From: Vladilen Kozin
Subject: Re: Any way to boot Guix with root partition elsewhere?
Date: Sat, 1 May 2021 14:01:22 +0100

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



-- 
Best regards
Vlad Kozin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]