Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jul 2001 15:58:32 -0500
From:      Mike Meyer <mwm@mired.org>
To:        "Robert J. Hansen" <rjhansen@inav.net>
Cc:        questions@freebsd.org
Subject:   Re: Newbie: Q regarding /dev entries
Message-ID:  <15172.54520.193647.547146@guru.mired.org>
In-Reply-To: <53920410@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert J. Hansen <rjhansen@inav.net> types:
> Howdy there.  I'm new to FreeBSD, but have been using That Other Free 
> UNIX-alike for the last few years and am pretty comfortable with it, 
> although I'm certainly no guru.  Recently, in an attempt to broaden my 
> UNIX horizons, I've attempted to install FreeBSD (I happened to have 4.0 
> CDs lying around--forgot where I picked them up from).
> 
> The install was relatively painless, and the command-line environment 
> seems reasonably familiar.  First thing I went about doing was 
> attempting to mount a CD so I could install bash (as opposed to sh). 
> This is where I ran into my first problem.
> 
> Whereas Linux has /dev/hdX entries that make a degree of sense (/dev/hda 
> is my main HD, /dev/hdb is a Zip, /dev/hdc is my CD-ROM), the plethora 
> of entries in FreeBSD-4.0's /dev/ hierarchy is confusing the living 
> daylights out of me.
> 
> Attempting to mount_cd9660 /dev/cd0 and /dev/cd0a (the two most likely 
> candidates, I thought) were fruitless.  I tried several others which I 
> thought were likely, and struck out on those as well.
> 
> Thus, my first question: given that in Linux my setup is:
> 
> /dev/hda --> IDE HD
> /dev/hdb --> IDE Zip
> /dev/hdc --> IDE CDROM
> 
> ... can anyone give me a pointer on which /dev entries those correspond 
> to in FreeBSD?

BSD devices on the same driver are done with numbers instead of
letters. The letters indicate the driver: "ad" for "ata disk", "da"
for "direct access SCSI disks", "cd" for "CDROM - SCSI", "acd" for
"Atapi CD", etc..

Then comes the drive number: 0, 1, 2 and so on. The default for IDE is
that 0 is primary master, 1 is primary slave, 2 is secondary master
and 3 is secondary slave (I hope I've got that right - I don't have a
lot of IDE stuff). You can build a custom kernel with ATA_STATIC_ID
disabled, and get 0 as the first disk, 1 as the second disk, and so
on. I'm not sure which way Linux does it.

So for your question, /dev/hdc is /dev/acd0. Assuming the other two
are on the primary IDE controller - or you don't have ATA_STATIC_ID -
/dev/hda is /dev/ad0 and /dev/hdb is /dev/ad1. If that's not the case,
then they could be any pair of ad0, ad1 and ad2. You can also check
for /var/run/dmesg.boot for the ad devices to see what they are.

> Second question.  I'd like to get EMACS rewired to accept the backspace 
> key, instead of throwing a fit at the fact that I'm not using delete. 
> Now, I can just hack out a short EMACS LISP definition to remap the key, 
> but I was hoping there was a more elegant solution.

Hmm - it works fine for me, and I didn't do anything special about
it. I am using xemacs instead of emacs, though.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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