From owner-freebsd-questions Fri Jun 9 7:30:57 2000 Delivered-To: freebsd-questions@freebsd.org Received: from gatekeeper.veriohosting.com (gatekeeper.veriohosting.com [192.41.0.2]) by hub.freebsd.org (Postfix) with ESMTP id 3AF3B37B52F for ; Fri, 9 Jun 2000 07:30:54 -0700 (PDT) (envelope-from fred@veriohosting.com) Received: by gatekeeper.veriohosting.com; Fri, 9 Jun 2000 08:30:52 -0600 (MDT) Received: from unknown(192.168.1.7) by gatekeeper.veriohosting.com via smap (V3.1.1) id xma024223; Fri, 9 Jun 00 08:30:29 -0600 Received: from vespa.orem.iserver.com (vespa.orem.iserver.com [192.168.1.144]) by orca.orem.veriohosting.com [Verio Web Hosting, Inc. 801.437.0200] (8.8.8) id IAA48821; Fri, 9 Jun 2000 08:30:29 -0600 (MDT) Date: Fri, 9 Jun 2000 08:35:48 -0600 (MDT) From: Fred Clift X-Sender: fred@vespa.orem.iserver.com To: Chris Webb Cc: questions@FreeBSD.ORG Subject: Re: PXE Booting? In-Reply-To: <20000609131551.A39557@miranda.arachsys.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 9 Jun 2000, Chris Webb wrote: > I have a diskless box I'm trying to boot by PXE. I've configured a > dhcpd, and I've got the loader loading by tftp and then the kernel > booting by NFS fine. I'm having a little trouble persuading the kernel > to mount the root filesystem, though. My dhcpd.conf says: ... > What am I doing wrong here? Can I set some parameter in the loader that > tells the kernel which server and filesystem to mount, so it doesn't Unfortunately, I dont know the answer to your question, but I have an alternate work-around for you. Use an MFS file system in your kernel. You can build a 'minimal' root filesystem image (cut and paste from a script I made, with some lite editing to clarify) vnconfig /dev/vn0c rootfs mount /dev/vn0c /mnt rm -rf /mnt/* (cd rootsrc; tar -cf - .) | (cd /mnt; tar -xf -) umount /mnt fsck -y /dev/vn0c vnconfig -u /dev/vn0c Where 'rootfs' is a 16 meg ufs file system image, and rootsrc is a directory hierarchy that is a stripped down root file system. Once I have this 'minimal' file-system, I do this write_mfs_in_kernel -f kernel rootfs where kernel is a fairly stripped down kernel, but compiled with 16 Meg MFS_ROOT hole in it. for kernels <=3.4 you want something like options MFS #Memory Filesystem options MFS_ROOT #MFS usable as root device, options MFS_ROOT_SIZE=10 #size in kB and for 4.0+ you want something like options MD_ROOT #MD is a potential root device options MD_ROOT_SIZE=15360 # 15*1024 K -- ie 15 meg in your kernel config. Then, when you boot it over the network, it will make a ram disk and mount the file-system image as your root drive. Then you can mount /usr from somewhere else in your rc scripts, or just not use a /usr if you want a stripped down os. We do this to do seim-unattended installs. A small kernel/rootfs boots (not using PXE, but it _should_... sigh) over the network, mounts up it's rootfs, runs a small program that figures out all the hardware, configs the disks (labels, vinum, etc) and then unpacks an NFS mounted root and usr image onto the right partitions and reboots. If you have specific questions about this and you still can't get your PXE booting to work right, drop me a line. -- Fred Clift - fred@veriohosting.com -- Remember: If brute force doesn't work, you're just not using enough. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message