Port-i386 archive

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

Re: installing bootxx_fat16 on USB stick doesn't work



On Thu, Mar 06, 2008 at 10:42:49PM +0100, Matthias Drochner wrote:
> 
> david%l8s.co.uk@localhost said:
> > The first part of the sector is what is causing the problem... Down to
> > 0x80 should be enough. 
> 
> OK, here is it:
> 00000000  eb 3e 90 2a 35 3e 2b 6b  49 48 43 00 02 20 02 00  |.>.*5>+kIHC.. ..|
> 00000010  02 00 02 00 00 f8 f7 00  20 00 10 00 20 00 00 00  |........ ... ...|
> 00000020  e0 bf 1e 00 80 00 29 fb  53 c8 ca 20 20 20 20 20  |......).S..     |
> 00000030  20 20 20 20 20 20 46 41  54 31 36 20 20 20 f1 7d  |      FAT16   .}|
> 00000040  fa 33 c9 8e d1 bc fc 7b  16 07 bd 78 00 c5 76 00  |.3.....{...x..v.|

The problem is that the netbsd code expects the bios parameter block (BPB)
to be end at byte 3e (ie two bytes sooner).
So the initial 2 bytes (jmps xx) would be 'eb 3c'.
I have NFI what the 'f1 7d' bytes mean, they aren't described in the
netbsd description of the bpb (sys/bootblock.h).

With '-f' all of the BPB would be zerod - which would make the fat
filesystem unmountable!

Patching the 3e to 3c should let installboot work, but maybe it should
(at least have the option to) preserve the initial bytes of the bpb.

If you dd the sector into memory
$ printf '\x3c' | dd bs=1 seek=1 conv=notrunc <file>
should patch the byte!

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index