From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 2 06:04:32 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04D3716A46C for ; Mon, 2 Jul 2007 06:04:32 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.freebsd.org (Postfix) with ESMTP id AB37A13C4B7 for ; Mon, 2 Jul 2007 06:04:31 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1I5F1S-000Mee-2s; Mon, 02 Jul 2007 09:04:30 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Martin Cracauer In-reply-to: Your message of Sun, 1 Jul 2007 14:13:34 -0400 . Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 02 Jul 2007 09:04:30 +0300 From: Danny Braniss Message-ID: Cc: freebsd-hackers@freebsd.org Subject: Re: pxeboot and /boot filesystem, share /boot/kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2007 06:04:32 -0000 > I want to tighten up my spaces for diskless machines and I came across > this puzzle with pxeboot: > > I can share /usr and most other filesystems, but my individual roots > for the machine each have to have the full kernel. But /boot/kernel > is rather large these days and totally identical, so I'd rather share > it. > > %% > > You can only specify a root filesystem location via the dhcp options. > Then, whatever kernel is there in location:/boot/kernel (or rather, > loader.rc) will be booted, which will then pick up the / filesystem > via location:/etc/fstab. > > This is not quite what I want, because I want /boot/kernel to be > shared, purely for filesize reasons. But I can't specify a separate > /boot filesystem. I can't find an easy way to share /boot but not > share /. > > Or in other words, the core of the problem is that I want to share > /boot/kernel but not share /etc/fstab. > > %% > > So, while writing this mail it occured to me that what I can do is put > a /boot/loader.rc on the individual / filesystems that then redirects > to a common kernel location. But I don't see how I can make this work > as I do not have the option to point to a new NFS mount in > /boot/loader.conf, or do I? > > So what I would want is (on the server): > /diskless-usr/ > /diskless-kernel/ [has /boot/kernel/ in it] > /diskless/root1/ [has /boot/loader.conf in it] > /diskless/root2/ > > DHCP "root-path" is then addr:/diskless/root1 > > Where > /diskless/root1/boot/loader.conf > specifies > addr:/diskless-kernel/boot/kernel/kernel > instead of just a filename. > > Now, the question is how do I make loader.4th able to mount NFS or use > tftp? > > %% > > I think I have three paths to go here: > > 1) make pxeboot understand a separate "boot-path" dhcp option. > > 2) make loader.4th able to use NFS or tftp. IP is already up by the > time it is started. > > 3) only share /boot/kernel/kernel and share a NFS mount for the > modules, but that's very messy. > look in rc.initdiskless, you'll see there the solution. if you mount unionfs /etc, you can have a /(root) mounted read-only. unless there is something I don't see, there is no real reason to separate / from /usr. danny