From owner-freebsd-questions@freebsd.org Mon Sep 28 09:08:57 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3A88A0B193 for ; Mon, 28 Sep 2015 09:08:56 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AF131F36 for ; Mon, 28 Sep 2015 09:08:56 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-125-111.dynamic.qsc.de [92.195.125.111]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 07D4A3CD54; Mon, 28 Sep 2015 11:08:52 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t8S98p7v002382; Mon, 28 Sep 2015 11:08:51 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 28 Sep 2015 11:08:51 +0200 From: Polytropon To: Warren Block Cc: "William A. Mahaffey III" , FreeBSD Questions !!!! Subject: Re: dd question Message-Id: <20150928110851.593abd75.freebsd@edvax.de> In-Reply-To: References: <5606A4FF.4090105@hiwaay.net> <56073915.6030707@hiwaay.net> <20150927131036.c6b2d9ce.freebsd@edvax.de> <5607E84D.1050803@hiwaay.net> <20150927155354.7dab526a.freebsd@edvax.de> <5607F676.10307@hiwaay.net> <20150927160604.f1e1c21d.freebsd@edvax.de> <5607FA6E.5040600@hiwaay.net> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2015 09:08:57 -0000 On Sun, 27 Sep 2015 19:00:47 -0600 (MDT), Warren Block wrote: > On Sun, 27 Sep 2015, William A. Mahaffey III wrote: > > > If I use disklabel to add a 'd' slice, will that mess up what is already > > there ? What is the syntax for that, I don't see it in the disklabel/bsdlabel > > man page ? The man page for disklabel/bsdlabel shows a way to initialize a > > whole disk using 'fdisk -BI ' & implies that this will create a 'da0s1' > > slice in the process. However it will also wipe out what is already there. If > > I do that, can I then copy the img-file contents in some way ? Thanks & TIA > > :-) .... > > Please stop using fdisk and bsdlabel. gpart(8) does everything they do > and is easier to use. But it works so nicely, especially for all the many non-standard settings! :-) Sure, gpart (and in a related context, GPT) is the way to go for 99% of use cases. Somehow I still like the ability to ditch partitioning at all and just newfs a device, or make a "one big bootable partition" with two bsdlabel commands. This knowledge will soon go down the drain, together with other "old craft" of UNIX skills many decades old. :-) > Messing with a bsdlabel installer image is probably a waste of time, but > yes, you can add a partition (a bsdlabel partition). Or you can > probably use growfs to expand the filesystem to the size of the drive. It's probably much easier to create a custom bootable image (even as a live file system) which is able to run bsdinstall and maybe even has pkg and some desired packages available. For example, have created my own USB images for different purposes, and it's actually not that hard. Still the OS does not provide an easy means to do this (like a "make " command), but there are several ports to help with this task. > If you already have images on the network, consider mounting them with > NFS instead. This is only an option for networked machines. However, as soon as you're going to install packages via pkg, Internet connection (and therefore network) is mandatory, either for accessing images or to write to a "scratch space" for program outputs you want to review later. Still the idea of being able to write to the installation image (maybe to a _different_ partition on it) is good: In case no network can be reached, you can still store stuff on it - I can imagine many purposes. :-) As the installation image is best dealt with bsdlabel, resizing 'c' and adding a 'd' partition should be possible, with the commands run through a mdconfig'ured virtual node connected to the image file. As I said, I haven't tried this, but it's probably possible. In worst case, it's a "try & fail" issue. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...