From owner-freebsd-stable@FreeBSD.ORG Sun Feb 26 04:04:33 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 EE33C106566B for ; Sun, 26 Feb 2012 04:04:32 +0000 (UTC) (envelope-from erichfreebsdlist@ovitrap.com) Received: from alogreentechnologies.com (alogreentechnologies.com [67.212.226.44]) by mx1.freebsd.org (Postfix) with ESMTP id C73198FC1A for ; Sun, 26 Feb 2012 04:04:32 +0000 (UTC) Received: from amd620.ovitrap.com ([49.128.188.2]) (authenticated bits=0) by alogreentechnologies.com (8.13.1/8.13.1) with ESMTP id q1Q44CvL028870; Sat, 25 Feb 2012 21:04:19 -0700 From: Erich Dollansky To: freebsd-stable@freebsd.org Date: Sun, 26 Feb 2012 11:04:10 +0700 User-Agent: KMail/1.13.7 (FreeBSD/8.3-PRERELEASE; KDE/4.7.4; amd64; ; ) References: <201202251717.q1PHHeXD024464@mp.cs.niu.edu> In-Reply-To: <201202251717.q1PHHeXD024464@mp.cs.niu.edu> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201202261104.11000.erichfreebsdlist@ovitrap.com> Cc: Scott Bennett 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: Sun, 26 Feb 2012 04:04:33 -0000 Hi, On Sunday 26 February 2012 00:17:40 Scott Bennett wrote: > On Sat, 25 Feb 2012 08:56:24 -0800 Kevin Oberman > wrote: > >On Sat, Feb 25, 2012 at 2:27 AM, Scott Bennett wrote: > >> =A0 =A0 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 cha= > >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. Cont= > >inue? > " > >>>set Eingabe =3D $< > >>>if ("$Eingabe" =3D=3D "y") then > >>> =A0 printf "\nDeleting the device " > >>> =A0 dd if=3D/dev/zero of=3D/dev/da0 bs=3D1k count=3D1 > >>> =A0 printf "\nWriting the BSD label " > >>> =A0 bsdlabel -Bw da0 auto > >> > >> =A0 =A0 Hmmm...so no MBR and no GPT either? =A0Just the bare device? =A0I= > > 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 > > If the -B option is specified, bootstrap code will be read from the fi= > >le > > /boot/boot and written to the disk." > >Or am I not understanding something? > it looks like that I have left the -B option by mistake for many years in there. > I guess I understand the part that you quoted above as meaning that > the bootstrap code would be copied to the bootstrap sectors. However, as > I interpret it, the bsdlabel command does not write a MBR, which would > include the slice map for the device. Further, Erich's later commands did > not specify a slice number. In 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 There is also no kernel, no binary, nothing what could be started on the device. > would not be able to find it. But as far as simply mounting a file system, > 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. IOW, would > the device node to be used in the mount operation have been created? > Note to Erich: did you look in /dev and /dev/ufs to see whether all > of the device files that you expected to be there were, in fact, present > before you attempted the mount? It was there. I extra checked. As I said before, since I got the file system onto the device, the device can be used as expected. Erich