NetBSD Problem Report #43012

From www@NetBSD.org  Fri Mar 19 14:39:19 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 1F45163B86C
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 19 Mar 2010 14:39:19 +0000 (UTC)
Message-Id: <20100319143918.CC78663B11D@www.NetBSD.org>
Date: Fri, 19 Mar 2010 14:39:18 +0000 (UTC)
From: Christoph_Egger@gmx.de
Reply-To: Christoph_Egger@gmx.de
To: gnats-bugs@NetBSD.org
Subject: sysinst doesn't detect correct cd/dvd drive
X-Send-Pr-Version: www-1.0

>Number:         43012
>Category:       install
>Synopsis:       sysinst doesn't detect correct cd/dvd drive
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    martin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 19 14:40:00 +0000 2010
>Closed-Date:    Fri Dec 27 19:56:20 +0000 2013
>Last-Modified:  Fri Dec 27 19:56:20 +0000 2013
>Originator:     Christoph Egger
>Release:        -current
>Organization:
>Environment:
NetBSD/amd64
>Description:

sysinst assumes the first cd/dvd drive is the one you booted the
install cd from.
Hence it offers the first cd/dvd drive, mount fails with
'medium not present' and sysinst let the user start the whole
install setup from the beginning.

Before sysinst offers cd device selection it should
a) probe for available cd/dvd drives
b) probe available cd/dvd drives if media is present.

Allow the user to select a cd/dvd drive with a media being present.

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: install-manager->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Fri, 19 Mar 2010 14:49:24 +0000
Responsible-Changed-Why:
I'll handle it


From: "Christoph Egger" <Christoph_Egger@gmx.de>
To: gnats-bugs@NetBSD.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org,
 install-manager@netbsd.org
Cc: 
Subject: Re: install/43012: sysinst doesn't detect correct cd/dvd drive
Date: Fri, 19 Mar 2010 15:56:02 +0100

 More details:

 # dmesg | fgrep cd
 cd0 at atapibus0 drive 1: <DVD-ROM DDU1621, B, VER S3.> cdrom removable
 cd0: 32-bit data port
 cd0: drive supports PIO mode 4, DMA mode 0, Ultra-DMA mode 0
 cd0(ixpide0:0:1): using PIO mode 4, Ultra-DMA mode 0 (using DMA)
 cd1 at atapibus1 drive 1: <DVD-ROM DDU1621, B, VER S3.> cdrom removable
 cd1: 32-bit data port
 cd1: drive supports PIO mode 4, DMA mode 0, Ultra-DMA mode 0
 cd1(ixpide1:0:1): using PIO mode 4, Ultra-DMA mode 0 (using DMA)

 # mount -t cd9660 /dev/cd0a /mnt
 cd0(ixpide0:0:1):  Check Condition on CDB: 0x00 00 00 00 00 00
     SENSE KEY:  Not Ready
      ASC/ASCQ:  Medium Not Present

 mount_cd9660: /dev/cd0a on /mnt: Operation not supported by device

 # mount -t cd9660 /dev/cd1a /mnt 
 mount_cd9660: /dev/cd1a on /mnt: Device not configured

 # disklabel cd0
 disklabel: ioctl DIOCGDINFO: Operation not supported by device

 # disklabel cd1
 # /dev/rcd1d:
 type: ATAPI
 disk: iso partition
 label: fictitious
 flags: removable
 bytes/sector: 2048
 sectors/track: 100
 tracks/cylinder: 1
 sectors/cylinder: 100
 cylinders: 4
 total sectors: 350
 rpm: 300
 interleave: 1
 trackskew: 0
 cylinderskew: 0
 headswitch: 0           # microseconds
 track-to-track seek: 0  # microseconds
 drivedata: 0 

 4 partitions:
 #        size    offset     fstype [fsize bsize cpg/sgs]
  d:       350         0        UDF                     # (Cyl.      0 -      3*)
 disklabel: boot block size 0
 disklabel: super block size 0


 # mount -t udf /dev/cd1d /mnt 
 UDF mount: disc is not recordable
 mount_udf: Cannot mount /dev/cd1d on /mnt: Read-only file system


 # mount -t cd9660 /dev/cd1d /mnt

 # mount
 /dev/wd0a on / type ffs (local)
 kernfs on /kern type kernfs (local)
 ptyfs on /dev/pts type ptyfs (local)
 /dev/cd1d on /mnt type cd9660 (read-only, local)

From: "Christoph Egger" <Christoph_Egger@gmx.de>
To: gnats-bugs@NetBSD.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org,
 martin@NetBSD.org
Cc: 
Subject: Re: install/43012: sysinst doesn't detect correct cd/dvd drive
Date: Fri, 19 Mar 2010 16:10:23 +0100

 After booting from install cd typing 'mount'
 in a shell gives me this:

 # mount
 /dev/md0a on / type ffs (local)
 tmpfs on /dev type tmpfs (union, local)

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: install-manager@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org,
        tsutsui@ceres.dti.ne.jp
