From owner-freebsd-questions@FreeBSD.ORG Tue Nov 2 13:50:33 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B51F106566C for ; Tue, 2 Nov 2010 13:50:33 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id D54A38FC19 for ; Tue, 2 Nov 2010 13:50:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id oA2DoTtJ034395; Wed, 3 Nov 2010 00:50:30 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Wed, 3 Nov 2010 00:50:29 +1100 (EST) From: Ian Smith To: Matthias Apitz In-Reply-To: <20101102120030.B01F210656EF@hub.freebsd.org> Message-ID: <20101102233129.R33417@sola.nimnet.asn.au> References: <20101102120030.B01F210656EF@hub.freebsd.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1834733438-1288705829=:33417" Cc: perryh@pluto.rain.com, freebsd-questions@freebsd.org Subject: Re: sysinstall(8) && bsdlabel a new disk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2010 13:50:33 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1834733438-1288705829=:33417 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT In freebsd-questions Digest, Vol 335, Issue 3, Message: 2 On Tue, 2 Nov 2010 07:04:08 +0100 Matthias Apitz wrote: > El día Monday, November 01, 2010 a las 10:03:58PM -0700, perryh@pluto.rain.com escribió: > > > Devin Teske wrote: > > > > > sysinstall probes hardware when it starts. Therefore, after making > > > changes (specifically after writing) to the disk in the FDISK > > > partition editor, you need to Ctrl-C and Abort-out and relaunch > > > sysinstall so that it probes the new disk devices (ad4s1, ad4s2, > > > etc.) before you can start adding BSD disklabels (ad4s1a, ad4s1b, > > > etc.) to the slice (aka partition). > > > > > > This has been an age-old problem (hmmm, perhaps get could some mad > > > karma for fixing it). > > > > At least in 8.1, there is a sysinstall operation somewhere to > > re-probe devices, presumably to cover exactly this sort of > > situation. Does it not work? Options menu: Rescan Devices works to pick up devices like a USB disk or memstick that you may even have booted off but sysinstall then fails to find, as it does with some older kit and/or slow devices (here memsticks on USB1 ports). > My situation was in 9-CURRENT. When running sysinstall(8) as init from a CD/DVD/memstick boot, you can do mostly what you like to the disk/s in terms of slicing - fdisk and like boot0cfg under the hood - and partitioning of slices - bsdlabel under the hood, or rather sysinstall's version of those utilities; it still uses libdisk(3) rather than libgeom(3), at 8-STABLE anyway. When running sysinstall from a booted system (where you could exit after any committed steps and restart it, as mentioned above) you need to have previously set sysctl kern.geom.debugflags=16 (the 'foot-shooting' bit) if you want to be able to write to sector 0 (the boot sector including MBR) or to any non-boot slice - even unmounted - on the boot disk. Sysinstall doesn't let you know when you've failed to modify the disk, sadly, hence mysterious problems such as the above. It's fairly obvious when it fails to newfs some partitions you think you've nicely set up :) Same goes for sade(8). Neither manpage mentions kern.geom.debugflags, but boot0cfg(8) does, and points to the fuller description in geom(4). I haven't checked up on new work on sysinstall on -CURRENT for a while, but suspect that you'll still have to set that flag to write to any disk that's in use. Don't forget to set it back to 0 later! cheers, Ian --0-1834733438-1288705829=:33417--