From owner-freebsd-geom@FreeBSD.ORG Mon Jan 21 14:08:32 2013 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1E7FB2A6; Mon, 21 Jan 2013 14:08:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 31521267; Mon, 21 Jan 2013 14:08:29 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA15958; Mon, 21 Jan 2013 16:08:28 +0200 (EET) (envelope-from avg@FreeBSD.org) Message-ID: <50FD4BDC.4010300@FreeBSD.org> Date: Mon, 21 Jan 2013 16:08:28 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130113 Thunderbird/17.0.2 MIME-Version: 1.0 To: lev@FreeBSD.org Subject: Re: Is it possible to run gpart and newfs on file without root access (without mdconfig)? References: <1839155364.20130119150146@serebryakov.spb.ru> <50FBAB86.20602@delphij.net> <1455320447.20130121104850@serebryakov.spb.ru> In-Reply-To: <1455320447.20130121104850@serebryakov.spb.ru> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 8bit Cc: d@delphij.net, Xin Li , freebsd-geom@FreeBSD.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jan 2013 14:08:32 -0000 on 21/01/2013 08:48 Lev Serebryakov said the following: > Hello, Xin. > You wrote 20 января 2013 г., 12:32:06: > > XL> makefs? > It is second step. Here are several problems: > > (1) makefs doesn't create any partition tables / labels. > (2) makefs could not "inject" its image into file with partition > tables / labels. > > makefs is good to create FS and make permission fixups (by mtree > file,generated with root-less install) in one step, but it doesn't > solve whole problem of full disk image creation, as far as I > understand. > I once used the following trick to create a simple partition table (dangerously dedicated?) inside a makefs built image: makefs -b '10%' -o label="${LABEL}",version=1 base.ufs R/ bsdlabel -w -B -b R/boot/boot -f base.ufs _label_file=$(mktemp labelXXXXXX) bsdlabel -f base.ufs | sed -e '/ a:/s/unused/4.2BSD/' -e '/ a:/s/ 16 / 0 /' > ${_label_file} bsdlabel -R -f base.ufs ${_label_file} rm -f ${_label_file} I would be more happy to have gpart-in-userland :-) -- Andriy Gapon