From owner-freebsd-questions@freebsd.org Sun Sep 27 14:43:40 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 E6757A0A12E for ; Sun, 27 Sep 2015 14:43:39 +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 7E85AEE0 for ; Sun, 27 Sep 2015 14:43:39 +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 633FE3CC00; Sun, 27 Sep 2015 16:43:36 +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 t8REhZx7002306; Sun, 27 Sep 2015 16:43:35 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 27 Sep 2015 16:43:34 +0200 From: Polytropon To: "William A. Mahaffey III" Cc: FreeBSD Questions !!!! Subject: Re: dd question Message-Id: <20150927164334.ccd67f04.freebsd@edvax.de> In-Reply-To: <5607FA6E.5040600@hiwaay.net> 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: Sun, 27 Sep 2015 14:43:40 -0000 On Sun, 27 Sep 2015 09:22:48 -0453.75, William A. Mahaffey III wrote: > On 09/27/15 09:12, Polytropon wrote: > > On Sun, 27 Sep 2015 09:05:52 -0453.75, William A. Mahaffey III wrote: > >> On 09/27/15 09:00, Polytropon wrote: > >>> Maybe the installation media, even though on writable media, is > >>> mounted ro? The easiest thing to capture logs is to perform the > >>> installation from a "fully writable" live file system, or simply > >>> mount a network resource r/w. > >> > >> How can I figure that out (mounted ro) ? I have ISO's & img's available > >> on my LAN, can I install from them directly ? If so, how :-) (URL's > >> welcome) ? > > Depends on how the boot process is being performed. A look > > in /etc/fstab or maybe (customized?) rc.diskless could tell > > you more. Basically, it's simple to boot the media, get to > > a command line, and look at the "mount -v" output. > > > > Another option woule be to use disklabel and and add a new > > partition, for example letter 'd', which ends at the end > > of the media (where 'c' usually ends). Note that no partition > > can be bigger than 'c' ("the whole thing"). > > > If I use disklabel to add a 'd' slice, will that mess up what is already > there ? It shouldn't. It will add a new partition entry (da0d, for example) that can be initialized with newfs, so you can then mount it r/w with UFS. > What is the syntax for that, I don't see it in the > disklabel/bsdlabel man page ? Take the disklabel editor screen as an example. Make sure 'c' is as big as the whole device, then take the end of the last partition, 'a', as an offset, and add the desired size for 'd'. It will then look comparable to this: % disklabel ad4s1 # /dev/ad4s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 2097152 0 4.2BSD 0 0 0 b: 4194304 2097152 swap c: 625142385 0 unused 0 0 # "raw" part, don't edit d: 2097152 6291456 4.2BSD 0 0 0 e: 2097152 8388608 4.2BSD 0 0 0 f: 104857600 10485760 4.2BSD 0 0 0 g: 10485760 115343360 4.2BSD 0 0 0 h: 499313265 125829120 4.2BSD 0 0 0 The size of 'c' is the size of the slice (in this case), and you can see that "offset" accumulates from the "size" column of the previous entries. It's okay to have only 'a', 'c' and 'd' entries, as long as the math magic adds up properly. :-) > 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. Invoke the disklabel editor: # bsdlabel -e and make the changes in $EDITOR (yes, it actually uses the editor program $EDITOR points to). See mdconfig idea following. I'm not sure if bsdlabel can operate on image files directly. > If I do that, can I then copy the > img-file contents in some way ? It's probably possible to use mdconfig to turn the image file into a device file and then modify that device file (add partitions), resulting in a change of the image file. # mdconfig -a -t vnode -u 0 -f image.dd (now /dev/md0, /dev/md0a, /dev/md0c should appear) # bsdlabel -e /dev/md0 (make changes, save & exit) (and /dev/md0d should appear) # mdconfig -d -u 0 Actually, I've never tried that, so it's more of a thought experiment than an educated and tested advice. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...