From owner-freebsd-stable@FreeBSD.ORG Sat Feb 25 17:55:48 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F180C106564A for ; Sat, 25 Feb 2012 17:55:47 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 7E49E8FC15 for ; Sat, 25 Feb 2012 17:55:47 +0000 (UTC) Received: by wgbdq11 with SMTP id dq11so2881108wgb.31 for ; Sat, 25 Feb 2012 09:55:46 -0800 (PST) Received-SPF: pass (google.com: domain of kob6558@gmail.com designates 10.216.137.219 as permitted sender) client-ip=10.216.137.219; Authentication-Results: mr.google.com; spf=pass (google.com: domain of kob6558@gmail.com designates 10.216.137.219 as permitted sender) smtp.mail=kob6558@gmail.com; dkim=pass header.i=kob6558@gmail.com Received: from mr.google.com ([10.216.137.219]) by 10.216.137.219 with SMTP id y69mr3635116wei.51.1330192546538 (num_hops = 1); Sat, 25 Feb 2012 09:55:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=5eTZMr//H/Znk8WeNJuqOD2xTmtSzTQGFqlsgKiXnrg=; b=koWIAPj+94dKbs+16yYQUGMF5mT7SBeFk6nGaJ+YoxLozvez42RvbxjqqQmOr6UgIg M6cA0S4AVHSLR5KKbRkTHWNGAzrroo6RVMsujn8lpcPJ8cyFY0DyTbeVd3P5aPD3rxAq T1bhupEM5402CjClhfdZ7DCr/1aeOyDOvrbFk= MIME-Version: 1.0 Received: by 10.216.137.219 with SMTP id y69mr2897821wei.51.1330192546375; Sat, 25 Feb 2012 09:55:46 -0800 (PST) Received: by 10.223.16.82 with HTTP; Sat, 25 Feb 2012 09:55:46 -0800 (PST) In-Reply-To: <201202251717.q1PHHeXD024464@mp.cs.niu.edu> References: <201202251717.q1PHHeXD024464@mp.cs.niu.edu> Date: Sat, 25 Feb 2012 09:55:46 -0800 Message-ID: From: Kevin Oberman To: Scott Bennett Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Erich Dollansky , freebsd-stable@freebsd.org Subject: Re: random problem with 8.3 from yesterday X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 17:55:48 -0000 On Sat, Feb 25, 2012 at 9:17 AM, Scott Bennett wrote: > =A0 =A0 On Sat, 25 Feb 2012 08:56:24 -0800 Kevin Oberman > wrote: >>On Sat, Feb 25, 2012 at 2:27 AM, Scott Bennett wrote= : >>> =3DA0 =3DA0 On Wed, 22 Feb 2012 13:34:36 +0700 Erich Dollansky >>> wrote: >>> >>>>I got a new thumb drive which was FAT formatted. I use this script to c= ha=3D >>nge this: >>>> >>>>!/bin/tcsh >>>># >>>># This script format a thumb drive connected to USB as da0. >>>># >>>>printf "You have to run this script as 'root' to succeed.\n" >>>>printf "Warning this script will delete all your data from /dev/da0. Co= nt=3D >>inue? > " >>>>set Eingabe =3D3D $< >>>>if ("$Eingabe" =3D3D=3D3D "y") then >>>> =3DA0 printf "\nDeleting the device " >>>> =3DA0 dd if=3D3D/dev/zero of=3D3D/dev/da0 bs=3D3D1k count=3D3D1 >>>> =3DA0 printf "\nWriting the BSD label " >>>> =3DA0 bsdlabel -Bw da0 auto >>> >>> =3DA0 =3DA0 Hmmm...so no MBR and no GPT either? =3DA0Just the bare devi= ce? =3DA0I=3D >> guess >>> I haven't tried that, so I don't know what that would do. >> >>Call me a bit confused, but I thought -B did write an MBR. It always >>has seemed to do so for me, at any rate. From man bsdlabel: >>"Installing Bootstraps >> =A0 =A0 If the -B option is specified, bootstrap code will be read from = the fi=3D >>le >> =A0 =A0 /boot/boot and written to the disk." >>Or am I not understanding something? > > =A0 =A0 I guess I understand the part that you quoted above as meaning th= at > the bootstrap code would be copied to the bootstrap sectors. =A0However, = as > I interpret it, the bsdlabel command does not write a MBR, which would > include the slice map for the device. =A0Further, Erich's later commands = did > not specify a slice number. =A0In short, it looks to me as though he may = have > ended up with the initial boot code where it belonged at the start of the > device, but the boot code looks for the slice map, which isn't there, so > it should not be possible to boot a kernel because the bootstrap code > would not be able to find it. =A0But as far as simply mounting a file sys= tem, > I really don't know whether it should work to have a BSD label written to > a bare device with neither a MBR nor a GPT to find that label. =A0IOW, wo= uld > the device node to be used in the mount operation have been created? > =A0 =A0 Note to Erich: =A0did you look in /dev and /dev/ufs to see whethe= r all > of the device files that you expected to be there were, in fact, present > before you attempted the mount? I thought he was creating a "monolithic" device...what was called "dangerously dedicated". No slices at all. Not only are DD volumes mountable, they are bootable. It's been years since I created a DD disk as the slight space savings are irrelevant on modern hundreds of gigabyte disks, so I may have forgotten how it works. It might still make sense on a small thumb drive, bootable or not. --=20 R. Kevin Oberman, Network Engineer E-mail: kob6558@gmail.com