Back | Table of Contents

Netbooting to install to a local hard drive

Which files you need to serve via NFS depends on which install tools are available for your platform. What are generally available (in order of preference):

Ramdisk kernel
Netboot disk image
NetBSD on server with miniroot
Install scripts
No netboot install tools
Any install tools, but no local console


Ramdisk kernel

This one is no trouble at all. Place the ramdisk kernel at the root of your nfs mountpoint, named netbsd. This ramdisk kernel contains the /dev entries and install tools. The bootloader should just load this kernel and immediately start the install tools.

Netboot disk image

This is only slightly more work than the ramdisk kernel. You might find a diskimage.tgz archive, which will include all of the necessary files (including kernel, /dev entries, and install tools). Untar this into your client's nfs mount point. When the client starts, it will immediately start running the install tools.

NetBSD on server with miniroot

If you're running NetBSD on your NFS server (or some other OS which can mount NetBSD filesystems, such as OpenBSD or FreeBSD), then you can mount your platform's miniroot-fs via a vnode disk driver and use that as your client's nfs mount point. This will immediately boot the client into the install tools. To set this up, you'd run something like:
# vnconfig -c /dev/vnd0c /path/to/miniroot-fs
# mount -o ro /dev/vnd0c /export/client/root

Install scripts

This one is a little more effort. Bascially, you might find some scripts called install.md, install.sh, install.sub, and upgrade.sh. You'll need a minimally netbootable system before you can run these scripts.

The easiest way to do this is to extract base.tgz, etc.tgz, and kern.tgz. Then you need to run cd /dev;./MAKEDEV all. Once you've done these steps, then you'll just run /install.sh to start the install tools.

No netboot install tools

Oh well. You'll need to extract base.tgz, etc.tgz, and kern.tgz. Then you need to run cd /dev;./MAKEDEV all. Once you've done these steps, netboot your client. Now, you need to disklabel your hard drive using disklabel(8). Be sure to use the -B option or the installboot(8) tool to make the drive bootable.

Make sure the miniroot filesystem is available on your client's nfs mount.

Next, you should dump the miniroot to your swap partition: dd if=/path/to/miniroot-fs of=/dev/sd0b bs=4k Where sd0b is the device for your drive's swap partition.

Now you boot from that hard drive, specifying in the bootloader to boot from the miniroot partition.

Good luck.

Any install tools, but no local console

This one's a little daunting, but still possible. You need to follow the rest of the directions for installing NetBSD for a diskless client. The page on your the NFS filesystem will have a link to a page describing what you need to do to get your client to boot into multi-user mode. You can skip the last diskless step (Finishing up your installation), as this won't be a permanent diskless setup.

Once your system is set up and boots into multi-user mode, you can install NetBSD onto your local hard drive using the standard install scripts (you can't use the ramdisk kernel, as you need to boot a full NetBSD system with inetd and telnet running).


Back | Table of Contents
NetBSD Home Page
NetBSD Documentation top level

(Contact us) $NetBSD: local.install.html,v 1.4 2010/05/03 02:52:44 david Exp $
Copyright © 1998-2004 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.