*BSD News Article 73899


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.eng.convex.com!newshost.convex.com!bcm.tmc.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!news.msfc.nasa.gov!newsfeed.internetmci.com!news.mathworks.com!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: file system HELP HELP HELP
Date: 16 Jul 1996 11:10:42 GMT
Organization: Private BSD site, Dresden
Lines: 87
Message-ID: <4sftbi$meq@uriah.heep.sax.de>
References: <31E6C1F4.6FB1@ucdavis.edu> <4s86ok$n33@uriah.heep.sax.de>
  <4s8o0d$3gb@news.cs.tu-berlin.de> <31E9C455.3CC4@ucdavis.edu>
  <4sdbht$fne@uriah.heep.sax.de> <31EAAA87.1136@ucdavis.edu>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E

Michael White <mdwhite@ucdavis.edu> wrote:

> I set it up with sysinstall.  The reason I had set up two partitions
> was I wanted the /, swap and /usr slices to be under the first 500MB (as
> initally I was having install problems... though in hind sight it may
> not have been necessary).

It's unnecessary.  As long as the root file system is the first, and
doesn't span more than 20 or 30 MB, it will always be bootable.

The only difference is for (obsolete) disks that require bad144 bad-
sector remapping.

>  Also, I am using the terms partitions and
> slices as I understood them to be used.  Dos/Windows/Linux all require
> you use partitions to seperate different filesystems.  FreeBSD is able
> to allow you to define slices on the disk (thus, you are limited to
> 4 partitions on a disk, but you may have many more BSD slices).  Is this
> the incorrect usage of the terms?

It's reversed. :)

This is not surprising if you think of history: BSD came from the
PDP-11 and the Vax.  It always used to have entire disks there, thus
it was required to have partitions of its own.  They are maintained
via the disklabel, there are a maximum of 8 per disk (with usually one
(`c') being special in that it covers the entire disk even if no label
is present -- to get around the chicken-and-egg problem for a virgin
disk).  In fact, even 386BSD 0.0 still had this view of the world.

Of course, when entering the PC business, support was needed to share
a disk with other operating systems, based on the fdisk table
approach.  This was done a bit half-hearted starting with 386BSD 0.1,
so finally with FreeBSD 2.0.5, a new approach has been taken that
allows to get the entire fdisk table into business.  Since the term
`partition' was already used in a traditional way, these now ``super-
partitions'' were called slices.  Only slices with a BSD signature can
get a BSD partition scheme, naturally.

Nevertheless, it's a continued source for confusion.

(Btw., the above is still supported as well.  All my disks are fully
dedicated to BSD, and the fdisk table there is merely a dummy only.)

> > Of course, you need to be careful to stop _before_ sysinstall would
> > newfs your partitions.
> 
> I think I might have written down the information.  How do you stop
> before
> sysinstall newfs the partitions?  (Is this simply quiting without having
> it "commit"

Yes, don't "commit", but use the "W)rite" menu items in the partition
(ick, wrong :) and label editors.  They are not useful for an initial
installation, but they are for a repair.

> > 0000200  57 45 56 82 04 00 00 00   73 74 33 36 35 35 6e 00   WEV.....st3655n.
> >          ^^^^^^^^^^^
> 
> What program would you recommend I use to search the disklabel?

hexdump(1) :)  The above has been done with a simple wrapper i used
to install as /usr/local/bin/hd:

#!/bin/sh

exec hexdump -e '"%07.7_Ax\n"' -e '"%07.7_ax  " 8/1 "%02x " "   "8/1 "%02x "' -e '"   " 16/1 "%_p" "\n"' $*


There's also a nice editor for such purposes in the (post-2.1R)
packages, it's called `bpatch'.  As opposed to all other hex editors,
it reads only one screenful at a time, thus it can be used to edit
entire disks.  Alas, it operates with 256 bytes per operation, thus
you need to run it on the block device (/dev/wd0, as opposed to the
raw device /dev/rwd0 which would be the better solution for editing a
raw disk).

Of course, if your FreeBSD is not running, you might to fall back to a
similar tool in the DOS world.  I used to love N*rton diskedit for
this kind of work, but it's been way back.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)