From owner-freebsd-current@FreeBSD.ORG Sat Jul 14 22:00:20 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 444A9106564A for ; Sat, 14 Jul 2012 22:00:20 +0000 (UTC) (envelope-from yerenkow@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id F23B38FC14 for ; Sat, 14 Jul 2012 22:00:19 +0000 (UTC) Received: by obbun3 with SMTP id un3so8682550obb.13 for ; Sat, 14 Jul 2012 15:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=X2DAdbzmV9cACqT/4bgxKPtCIMpyS98Sv0SrTTdpFLQ=; b=rkO/2pxWzAe1v1X1KRELqXOM9seqDrNFiJGS2B8uI697qnZCtYw9wIXXo2/k03hO/p zF+9iWq/90obfeKcUwQhheX7F+zIv8Vu2AUIrEF54fPCGcIpZVHdkFJlgRIyPIhOYbNG lQMJdQUkyrvmJN6AdQHQP83OJ5a/85Mhc/qH9199Lt52IcKnx8FDwGxpEStpvg7UFY2V F7q3XDbg5FHAKlJs6sn7daJt3VRU0sTVtW6eqQewnvBDbDHnNktm8nZKAPAY2UMNUAN3 CZ6D1+bs4HBTtubzd0KkW0faayUay5c/lRPki5IhSLgDzsONfiqPAh9hY1L8B7DqejtM MU1Q== MIME-Version: 1.0 Received: by 10.182.49.7 with SMTP id q7mr8212669obn.68.1342303219372; Sat, 14 Jul 2012 15:00:19 -0700 (PDT) Received: by 10.182.32.234 with HTTP; Sat, 14 Jul 2012 15:00:19 -0700 (PDT) Date: Sun, 15 Jul 2012 01:00:19 +0300 Message-ID: From: Alexander Yerenkow To: freebsd-current Content-Type: text/plain; charset=ISO-8859-1 Subject: Fstab file path X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 22:00:20 -0000 Hello all. I'm trying to get single-world in read-only and multi-userland media and I get difficulties with path "/etc/fstab" been hardcoded and there is no way for override it. I'm talking about getrootmount in sys/boot/common/boot.c:315 Could we elaborate a bit this moment? What I'm trying to do is to get one single partition, with installed world+kernel; let's call it rootPT and also I have few partitions for mount to /usr/local and to /var, like localA, varA, localB, varB, etc. Main difficulty is that "fstab" path is hardcoded, and it searched in subdir of root partition, and I can't specify it in any way in stock FreeBSD. How about have one more env with path to fstab (like vfs.root.mountfrom, but with vfs.fstab.filepath, which checks, and if it's null falling back to default hard-coded one)? Note, that this will not change some default standards or behaviors, it will just add some flexibility. Currently, to make media as I need, I would need several absolutely same filesystems on different partitions, just to separate fstabs (As a result - duplication of world/kernel, or I end up with complex root system with many links). With ability to set path to fstab, I would need only edit loader.conf and restart system into new setup. Also, I noticed that fstab.c is implemented way for specifying different fstab (maybe just for editing?...). But there's also relatively lot of other scripts which used hardcoded fstab path too. Now I'm thinking that I'll end up with writing handy script which will override /etc/fstab just before reboot :) I just thought that lack of flexibility in this point could be interesting for someone. -- Regards, Alexander Yerenkow