NetBSD Problem Report #49579

From www@NetBSD.org  Sat Jan 17 04:34:25 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 7DA46A6554
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 17 Jan 2015 04:34:25 +0000 (UTC)
Message-Id: <20150117043424.11B7FA6555@mollari.NetBSD.org>
Date: Sat, 17 Jan 2015 04:34:23 +0000 (UTC)
From: lloyd@must-have-coffee.gen.nz
Reply-To: lloyd@must-have-coffee.gen.nz
To: gnats-bugs@NetBSD.org
Subject: postinstall doesn't detect/fix ksyms major device number change 
X-Send-Pr-Version: www-1.0

>Number:         49579
>Category:       install
>Synopsis:       postinstall doesn't detect/fix ksyms major device number change
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 17 04:35:09 +0000 2015
>Last-Modified:  Sat Jan 17 06:45:00 +0000 2015
>Originator:     Lloyd Parkes
>Release:        7.0_BETA
>Organization:
Must Have Coffee
>Environment:
NetBSD thallid.must-have-coffee.gen.nz 7.0_BETA NetBSD 7.0_BETA (GENERIC) #1: Fri Jan 16 15:44:29 NZDT 2015  lloyd@castigate.must-have-coffee.gen.nz:/Users/lloyd/scratch/build7/obj.amd64/sys/arch/amd64/compile/GENERIC amd64
>Description:
I upgraded a NetBSD/amd64 system from 6.1.4 to 7.0_BETA. I ran etcupdate and "postinstall check" showed no problems.

snmpd from Net-SNMP wouldn't start and complained with "kvm_openfiles: /dev/ksyms: Device not configured". 

I ran the following

bash-4.2# ls -l ksyms
cr--r--r--  1 root  wheel  101, 0 Mar  5  2009 ksyms
bash-4.2# ./MAKEDEV std
bash-4.2# ls -l ksyms
cr--------  1 root  wheel  85, 0 Jan 17 17:20 ksyms

At this point snmpd started without complaint.


>How-To-Repeat:
Upgrade NetBSD/amd64 from 6.1.4 to 7.0.

>Fix:
I don't know if the major device number should be reverted, or if postinstall should check for this. Presumably postinstall only needs to check the major numbers for "MAKEDEV std".

>Audit-Trail:
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: lloyd@must-have-coffee.gen.nz
Cc: gnats-bugs@NetBSD.org
Subject: Re: install/49579: postinstall doesn't detect/fix ksyms major device
 number change
Date: Fri, 16 Jan 2015 23:42:10 -0600 (CST)

 This looks like you updated to amd64 on a machine previously running
 i386:

 $ uname -mr ; ls -laF /dev/ksyms                        
 7.0_BETA i386
 cr--r--r--  1 root  wheel  101, 0 Oct 20  2012 /dev/ksyms

 vs.:

 $ uname -mr ; ls -laF /dev/ksyms                        
 7.0_BETA amd64
 cr--r--r--  1 root  wheel  85, 0 Apr 29  2014 /dev/ksyms

 Your re-running of MAKEDEV has straightened things out, of course.

 This would be a useful check to make "Is this amd64 being installed on
 a machine previously running i386?"

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
To: "John D. Baker" <jdbaker@mylinuxisp.com>
Cc: gnats-bugs@NetBSD.org
Subject: Re: install/49579: postinstall doesn't detect/fix ksyms major device number change
Date: Sat, 17 Jan 2015 19:05:47 +1300

 On 17/01/2015, at 6:42 pm, John D. Baker <jdbaker@mylinuxisp.com> wrote:

 > This looks like you updated to amd64 on a machine previously running
 > i386:


 I=92ve had a very close look and I=92m sure you are right.

 I have two of these machines (one prod, one test) and they used to be =
 i386 boxes way back in the past. They=92ve been virtual 64 bit systems =
 for a while now. I didn=92t snapshot the virtual machine that I upgraded =
 before the upgrade, so I compared it against my production machine. The =
 reason that snmpd wasn=92t complaining on the production machine was =
 because I wasn=92t running snmpd on it. I never have.

 I=92m not sure it=92s worth trying to catch this problem. Switching from =
 i386 to amd64 is so easy that nobody is ever going to read any =
 documentation and in my case, the conversion was many years in the past. =
 If there is an easy way to put something in postinstall, then sure, but =
 I won=92t complain if this PR is close with =93user error=94.

 Cheers,
 Lloyd

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
Cc: gnats-bugs@NetBSD.org
Subject: Re: install/49579: postinstall doesn't detect/fix ksyms major device
 number change
Date: Sat, 17 Jan 2015 00:40:12 -0600 (CST)

 On Sat, 17 Jan 2015, Lloyd Parkes wrote:

 > On 17/01/2015, at 6:42 pm, John D. Baker <jdbaker@mylinuxisp.com> wrote:
 > 
 > > This looks like you updated to amd64 on a machine previously running
 > > i386:
 > 
 > I've had a very close look and I'm sure you are right.
 [snip]
 > 
 > I'm not sure it.s worth trying to catch this problem.  Switching from
 > i386 to amd64 is so easy that nobody is ever going to read any
 > documentation and in my case, the conversion was many years in the
 > past.  If there is an easy way to put something in postinstall, then
 > sure, but I won't complain if this PR is close with "user error".

 Easy, but not without pitfalls, as you've seen.  A great many device
 major/minor differences exist between i386 and amd64 (and probably among
 all ports) which may range from annoying (such as clockctl for chrooted
 ntpd) to catastrophic (wd8[a-p] and higher disks).

 When I changed my fileserver from i386 to amd64, I was unaware of the
 difference in major/minor numbers between ports, resulting in damaging
 one unit in my RAID.  It ran in degraded mode for a couple of months
 before patches to raidframe were developed to permit a system running
 RAID-R (RAID-5 w/rotated sparing) to complete reconstruction.

 If one updates using 'sysinst' from some boot/install CD, I think the
 device nodes get re-made.  If one updates by untar-ing the sets and
 running 'postinstall', then while the MAKEDEV script will be updated,
 the device nodes are not touched.

 I didn't mean to hijack this PR, but reading it reminded me of an
 all-to-familiar scenario.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.