Home | History | Annotate | Line # | Download | only in stand
      1  1.2    andvar /*	$NetBSD: README,v 1.2 2021/08/17 22:00:31 andvar Exp $ */
      2  1.1  fredette 
      3  1.1  fredette The sun bootblocks are split into two parts: a small 1st-level program that
      4  1.1  fredette gets written right after the superblock in a partition (and is hence limited
      5  1.1  fredette in size to SBSIZE - DEV_BSIZE bytes), and a 2nd-level program that resides
      6  1.1  fredette in the filesystem proper.
      7  1.1  fredette 
      8  1.1  fredette The 1st-level program is loaded into memory by the PROM. It loads the second
      9  1.1  fredette stage program from a set of filesystem block numbers that are hard-coded
     10  1.1  fredette into it by the `installboot' program. The prototype code for the 1st-level
     11  1.1  fredette bootblocks are in `bootxx'.
     12  1.1  fredette 
     13  1.1  fredette The 2nd-level program (`ufsboot') is normally installed in the root FS
     14  1.1  fredette as `/ufsboot'. It uses the device drivers in the PROM and the stand-alone
     15  1.1  fredette filesystem code in `libsa.a' to locate and load the kernel.
     16  1.1  fredette 
     17  1.1  fredette Use the following command to install the 1st-level bootblocks in the
     18  1.1  fredette root filesystem (on `sd0a') using the file `/boot' as the second level
     19  1.1  fredette boot program:
     20  1.1  fredette 
     21  1.1  fredette 	mount /dev/sd0a /mnt
     22  1.1  fredette 	cd /usr/mdec
     23  1.1  fredette 	cp -p ufsboot /mnt/ufsboot
     24  1.1  fredette 	sync ; sleep 1 ; sync
     25  1.1  fredette 	./installboot -v /mnt/ufsboot bootxx /dev/rsd0a
     26  1.1  fredette 
     27  1.1  fredette The above only works with securelevel <= 0 (see init.8 manual).
     28  1.1  fredette 
     29  1.1  fredette Status:
     30  1.1  fredette 
     31  1.1  fredette netboot works.
     32  1.1  fredette 
     33  1.1  fredette bootxx, installboot are tested and working.  It would be nice if
     34  1.1  fredette installboot would find the inumber for the 2nd stage boot program
     35  1.1  fredette without having the filesystem mounted so this command can work
     36  1.2    andvar with securelevel==1 (the default).  Doing this requires adding
     37  1.1  fredette code to read and do a directory lookup in the root...
     38  1.1  fredette 
     39