Subject: Re: install/43012: sysinst doesn't detect correct cd/dvd drive
Date: Sat, 20 Mar 2010 01:25:26 +0900

 > sysinst assumes the first cd/dvd drive is the one you booted the
 > install cd from.

 AFAIK, sysinst doesn't care which drive is booted device.
 ("cd0a" is hardcoded in src/distrib/utils/sysinst/main.c)

 sysinst might able to check if booted device is CD-ROM and use it
 for the default cdrom_dev, but there is another problem to detect
 booted_device in CD boot case on x86 as filed in PR port-i386/39998.
 (See comments in sys/arch/x86/x86/x86_autoconf.c:findroot() for details)

 Probably we have to add some new parameters in bootinfo
 to indicate volume label or signature of booted ISO as
 disklabel/dkwedge for harddisk.
 ---
 Izumi Tsutsui

From: Martin Husemann <martin@duskware.de>
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Cc: gnats-bugs@NetBSD.org
Subject: Re: install/43012: sysinst doesn't detect correct cd/dvd drive
Date: Fri, 19 Mar 2010 17:32:19 +0100

 On Sat, Mar 20, 2010 at 01:25:26AM +0900, Izumi Tsutsui wrote:
 > AFAIK, sysinst doesn't care which drive is booted device.
 > ("cd0a" is hardcoded in src/distrib/utils/sysinst/main.c)

 Correct.

 > sysinst might able to check if booted device is CD-ROM and use it
 > for the default cdrom_dev

 The problem is solved for i386 style CDs w/o md root image - if / is a
 cd9660 filesystem, sysinst just used the already mounted CD.

 But amd64 still uses md on /.

 > Probably we have to add some new parameters in bootinfo
 > to indicate volume label or signature of booted ISO as
 > disklabel/dkwedge for harddisk.

 I'd rather avoid such magic and probe the device for media being present
 (i.e. make sysinst gracefully deal with a wrong selection instead of mount
 failing).

 Martin

From: Martin Husemann <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43012 CVS commit: src/distrib/utils/sysinst
Date: Tue, 30 Mar 2010 20:09:26 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Tue Mar 30 20:09:25 UTC 2010

 Modified Files:
 	src/distrib/utils/sysinst: menus.mi msg.mi.de msg.mi.en msg.mi.es
 	    msg.mi.fr msg.mi.pl util.c

 Log Message:
 Do not bother to ask the user for CD details (like device name or path
 on the CD) if we can find CDs (i.e. media, not drives) automagically
 and check the standard paths on it.

 If we find multiple CDs, offer a menu to select showing the volume
 name. If something goes wrong, fall back to the manual input method.

 In typical installs this makes us just proceed with extracting the sets
 after selecting "install from CD/DVD", w/o any further interaction.

 As a side effect fixes PR 43012.
 XXX new messages need translations.


 To generate a diff of this commit:
 cvs rdiff -u -r1.37 -r1.38 src/distrib/utils/sysinst/menus.mi
 cvs rdiff -u -r1.51 -r1.52 src/distrib/utils/sysinst/msg.mi.de
 cvs rdiff -u -r1.159 -r1.160 src/distrib/utils/sysinst/msg.mi.en
 cvs rdiff -u -r1.28 -r1.29 src/distrib/utils/sysinst/msg.mi.es
 cvs rdiff -u -r1.109 -r1.110 src/distrib/utils/sysinst/msg.mi.fr
 cvs rdiff -u -r1.67 -r1.68 src/distrib/utils/sysinst/msg.mi.pl
 cvs rdiff -u -r1.163 -r1.164 src/distrib/utils/sysinst/util.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: martin@NetBSD.org
State-Changed-When: Tue, 30 Mar 2010 20:11:05 +0000
State-Changed-Why:
Should be fixed, can you please retry?


From: Christoph Egger <Christoph_Egger@gmx.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/43012: sysinst doesn't detect correct cd/dvd drive
Date: Thu, 05 Aug 2010 08:15:25 +0200

 sysinst detects the correct CD/DVD and uses it.

 However on some machines where the CD can only
 be mounted via cd?d (rather cd?a) sysinst fails
 to detect the CD/DVD.

 Christoph

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/43012: sysinst doesn't detect correct cd/dvd drive
Date: Thu, 5 Aug 2010 09:46:09 +0200

 On Thu, Aug 05, 2010 at 06:20:04AM +0000, Christoph Egger wrote:
 >  However on some machines where the CD can only
 >  be mounted via cd?d (rather cd?a) sysinst fails
 >  to detect the CD/DVD.

 Please explain and give more details why you would need to mount the raw
 partition.

 Background: this should not be a proerpty of the machine, but of the image
 you run sysinst from - or it would point to a bug in generation of the
 default disk label, which is partly arch dependend (i.e. sparc64 and sgimips
 do some magic, but those CDs just work).

 If you are using a custom image, please provide a copy.

 Martin

