From owner-freebsd-questions@FreeBSD.ORG Mon Nov 1 16:04:19 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 239F4106564A for ; Mon, 1 Nov 2010 16:04:19 +0000 (UTC) (envelope-from dteske@vicor.com) Received: from postoffice.vicor.com (postoffice.vicor.com [69.26.56.53]) by mx1.freebsd.org (Postfix) with ESMTP id 0DD1F8FC18 for ; Mon, 1 Nov 2010 16:04:18 +0000 (UTC) Received: from [208.206.78.30] (port=36695 helo=dt.vicor.com) by postoffice.vicor.com with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.71) (envelope-from ) id 1PCwro-00074a-46; Mon, 01 Nov 2010 09:04:18 -0700 From: Devin Teske To: Matthias Apitz In-Reply-To: <20101031200258.GA1302@tiny.Sisis.de> References: <20101031200258.GA1302@tiny.Sisis.de> Content-Type: text/plain Organization: Vicor, Inc Date: Mon, 01 Nov 2010 09:04:15 -0700 Message-Id: <1288627455.6744.24.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-41.el4) Content-Transfer-Encoding: 7bit X-Scan-Signature: addf82e302fb7b54175bfd27340b229c X-Scan-Host: postoffice.vicor.com Cc: 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: Mon, 01 Nov 2010 16:04:19 -0000 On Sun, 2010-10-31 at 21:02 +0100, Matthias Apitz wrote: > Hello, > > I installed a 9-CURRENT from an USB key to a hard disk of a laptop and > encountered a strange problem: I booted the USB key to normal > multiuser mode and wanted to wipe out the Windows on the disk, create > one slice ad4s1 and partitions in it for /, /usr, /var, ... > > I thought the simplest way would be just run sysinstall(8) and use the > FDISK and BSDLABEL from the post-install dialog. FDISK went fine and in > the BSDLABEL dialog I just used 'A' (auto defaults). On 'W' (write to > disk) the sysinstall(8) complained about 'unable to open /dev/ad4s1a 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). I imagine that sade has this problem too. Though, what annoys me about sade is that the Ctrl-C menu doesn't work -- the "Restart" option does nothing and though "Continue" works, I'm seething over the lack of an "Abort" option (hmmm, perhaps should file a PR on that one). > and > so on for all the created partitions a...f. And also in the dev fs > there were no entries created for /dev/ad4s1[a-f]. They apeared after a > reboot of the system from the USB key. Reboot should not be required. Just exit sysinstall(8) and go back into it. I've made it a habit to (when using sysinstall(8) as a userland utility to format disks): 1. Launch sysinstall(8) (as root) 2. Main Menu 3. Custom 4. Partition 5. (if more than one disk is present in the system you'll be prompted to select the disk... use spacebar to select disk, then TAB over to OK and hit ENTER) 6. partition the disk in whatever manner required 7. Press `W' to write out the changes 8. (select which boot manager or None) 9. Press Ctrl-C after partition table is successfully written 10. Select `Abort' and hit ENTER then 1. Relaunch sysinstall(8) (as root) 2. Main Menu 3. Custom 4. Partition 5. (if more than one disk is present in the system, use spacebar to select disk, then TAB over to OK and hit ENTER) NOTE: This is required to select which disk to operate on within the disklabel editor 6. Press `Q' to quit-out of the FDISK partition editor (this time, we don't want to make any changes, we just needed to indicate that this is the disk that we're going to operate on within the disklabel editor) 7. (select which boot manager or None) NOTE: This time around, since we're not going to write the partition table again, it really doesn't matter what you select here NOTE: you're now back at the custom menu from step 3/4. 8. Label 9. Now use the FreeBSD Disklabel Editor to allocate FreeBSD partitions from the BIOS partition ad0s1 (or whatever your partition was named) 10. When finished, press `W' to write out changes, perform newfs actions, and mount the devices as necessary > > How this is supposed to work using sysinstall(8) > or should one use only bsdlabel(8) directly in such a case? > I'll be the first to admit that sysinstall(8) could be a little easier to use in the userland. It should be noted that sade(8) (System Administrator's Disk Editor) is no different -- sade, at this point at least, is nothing more than the `Partition' and `Label' menus ripped straight from sysinstall(8)'s `Custom' menu (with some minor other differences, like the fact that the Ctrl-C menu doesn't work whereas it does in sysinstall(8) -- really ought to file a PR on that one). > Thanks > > matthias -- Cheers, Devin Teske -> CONTACT INFORMATION <- Business Solutions Consultant II FIS - fisglobal.com 510-735-5650 Mobile 510-621-2038 Office 510-621-2020 Office Fax 909-477-4578 Home/Fax devin.teske@fisglobal.com -> LEGAL DISCLAIMER <- This message contains confidential and proprietary information of the sender, and is intended only for the person(s) to whom it is addressed. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you have received this message in error, please notify the e-mail sender immediately, and delete the original message without making a copy. -> END TRANSMISSION <-