On 2018/02/01 14:34, tinkr@openmailbox.org wrote:
> Hi Stuart, thanks a lot for responding -
>
> The most relevant followup question is probably the one about
> why not using boot.conf would work out, at the bottom.
>
> > On 2018-02-01, tinkr@openmailbox.org <tinkr@openmailbox.org> wrote:
> >> Hi, so, this question sprung from the previous email however it's a big
> >> one and so deserves to be addressed separately:
> >>
> >> If a machine's BIOS does not support booting from a particular boot
> >> medium where OpenBSD is installed, e.g. my BIOS does maybe not
> >> supporting booting from PCIe NVME SSD:s, but it does support booting
> >> from USB memory sticks.
> >>
> >> For such situations, how can I create an OpenBSD USB stick boot disk,
> >> that continues the OpenBSD boot process for me but from the PCIe NVME
> >> SSD-stored crypto softraid?
> >>
> >> This could be done either by
> >>
> >> * The OpenBSD kernel being stored on the USB stick, loading from it,
> >> and then using the PCIe NVME SSD as both root disk, swap disk, and
> >> dump disk, or,
> >
> > I think this should be possible with a custom kernel to set the
> > devices. Updates will be annoying and it will be tough to get KARL
> > to work nicely.
>
> Wait what does KARL mean here?
The random kernel re-linking done before first boot and after each
boot (also used as the basis for syspatch kernel updates).
> And what's the kernel compile time setting, would this be a patch or
> is there some define somewhere?
It's the "config bsd root on XXXX swap on YYYY" as you'll see in
the RAMDISK kernel configs.
> >> * The OpenBSD boot loader which is stored on the USB memory stick,
> >> would load the OpenBSD kernel from the PCIe NVME SSD.
> >
> > The boot loader uses BIOS IO functions, if those can't talk to the
> > NVME it's not going to work.
>
> I'm not sure but I think that, while some BIOS:es will not do IO with
> the PCIe NVME, then, I think my BIOS (and then of course some other
> peoples') actually does provide access to the NVME SSD, it's just that
> it won't boot from it.
>
> I'd need to debug this much closer though.
Do "machine diskinfo". If the NVME is listed there, you may have a chance.
> >> This should be a fundamental and trivial usecase to OpenBSD, however,
> >> last time I tried (then with adding a "boot" command to boot.conf per
> >> http://man.openbsd.org/boot.conf ), I think it not worked out of the
> >> box.
> >
> > It might not be very appealing but afaict the only trivial way to do
> > this is to place root on the USB stick or some other device, and other
> > filesystems on NVME.
>
> boot.conf (http://man.openbsd.org/boot.conf) specifies in three or more
> places, ways to change the boot disk.
>
> First, do "boot hd1a:/bsd", next do "machine boot hd1a", next "set device hd1a".
>
> Why would all of these three not be effective?
"boot hd1a:/bsd" tries to load /bsd from BIOS device hd1.
"machine boot hd1a" tries to boot the PBR (partition boot record) on
the first partition of BIOS device hd1.
I haven't used "set device" but I guess it would probably set a default
for "boot".
In all cases this is talking about a device reachable from BIOS.
To access some other device (NVME, USB drive without BIOS support, etc)
you'd need a driver to talk to the device, which isn't available until
the kernel is running, so isn't useful for loading the kernel initially.
> E.g. at completion of the OpenBSD installation do:
>
> echo "set device hd1a" >> /mnt/etc/boot.conf
> installboot -r /mnt sd1
>
> (Here, sd1 is the OpenBSD installer USB memory stick, and, when
> booting from it, hd0 would be the same USB memory stick, and hd1a would
> be the PCIe NVME.)
>
> Following up on this question in one more wider email shortly.
>
> Tinker
No comments:
Post a Comment