NetBSD-Users archive

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

Re: Building PXE/XIP environment

On 21.04.2011 09:05, Scrap Happy wrote:
> Hi,
> I need to be able to boot a "standalone" environment
> for some applications (i.e., one the image is loaded,
> there are no remaining dependencies on the "server"...
> no nfs mounts, etc.).
> Since this is probably an interactive/iterative process
> (i.e., port some part of the system, determine any
> dependencies that must be removed, remove them, lather,
> rinse, repeat), I wonder if there is a straightforward
> way to create a kernel+filesystem image and then "package"
> this once it works properly.
> Any pointers to guides that might facilitate this?

Once you have your system ready to be packaged:
- use makefs(8) to create the filesystem image:

    makefs <image file> <image root directory>

- note down the resulting file system image file, then compile a kernel

options MEMORY_DISK_IS_ROOT     # root on memory disk
options MEMORY_DISK_ROOT_SIZE=40000   # size of fs image in blocks

- mdsetimage(8) to embed the image in the resulting kernel:

    mdsetimage <kernel> <image file>

Boot with the resulting <kernel>. If your host system is not NetBSD,
build these tools via

Jean-Yves Migeon

Home | Main Index | Thread Index | Old Index