Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Feb 2012 09:55:46 -0800
From:      Kevin Oberman <kob6558@gmail.com>
To:        Scott Bennett <bennett@cs.niu.edu>
Cc:        Erich Dollansky <erich@alogreentechnologies.com>, freebsd-stable@freebsd.org
Subject:   Re: random problem with 8.3 from yesterday
Message-ID:  <CAN6yY1u-nctGz0pq7fkw9qQiF2myh_aVT3GkKDCESEDSNsB4XQ@mail.gmail.com>
In-Reply-To: <201202251717.q1PHHeXD024464@mp.cs.niu.edu>
References:  <201202251717.q1PHHeXD024464@mp.cs.niu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 25, 2012 at 9:17 AM, Scott Bennett <bennett@cs.niu.edu> wrote:
> =A0 =A0 On Sat, 25 Feb 2012 08:56:24 -0800 Kevin Oberman <kob6558@gmail.c=
om>
> wrote:
>>On Sat, Feb 25, 2012 at 2:27 AM, Scott Bennett <bennett@cs.niu.edu> wrote=
:
>>> =3DA0 =3DA0 On Wed, 22 Feb 2012 13:34:36 +0700 Erich Dollansky
>>> <erich@alogreentechnologies.com> 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



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