Ted Bullock <[email protected]> wrote:

> OK more specifics,
> 
> I repeated my tests from last night and the boot does indeed fail
> after revision 1.35 on sys/arch/sparc64/stand/ofboot/boot.c
> 
> > 
> >> Random was added to the bootblocks before 6.7.  But then code was
> >> added to fchmod the random file, so that it would not be reused.
> >> That fchmod is a write-to-disk operation.
> 
> 
> Rebooting with command: boot
> Boot device: disk  File and args:
> OpenBSD IEEE 1275 Bootblock 2.0
> ..>> OpenBSD BOOT 1.19
> Trying bsd...
> /
> Evaluating:
> Flushbuf error
> read header: short read (only 0 of 64)
> 
> >> Is this write code triggering a bug in the bootblocks or is it actually
> >> broken on it's own?
> >>
> >> see loadrandom()
> > 
> 
> the fchmod call is what's triggers the error, I don't know the answer
> to your question though.

So maybe the "write" operation is broken on these older roms.

I wonder if we should do a version-check, and fail the write operation.
The bootblocks will be OK if the fchmod fails.

Reply via email to