Skip site navigation (1)Skip section navigation (2)
Date:      07 Nov 1998 22:42:25 -0600
From:      Joel Ray Holveck <joelh@gnu.org>
To:        Leif Neland <root@swimsuit.internet.dk>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: How to make /dev/da0
Message-ID:  <86n262rbjn.fsf@detlev.UUCP>
In-Reply-To: Leif Neland's message of "Sun, 8 Nov 1998 00:42:36 %2B0100 (CET)"
References:  <Pine.BSF.4.05.9811080026310.8500-100000@gina.swimsuit.internet.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
> I try to mount a linux-scsi disk, but fails miserably.
> No MAKEDEV will make a dev0
                          \-- I'll assume you meant 'da0'.

You don't need a da0 yet, although it is the preferred way to specify
that disk.  (Please, no holy wars on this issue.)  You may use sd0s1
for a device name.  (See below for why this failed.)

> This have never heard of /dev/da0
> -r-xr-xr-x  1 root  wheel  28634 22 Jul 10:16 /dev/MAKEDEV
> gina//dev $ /dev/MAKEDEV da0
> da0 - no such device name

You must update your MAKEDEV when you install a new kernel.

> These seems to know something, but not enough.
> -r-xr-xr-x  1 root  wheel  30602 13 Okt 19:08 /usr/release/dev/MAKEDEV
> -rwxr-xr-x  1 root  wheel  30673 31 Okt 07:38 /usr/src/etc/etc.i386/MAKEDEV
> gina//dev $ /usr/src/etc/etc.i386/MAKEDEV da0
> da0s0h - no such device name
> da0s1 - no such device name
> da0s2 - no such device name
> da0s3 - no such device name
> da0s4 - no such device name

MAKEDEV was designed to be run from /dev.  In many cases, including
da0, it will call itself recursively out of the current path.  In your
case, the MAKEDEV you specified ran the MAKEDEV in the current
directory.

Anybody know why we shouldn't s/sh MAKEDEV/$0/ throughout MAKEDEV?

> Fdisk can see /dev/sd0
> Script started on Sun Nov  8 00:36:26 1998
> gina//dev $ fdisk /dev/sd0
> ******* Working on device /dev/sd0 *******

fdisk uses what you specify.  (By default, it tries wd0, then sd0,
then od0.  We need to s/sd0/da0/ in there.)

> Fdisk doesn't see a /dev/da0
> gina//dev $ fdisk /dev/da0
> fdisk: can't get file status of /dev/da0
> fdisk: cannot open disk /dev/da0: No such file or directory

That's because the MAKEDEV failed.  fdisk uses devices same as
everything else.

> I cant mount /dev/sd0s1 or /dev/da0s1
> gina//dev $ mount_ext2fs /dev/sd0s1 /sd1
> mount_ext2fs: vfsload(ext2fs): No such file or directory

Now you've hit the proper problem: ext2fs (the Linux filesystem) isn't
being loaded.  That's where you need to look.  Read up on vfsload(2)
to see what it does, and how.  Did you make world the same time you
rebuilt your kernel?  When did you rebuild your kernel?

> If I boot from a 2.2.7-RELEASE boot.flp, the disk gets recognized as
> /dev/sd0s1

2.2.7 uses the sd0 names instead of the da0 names.

> Must I create /dev/da0 etc myself, and if so, what major/minor number?

No, it is not necessary.  Find out why ext2fs isn't being loaded.

The preferred method of creating devices is *always* with MAKEDEV
(unless it's not, but you'll know when that is).  Update your MAKEDEV
to make the da0 devices.  However, for the sake of completeness:

brw-r-----  1 root      operator    4, 0x00010002 Oct  4 12:57 /dev/da0
brw-r-----  1 root      operator    4,   0 Oct  4 12:57 /dev/da0a
brw-r-----  1 root      operator    4,   1 Oct  4 12:57 /dev/da0b
brw-r-----  1 root      operator    4,   2 Oct  4 12:57 /dev/da0c
brw-r-----  1 root      operator    4,   3 Oct  4 12:57 /dev/da0d
brw-r-----  1 root      operator    4,   4 Oct  4 12:57 /dev/da0e
brw-r-----  1 root      operator    4,   5 Oct  4 12:57 /dev/da0f
brw-r-----  1 root      operator    4,   6 Oct  4 12:57 /dev/da0g
brw-r-----  1 root      operator    4,   7 Oct  4 12:57 /dev/da0h
brw-r-----  1 root      operator    4, 0x00020002 Oct  4 12:57 /dev/da0s1
brw-r-----  1 root      operator    4, 0x00030002 Oct  4 12:57 /dev/da0s2
brw-r-----  1 root      operator    4, 0x00040002 Oct  4 12:57 /dev/da0s3
brw-r-----  1 root      operator    4, 0x00050002 Oct  4 12:57 /dev/da0s4

Note that these are identical to sd0's values; you can (for the
moment) continue to use sd0.

Cheers,
joelh

-- 
Joel Ray Holveck - joelh@gnu.org
   Fourth law of programming:
   Anything that can go wrong wi
sendmail: segmentation violation - core dumped

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



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