Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Mar 2017 10:13:24 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Israel Gelpi <igelpi@trioscs.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: LABEL (The FreeBSD Disklabel Editor)
Message-ID:  <20170315101324.484d5780.freebsd@edvax.de>
In-Reply-To: <BN6PR02MB272290CACFAD3F604CB0924EC8240@BN6PR02MB2722.namprd02.prod.outlook.com>
References:  <BN6PR02MB272290CACFAD3F604CB0924EC8240@BN6PR02MB2722.namprd02.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170315101324.484d5780.freebsd>