From owner-freebsd-questions@freebsd.org Wed Mar 15 09:14:08 2017 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 13306D0D07A for ; Wed, 15 Mar 2017 09:14:08 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay13.qsc.de (mailrelay13.qsc.de [212.99.187.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BD1E1782 for ; Wed, 15 Mar 2017 09:14:06 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay13.qsc.de; Wed, 15 Mar 2017 10:13:29 +0100 Received: from r56.edvax.de (port-92-195-127-117.dynamic.qsc.de [92.195.127.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id D15723CBF9; Wed, 15 Mar 2017 10:13:25 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v2F9DO3o002241; Wed, 15 Mar 2017 10:13:24 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Wed, 15 Mar 2017 10:13:24 +0100 From: Polytropon To: Israel Gelpi Cc: "freebsd-questions@freebsd.org" Subject: Re: LABEL (The FreeBSD Disklabel Editor) Message-Id: <20170315101324.484d5780.freebsd@edvax.de> In-Reply-To: References: 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-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay13.qsc.de with 7CC1F69FDAD X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:1.293 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2017 09:14:08 -0000 On Tue, 14 Mar 2017 21:09:17 +0000, Israel Gelpi wrote: > Hello Sir, I had a SUN enterprise which I tested using a > HDD diagnostics software called SCSI Tool-Box Suite. After > testing I wiped the drive and mistakenly erased the Disk > Label making the drive unusable (the operating system would > not "mount'). Could you advise me on the how, I could > restore/repair the Disk Label and to proper wipe a SUN > without erasing the disk label. If you intend to mount the disk again on Solaris (default Sun operating system), you'd need to do two things: 1. create a label on the disk (disklabel or bsdlabel) 2. initialize the file UFS system (newfs) Without those two (!) things, you won't be able to mount it. (NB: The following explanations are FreeBSD-specific.) The FreeBSD installer does all those things, but you can do it manually, too: Boot FreeBSD from CD or USB in live mode (shell access), then issue the required commands for the disk, for example if /dev/da0 is the disk in question (without testing, just from my memory): # bsdlabel -w /dev/da0 # bsdlabel -e /dev/da0 in the editor, change type for partition "a": "unused" -> "4.2BSD", then save & exit # newfs /dev/da0 If you need additional boot code on that disk (only required if it should be a boot disk), write the boot code as well. The same applies for newfs options you might want to add. Now the disk /dev/da0 can be mounted. It contains a disklabel with one BSD partition covering the whole disk, often called "dedicated" because there i You can find detailed information in "man bsdlabel" and "man newfs". Additional online documentation can be found here: https://www.freebsd.org/doc/handbook/disks-adding.html https://www.freebsd.org/doc/faq/disks.html http://www.wonkity.com/~wblock/docs/html/disksetup.html#_the_old_standard_mbr Note that FreeBSD encourages the use of gpart, a tool that can be used both for MBR operations (fdisk + bsdlabel) and GPT operations, but there's nothing wrong in using the "classic tools" for "legacy work". ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...