On Thu, Dec 29, 2011 at 03:10:06PM +0100, Edgar Fu? wrote: > Am 29.12.2011 um 12:20 schrieb David Laight: > > > The actual 'pc' boot sequence is: > Ah brilliant, answers to all the questions I wanted to ask anyway. > > > 4) The pbr code now reads the rest of the 8k 'boot code' area at the > > start of the partition > This means "MBR partition", right?
Yes, nothing has found a netbsd disklabel yet. > And this "boot code" is what is called "primary boot" in BSD terminology, > right? That is what installboot(8) calls it :-) > > > this is the rest of bootxx_xxxfs. > What do you mean by "rest of"? bootxx_ffxv1 is just under 8k, the first 512 sector is read by the mbr, so that code has to read the rest of the sectors. > > > 5) The bootxx code now tries to load the 'boot' program from filesystem, > > it checks the following places for a filesystem: > I don't quite get why it has to look for a filesystem. I thought (and > in only 8k it must have) the block numbers of /boot encoded into > it by installboot? So, are these block numbers FS-relative? > I thought they were disklabel-partition relative. Nope, 8k is plenty of space for the code to parse the directory structure (etc) in order to read a file. That is why there are copies of bootxx for each fs type. For ffsv1/v2 there is a lot of bloat caused by using access macros that mimick the normal kernel ones - which is partially why there are separate copies. It is also why you can't boot from fs with large block/fragment sizes (difficult to have 64k buffers in real mode!). > > a) the start of the partition > This again means "MBR partition", I suppose? Yes. David -- David Laight: da...@l8s.co.uk