random problem with 8.3 from yesterday

Kevin Oberman kob6558 at gmail.com
Sat Feb 25 17:55:48 UTC 2012


On Sat, Feb 25, 2012 at 9:17 AM, Scott Bennett <bennett at cs.niu.edu> wrote:
>     On Sat, 25 Feb 2012 08:56:24 -0800 Kevin Oberman <kob6558 at gmail.com>
> wrote:
>>On Sat, Feb 25, 2012 at 2:27 AM, Scott Bennett <bennett at cs.niu.edu> wrote:
>>> =A0 =A0 On Wed, 22 Feb 2012 13:34:36 +0700 Erich Dollansky
>>> <erich at alogreentechnologies.com> 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?
>
>     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
> 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?

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.
-- 
R. Kevin Oberman, Network Engineer
E-mail: kob6558 at gmail.com


More information about the freebsd-stable mailing list