On 04/28/11 10:05, Nigel Horne wrote:
> Hello again.
>
>   Thank so much for all your different contributions.
>
>   Yaifo seems promising since it can apparently address all the situations in 
> which you have access to a preinstalled dedicated server that you want to 
> "convert" to OpenBSD.
>
>   Have any of you encountered situations in which the Yaifo approach didn't 
> work out of the box?
>   Are there particular points (outsite of the support documentation) to be 
> careful about when trying this?
>   Would you have some practical recommendations as to how to use Yaifo on a 
> real life server to minimize failure probability (if any.?)

Actually Yaifo did build an image out of the box but it did not boot on 
my server, with 4.8 on i386. I had to patch installboot.c in order to 
build an image with a valid MBR.

Being able to installboot on a VND disk (not floppy) image seems to be a 
valid usage but is broken at least on 4.8 i386 amd64 because it won't 
search for MBR on a VND.

The patch is attached. I guess it prevents installboot from working on 
VND floppy images as no MBR will be found on these.

The proper hack would be to add an option to force looking for MBR even 
on VNDs, document it, and patch Yaifo to use this option.

-- 
Thomas de Grivel
http://b.lowh.net/billitch

"I must plunge into the water of doubt again and again."
Copyright (c) 2011 Thomas de Grivel <billi...@gmail.com>

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Index: installboot.c
===================================================================
RCS file: /cvs/src/sys/arch/amd64/stand/installboot/installboot.c,v
retrieving revision 1.12
diff -u -p -r1.12 installboot.c
--- installboot.c       30 May 2009 23:13:14 -0000      1.12
+++ installboot.c       27 Apr 2011 22:54:08 -0000
@@ -197,8 +197,7 @@ main(int argc, char *argv[])
                sync(); sleep(1);
        }
 
-       if (dl.d_type != 0 && dl.d_type != DTYPE_FLOPPY &&
-           dl.d_type != DTYPE_VND) {
+       if (dl.d_type != 0 && dl.d_type != DTYPE_FLOPPY) {
                /* Find OpenBSD partition. */
                start = findopenbsd(devfd, &dl, (off_t)DOSBBSECTOR, &n);
                if (start == -1)
Index: installboot.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/stand/installboot/installboot.c,v
retrieving revision 1.55
diff -u -p -r1.55 installboot.c
--- installboot.c       30 May 2009 23:13:18 -0000      1.55
+++ installboot.c       27 Apr 2011 23:57:59 -0000
@@ -193,8 +193,7 @@ main(int argc, char *argv[])
                sync(); sleep(1);
        }
 
-       if (dl.d_type != 0 && dl.d_type != DTYPE_FLOPPY &&
-           dl.d_type != DTYPE_VND) {
+       if (dl.d_type != 0 && dl.d_type != DTYPE_FLOPPY) {
                /* Find OpenBSD partition. */
                start = findopenbsd(devfd, &dl, (off_t)DOSBBSECTOR, &n);
                if (start == -1)

Reply via email to