On Wed, Nov 05, 2014 at 08:38:25PM -0800, Chris Cappuccio wrote:
> Matthieu Herrb [matth...@herrb.eu] wrote:
> > Hi,
> > 
> > I've a laptop with  Ubuntu 14.04/OpenBSD-current dual boot. 
> > I'm trying to convert the OpenBSD FS to softraid(4) encryption with
> > passphrase.
> > 
> > I'm booting from an USB drive to access the disk to shuffle data on
> > it. 
> > 
> > After backing up my data, changing the OpenBSD disklabel in sd0 to
> > have one RAID partition and one swap partition, running bioctl to
> > setup an encrypted sd2 softraid and restoring my data, I'm stuck with 
> > bootblocks. 
> > 
> > What is the correct installboot incantation to setup bootblocks so
> > that Ubuuntu's grub which chainloads the OpenBSD part of the disk
> > loads a softraid-aware biosboot ?
> > 
> 
> Doesn't installboot load the first-stage at the beginning of the OpenBSD
> partition according to disklabel? Grub is just replacing the MBR. I don't
> understand how crypto would make grub->first-stage step any different.
> (for that matter, I also don't understand how the first-stage can even
> load the second-stage /boot from an encrypted partition!!)

biosboot(8) reads a plaintext boot(8) located in the softraid meta data area.
boot(8) reads and decrypts /bsd from the root paritition of the crypto volume.

If installboot codes the right boot(8) offset into biosboot, i.e. the
offset on the disk within softraid meta data, it should "just work"
whether or not biosboot itself is loaded from an MBR or chainloaded.

However, I faintly remember trying to set up a dual-boot Linux/OpenBSD
system with softraid crypto some time last year and couldn't figure out
how to make it work at the time. But I don't recall what issues I ran into.

If you look at the output of 'installboot -n -v sd2' you should be able to
tell in which sector installboot is going to put biosboot and whether
that position collides with grub. Perhaps that will help you get going.

Reply via email to