lkml.org 
[lkml]   [1998]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectNFS bug (Linux 2.0.33 to HP): device files major num==0!
Dear Linux Kernel readers,

I'm wondering if someone can help me with a problem: I'm trying to
use NFSROOT to store all my Linux files on an HP/UX machine. But there
seems to be a bug in either the HP/UX NFS server, or the Linux NFS
client.

The bug is that the major number of any character or block device
which is stored on the HP box, is shown as "0" on the Linux box.

The symptoms of this is that on booting, the kernel can't open
/dev/tty1, and I get the message "Unable to open initial console".

I have attached a transcript which shows this problem, using the tty*
char device files as an example.

I would appreciate ideas from anyone who could tell me how to go
about finding:

i) Whether the problem is on the HP/UX side or the Linux side, and
ii) How to get some diagnostic information which shows this.

Many thanks,

Mitch.
--
| mailto:mjd#NOSPAM@nsmd.aus.hp.com | Not an official view of: |
| mailto:mjd#NOSPAM@alphalink.com.au | Telecom Management Divn |
| Remove the #NOSPAM to send me mail | Hewlett Packard Australia |
Script started on Fri Jan 2 19:39:41 1998
hpiw0234:/# uname -a
Linux hpiw0234 2.0.33 #15 Fri Jan 2 19:22:18 EST 1998 i486 unknown

hpiw0234:/# grep tty /etc/groups
tty::5:

/* Note that on the linux box, group ID 5 is "tty". The owner/group IDs of
* tty0 is 0, 5.
*/

hpiw0234:/# cd /dev
hpiw0234:/dev# ls -l tty tty[0-9]
crw-rw-rw- 1 root tty 5, 0 Jul 18 1994 tty
crw------- 1 root tty 4, 0 Jul 18 1994 tty0
crwx-w---- 1 root tty 4, 1 Jan 2 19:39 tty1
crwx-w---- 1 root tty 4, 2 Jan 2 19:40 tty2
crw--w--w- 1 root root 4, 3 Jan 2 19:27 tty3
crw--w--w- 1 root root 4, 4 Jan 2 19:27 tty4
crw--w--w- 1 root root 4, 5 Jan 2 19:27 tty5
crw--w--w- 1 root root 4, 6 Jan 2 19:27 tty6
crw-rw-rw- 1 root tty 4, 7 Jul 18 1994 tty7
crw-rw-rw- 1 root tty 4, 8 Jul 18 1994 tty8
crw-rw-rw- 1 root tty 4, 9 Jul 19 1994 tty9

/* Note that the major/minor number of tty0 is 4, 0. */

hpiw0234:/dev# telnet taco

/* Taco is an HPUX 10.20 box */

Trying 99.99.99.99...
Connected to taco.
Escape character is '^]'.
HP-UX taco B.10.20 A 9000/778 200999999 two-user license

login: mjd
Password:
mjd@taco [~] cd /mnt/taco/d0001/mjd/linux/dev

/* This is where I'm storing my NFSROOT Linux volume.

mjd@taco [/mnt/taco/d0001/mjd/linux/dev] ls -l tty tty[0-9]
crw-rw-rw- 1 root daemon 5 0x000000 Jul 18 1994 tty
crw------- 1 root daemon 4 0x000000 Jul 18 1994 tty0
crwx-w---- 1 root daemon 4 0x000001 Jan 2 16:56 tty1
crwx-w---- 1 root daemon 4 0x000002 Jan 2 16:58 tty2
crw--w--w- 1 root root 4 0x000003 Jan 2 16:52 tty3
crw--w--w- 1 root root 4 0x000004 Jan 2 15:54 tty4
crw--w--w- 1 root root 4 0x000005 Jan 2 15:54 tty5
crw--w--w- 1 root root 4 0x000006 Jan 2 15:54 tty6
crw-rw-rw- 1 root daemon 4 0x000007 Jul 18 1994 tty7
crw-rw-rw- 1 root daemon 4 0x000008 Jul 18 1994 tty8
crw-rw-rw- 1 root daemon 4 0x000009 Jul 19 1994 tty9

mjd@taco [/mnt/taco/d0001/mjd/linux/dev] id daemon
uid=1(daemon) gid=5(daemon)

/* Note that on the HP box, GID 5 is daemon. This is just what I want.
* Note also that tty0 has the correct major/minor number: 4, 0.
* Now let's try and see if the problem is the HP NFS server, by
* mounting it to the HP.
*/

mjd@taco [/mnt/taco/d0001/mjd/linux/dev] cd /
mjd@taco [/] su2
Password for user mjd:

root@taco [~] cd /
root@taco [/] mount -F nfs taco:/mnt/taco/d0001 /mnt2
root@taco [/] cd /mnt2/mjd/linux/dev
root@taco [/mnt2/mjd/linux/dev] ls -l tty tty[0-9]
crw-rw-rw- 1 root daemon 5 0x000000 Jul 18 1994 tty
crw------- 1 root daemon 4 0x000000 Jul 18 1994 tty0
crwx-w---- 1 root daemon 4 0x000001 Jan 2 16:56 tty1
crwx-w---- 1 root daemon 4 0x000002 Jan 2 16:58 tty2
crw--w--w- 1 root root 4 0x000003 Jan 2 16:52 tty3
crw--w--w- 1 root root 4 0x000004 Jan 2 15:54 tty4
crw--w--w- 1 root root 4 0x000005 Jan 2 15:54 tty5
crw--w--w- 1 root root 4 0x000006 Jan 2 15:54 tty6
crw-rw-rw- 1 root daemon 4 0x000007 Jul 18 1994 tty7
crw-rw-rw- 1 root daemon 4 0x000008 Jul 18 1994 tty8
crw-rw-rw- 1 root daemon 4 0x000009 Jul 19 1994 tty9
root@taco [/mnt2/mjd/linux/dev] exit

/* No, that looks fine. tty0 has major/minor numbers of 4, 0.
* So let's try mounting it to the Linux box...
*/

mjd@taco [/] exit
logout
Connection closed by foreign host.

hpiw0234:/# mount -t nfs -o rw taco:/mnt/taco/d0001/mjd/linux /mnt
hpiw0234:/# cd /mnt/dev
hpiw0234:/mnt/dev# ls -l tty tty[0-9]
crw-rw-rw- 1 root tty 0, 0 Jul 18 1994 tty
crw------- 1 root tty 0, 0 Jul 18 1994 tty0
crwx-w---- 1 root tty 0, 1 Jan 2 16:56 tty1
crwx-w---- 1 root tty 0, 2 Jan 2 16:58 tty2
crw--w--w- 1 root root 0, 3 Jan 2 16:52 tty3
crw--w--w- 1 root root 0, 4 Jan 2 15:54 tty4
crw--w--w- 1 root root 0, 5 Jan 2 15:54 tty5
crw--w--w- 1 root root 0, 6 Jan 2 15:54 tty6
crw-rw-rw- 1 root tty 0, 7 Jul 18 1994 tty7
crw-rw-rw- 1 root tty 0, 8 Jul 18 1994 tty8
crw-rw-rw- 1 root tty 0, 9 Jul 19 1994 tty9

/* Oops, the minor number is preserved, but the major number is 0. Ouch! */

hpiw0234:/dev# exit
Script done on Fri Jan 2 19:42:25 1998
\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.036 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site