From: "Christoph Egger" <Christoph_Egger@gmx.de>
To: gnats-bugs@NetBSD.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org,
 martin@NetBSD.org
Cc: 
Subject: Re: install/43012: sysinst doesn't detect correct cd/dvd drive
Date: Thu, 05 Aug 2010 10:05:33 +0200

 -------- Original-Nachricht --------
 > Datum: Thu,  5 Aug 2010 07:50:03 +0000 (UTC)
 > Von: Martin Husemann <martin@duskware.de>
 > An: martin@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, Christoph_Egger@gmx.de
 > Betreff: Re: install/43012: sysinst doesn\'t detect correct cd/dvd drive

 > The following reply was made to PR install/43012; it has been noted by
 > GNATS.
 > 
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: install/43012: sysinst doesn't detect correct cd/dvd drive
 > Date: Thu, 5 Aug 2010 09:46:09 +0200
 > 
 >  On Thu, Aug 05, 2010 at 06:20:04AM +0000, Christoph Egger wrote:
 >  >  However on some machines where the CD can only
 >  >  be mounted via cd?d (rather cd?a) sysinst fails
 >  >  to detect the CD/DVD.
 >  
 >  Please explain and give more details why you would need to
 >  mount the raw partition.
 > 
 >  Background: this should not be a proerpty of the machine,
 >  but of the image you run sysinst from - or it would point
 >  to a bug in generation of the default disk label,

 This might be the case.

 set_geometry() in
 sys/arch/i386/stand/lib/biosdisk_ll.c

 always returns 0 but the callers don't expect this behaviour.

 >  which is partly arch dependend (i.e. sparc64 and sgimips
 >  do some magic, but those CDs just work).

 Christoph

From: Martin Husemann <martin@duskware.de>
To: Christoph Egger <Christoph_Egger@gmx.de>
Cc: gnats-bugs@NetBSD.org
Subject: Re: install/43012: sysinst doesn't detect correct cd/dvd drive
Date: Thu, 5 Aug 2010 10:20:03 +0200

 So I assume you are using NetBSD/i386 - with which image do you have the
 problem?

 Martin

From: "Christoph Egger" <Christoph_Egger@gmx.de>
To: gnats-bugs@NetBSD.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org,
 martin@NetBSD.org
Cc: 
Subject: Re: install/43012: sysinst doesn't detect correct cd/dvd drive
Date: Thu, 05 Aug 2010 10:32:57 +0200

 >  So I assume you are using NetBSD/i386

 I am using NetBSD/amd64-current - bootloader is the same.

 > - with which image do you have the problem?

 Take an iso image from releng autobuilder. That's enough
 to reproduce.

 Christoph

From: Martin Husemann <martin@duskware.de>
To: Christoph Egger <Christoph_Egger@gmx.de>
Cc: gnats-bugs@NetBSD.org
Subject: Re: install/43012: sysinst doesn't detect correct cd/dvd drive
Date: Thu, 5 Aug 2010 10:43:54 +0200

 On Thu, Aug 05, 2010 at 10:32:57AM +0200, Christoph Egger wrote:
 > Take an iso image from releng autobuilder. That's enough
 > to reproduce.

 I'm pretty sure I installed an amd64 machine by booting from a -current image
 from the releng cluster just a few weeks ago, which worked flawlessly and 
 autodetected the CD just fine. Did this change recently for you?

 The main difference between amd64 and i386 (despite the identical bootloader)
 here is that the i386 CD has / on cd0a, which makes the probe for CD and
 sets void, while amd64 uses the built in md0a image, so has to realy find
 the CD.

 Can you boot the image into sysinst, use the utility menu to start a shell
 and show me the output of

    disklabel cd0

 (or other cd1, if cd0 does not work/has no medium) please?

 Thanks,

 Martin

State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 23 Dec 2013 22:42:29 +0000
State-Changed-Why:
feedback timeout


State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 23 Dec 2013 22:42:46 +0000
State-Changed-Why:
try again: wasn't this fixed ages ago?


From: Christoph Egger <christoph_egger@gmx.de>
To: gnats-bugs@NetBSD.org, martin@NetBSD.org, netbsd-bugs@netbsd.org, 
 gnats-admin@netbsd.org, dholland@NetBSD.org
Cc: 
Subject: Re: install/43012 (sysinst doesn't detect correct cd/dvd drive)
Date: Tue, 24 Dec 2013 09:18:56 +0100

 Am 23.12.13 23:42, schrieb dholland@NetBSD.org:
 > Synopsis: sysinst doesn't detect correct cd/dvd drive
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: dholland@NetBSD.org
 > State-Changed-When: Mon, 23 Dec 2013 22:42:46 +0000
 > State-Changed-Why:
 > try again: wasn't this fixed ages ago?

 I no longer have the hardware to test again.

 Christoph

State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 27 Dec 2013 19:56:20 +0000
State-Changed-Why:
Submitter can't test and I believe we fixed this problem during the
-6 release cycle.


>Unformatted:

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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.